/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Crimson Text', serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #fefefe;
    font-size: 18px;
    overflow: hidden;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e8e8e8;
    padding-bottom: 1rem;
    flex-shrink: 0;
}

h1 {
    font-size: 2.2rem;
    font-weight: 600;
    color: #1a252f;
    margin-bottom: 0.3rem;
}

.subtitle {
    font-style: italic;
    color: #5a6c7d;
    font-size: 1rem;
}

/* Main content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    min-height: 0;
}

/* Meditation content */
.meditation {
    animation: fadeIn 0.6s ease-in;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.date-title {
    text-align: center;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

#meditation-date {
    font-size: 1.2rem;
    color: #7f8c8d;
    font-weight: 400;
    margin-bottom: 0.3rem;
}

#meditation-title {
    font-size: 1.6rem;
    color: #1a252f;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Quote styling */
.quote {
    font-size: 1.2rem;
    font-style: italic;
    text-align: center;
    margin: 1.5rem auto;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    border-radius: 4px;
    position: relative;
    max-width: 90%;
    flex-shrink: 0;
}

.quote::before {
    content: '"';
    font-size: 3.5rem;
    color: #bdc3c7;
    position: absolute;
    top: -8px;
    left: 15px;
    font-family: serif;
}

.quote::after {
    content: '"';
    font-size: 3.5rem;
    color: #bdc3c7;
    position: absolute;
    bottom: -25px;
    right: 15px;
    font-family: serif;
}

/* Reference */
.reference {
    display: block;
    text-align: center;
    margin: 1rem auto 1.5rem;
    font-style: italic;
    color: #5a6c7d;
    font-size: 0.95rem;
    flex-shrink: 0;
}

/* Context */
.context {
    font-size: 1rem;
    line-height: 1.6;
    color: #34495e;
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.context p {
    margin-bottom: 1rem;
}

.context:last-child {
    margin-bottom: 0;
}

/* Loading and error states */
.loading, .error {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: #7f8c8d;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error {
    color: #e74c3c;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e8e8e8;
    font-size: 0.85rem;
    color: #7f8c8d;
    flex-shrink: 0;
}

footer p {
    margin-bottom: 0.3rem;
}

.today-date {
    font-weight: 600;
    color: #5a6c7d;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        overflow: auto;
    }
    
    .container {
        padding: 1rem;
        height: auto;
        min-height: 100vh;
    }
    
    main {
        overflow-y: visible;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .quote {
        font-size: 1.1rem;
        padding: 1.5rem;
        margin: 2rem auto;
    }
    
    .quote::before,
    .quote::after {
        font-size: 3rem;
    }
    
    .quote::before {
        top: -5px;
        left: 10px;
    }
    
    .quote::after {
        bottom: -25px;
        right: 10px;
    }
    
    #meditation-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 16px;
    }
    
    .quote {
        max-width: 95%;
        font-size: 1rem;
    }
    
    #meditation-title {
        font-size: 1.3rem;
        letter-spacing: 0.5px;
    }
} 