/* ============================================
   WORD OF THE DAY - MINIMALIST MOODY THEME
   ============================================ */

:root {
    --bg-primary: #0d0d0d;
    --bg-secondary: #1a1a1a;
    --bg-elevated: #242424;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #6b6b6b;
    --accent: #e8e8e8;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --shadow: rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle Film Grain Texture */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 24px;
    position: relative;
    z-index: 2;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    margin-bottom: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 6px;
    height: 6px;
    background: var(--text-primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.status-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ============================================
   SEARCH SECTION
   ============================================ */
.search-section {
    margin-bottom: 40px;
}

.search-container {
    display: flex;
    gap: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    transition: border-color 0.3s ease;
}

.search-container:focus-within {
    border-color: var(--border-hover);
}

.search-input {
    flex: 1;
    padding: 16px 20px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 300;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.btn-search {
    padding: 16px 20px;
    background: transparent;
    border: none;
    border-left: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-search:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

/* ============================================
   DATE SECTION
   ============================================ */
.date-section {
    margin-bottom: 60px;
}

.date-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.date-container {
    display: flex;
    gap: 12px;
}

.date-input {
    flex: 1;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 300;
    outline: none;
    transition: border-color 0.3s ease;
}

.date-input:focus {
    border-color: var(--border-hover);
}

.btn-date {
    padding: 14px 32px;
    background: var(--text-primary);
    border: none;
    color: var(--bg-primary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-date:hover {
    background: var(--accent);
}

.btn-date:active {
    transform: scale(0.98);
}

/* ============================================
   LOADING
   ============================================ */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 80px 20px;
}

.loading.hidden {
    display: none;
}

.loader {
    width: 40px;
    height: 40px;
    position: relative;
}

.loader-ring {
    width: 100%;
    height: 100%;
    border: 1px solid var(--border);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Error Message */
.error-message {
    padding: 16px 20px;
    margin-bottom: 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

.error-message.hidden {
    display: none;
}

/* ============================================
   CAROUSEL
   ============================================ */
.carousel-section {
    margin-bottom: 80px;
}

.carousel {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.carousel-nav {
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.carousel-nav:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.carousel-nav.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-track-container {
    flex: 1;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 24px;
}

/* Word Cards */
.word-card {
    flex: 0 0 100%;
    min-height: 320px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 48px 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.word-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-elevated);
}

.word-card-date {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 24px;
}

.word-card-word {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    line-height: 1.1;
}

.word-card-definition {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.indicator-dot {
    width: 6px;
    height: 6px;
    background: var(--border);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator-dot.active {
    background: var(--text-primary);
    width: 24px;
}

.indicator-dot:hover {
    background: var(--text-secondary);
}

/* ============================================
   WORD DETAILS
   ============================================ */
.word-details {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 60px 48px;
}

.details-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 48px;
    line-height: 1.2;
}

.detail-section {
    margin-bottom: 48px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 20px;
}

.definition-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.definition-item {
    padding-left: 24px;
    border-left: 1px solid var(--border);
}

.definition-label {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.definition-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-weight: 300;
}

.example-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-weight: 300;
    font-style: italic;
    padding-left: 24px;
    border-left: 1px solid var(--border);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 40px 20px;
    }

    .header {
        margin-bottom: 60px;
    }

    .logo {
        font-size: 1.25rem;
    }

    .word-card {
        min-height: 280px;
        padding: 36px 28px;
    }

    .word-card-word {
        font-size: 2.25rem;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
    }

    .carousel {
        gap: 16px;
    }

    .word-details {
        padding: 40px 28px;
    }

    .details-title {
        font-size: 2rem;
        margin-bottom: 36px;
    }

    .date-container {
        flex-direction: column;
    }

    .btn-date {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 32px 16px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .word-card {
        min-height: 240px;
        padding: 28px 20px;
    }

    .word-card-word {
        font-size: 1.85rem;
    }

    .carousel-nav {
        width: 36px;
        height: 36px;
    }

    .word-details {
        padding: 32px 20px;
    }

    .details-title {
        font-size: 1.75rem;
    }

    .search-input,
    .btn-search {
        padding: 14px 16px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print */
@media print {
    .grain-overlay,
    .header,
    .search-section,
    .date-section,
    .carousel,
    .carousel-dots {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .word-details {
        border: none;
        padding: 0;
    }
}
