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

body {
    font-family: 'Guardian Text Sans Web', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #121212;
    background: #f6f6f6;
    min-height: 100vh;
    padding: 20px;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header */
header {
    background: #052962;
    color: white;
    padding: 40px 30px;
    text-align: center;
}

header h1 {
    font-family: 'Georgia', 'Guardian Egyptian Web', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.description {
    font-size: 0.95rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto;
}

/* Main content */
main {
    padding: 40px 30px;
}

/* Button group */
.button-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.time-button {
    background: white;
    border: 2px solid #052962;
    color: #052962;
    padding: 20px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: center;
}

.time-button:hover {
    background: #052962;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(5, 41, 98, 0.3);
}

.time-button:active {
    transform: translateY(0);
}

.button-subtitle {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.8;
}

/* Results section */
.results {
    margin-top: 30px;
}

.hidden {
    display: none !important;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #052962;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Article container */
.article-container {
    animation: fadeIn 0.5s ease;
}

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

.article-date {
    background: #f8f9fa;
    padding: 12px 20px;
    border-left: 4px solid #052962;
    margin-bottom: 25px;
    border-radius: 4px;
    font-weight: 600;
    color: #052962;
}

.article {
    padding: 0 10px;
}

#article-headline {
    font-family: 'Georgia', 'Guardian Egyptian Web', serif;
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 20px;
    color: #121212;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.article-excerpt {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 25px;
    white-space: pre-wrap;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 15px;
}

#article-published {
    color: #666;
    font-size: 0.9rem;
}

#article-url {
    color: #052962;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

#article-url:hover {
    color: #506991;
}

/* Quiet day */
.quiet-day {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.5s ease;
}

.quiet-day-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.quiet-day h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.quiet-day p {
    color: #666;
    font-size: 1.05rem;
}

.quiet-day-date {
    margin-top: 10px;
    font-weight: 600;
    color: #052962;
}

/* Error container */
.error-container {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.5s ease;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.error-container h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #d32f2f;
}

#error-message {
    color: #666;
    font-size: 1.05rem;
    margin-bottom: 25px;
}

.retry-button {
    background: #052962;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-button:hover {
    background: #506991;
    transform: translateY(-2px);
}

/* Footer */
footer {
    background: #f8f9fa;
    padding: 30px;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

footer a {
    color: #052962;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.credits {
    margin-top: 10px;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    main {
        padding: 30px 20px;
    }

    .button-group {
        grid-template-columns: 1fr;
    }

    #article-headline {
        font-size: 1.5rem;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    header {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 1.75rem;
    }

    main {
        padding: 20px 15px;
    }

    footer {
        padding: 20px 15px;
    }
}
