/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5rem;
}

header h1 a {
    color: white;
    text-decoration: none;
}

header nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

header nav a {
    color: white;
    text-decoration: none;
}

header nav button {
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
}

header nav button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-error {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background-color: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* Forms */
.auth-form {
    max-width: 400px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

button,
.btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

button:hover,
.btn:hover {
    background-color: #2980b9;
}

.btn-primary {
    background-color: #27ae60;
}

.btn-primary:hover {
    background-color: #229954;
}

.btn-link {
    background: none;
    color: #3498db;
    padding: 0;
    text-decoration: underline;
}

/* Devotion Page */
.devotion-page {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.devotion-header h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.readings,
.scripture-references,
.paragraphs {
    margin-bottom: 2rem;
}

.readings ol {
    margin-left: 2rem;
}

.readings li,
.scripture-references p {
    margin-bottom: 0.5rem;
}

.paragraphs p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 2rem 0;
}

/* Comments Section */
.comments-section {
    margin-top: 2rem;
}

.comment-form {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.comment {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 4px;
    border-left: 3px solid #3498db;
}

.comment-depth-0 {
    margin-left: 0;
}

.comment-depth-1 {
    margin-left: 20px;
    border-left-color: #27ae60;
}

.comment-depth-1::before {
    content: "└─> ";
    color: #7f8c8d;
    font-weight: bold;
}

.comment-depth-2 {
    margin-left: 40px;
    border-left-color: #e74c3c;
}

.comment-depth-2::before {
    content: "└─> ";
    color: #7f8c8d;
    font-weight: bold;
}

.comment-header {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.comment-header strong {
    color: #2c3e50;
}

.comment-header .role {
    color: #95a5a6;
}

.comment-header .time {
    margin-left: 0.5rem;
}

.comment-header .edited {
    color: #e67e22;
    font-style: italic;
}

.comment-body {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.comment-actions {
    display: flex;
    gap: 0.5rem;
}

.comment-actions button {
    background: none;
    color: #3498db;
    border: none;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
}

.comment-actions button:hover {
    color: #2980b9;
}

.comment-children {
    margin-top: 1rem;
    padding-left: 1rem;
}

/* Admin Pages */
.admin-page {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.admin-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.admin-table tr:hover {
    background-color: #f8f9fa;
}

.role-select {
    padding: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.reading-item {
    margin-bottom: 0.5rem;
}

.reading-item input {
    width: 100%;
    max-width: 400px;
}

/* Footer */
footer {
    margin-top: 3rem;
    padding: 1rem 0;
    text-align: center;
    color: #7f8c8d;
    border-top: 1px solid #ddd;
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .comment-depth-1 {
        margin-left: 15px;
    }
    
    .comment-depth-2 {
        margin-left: 30px;
    }
}

