.showtimes-container {
    max-width: 100%;
    margin: 0 auto;
}

.showtimes-container h2#date {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--wp--preset--color--primary, #0073aa);
    color: white;
    border-radius: 5px;
}

#nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background-color: var(--wp--preset--color--primary, #0073aa);
    padding: 1rem 0.5rem;
    border-bottom: 1px solid var(--wp--preset--color--luminous-vivid-amber, #fcb900);
    margin: 0 0 1rem 0;
    z-index: 100;
    border-radius: 5px;
}

#nav a {
    margin: 0 0.25rem;
    text-decoration: none;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    transition: background-color 0.2s;
    font-size: 0.9em;
    white-space: nowrap;
}

#nav a:hover {
    background-color: rgba(255,255,255,0.1);
    text-decoration: none;
}

#nav button,
#nav .button {
    background-color: var(--wp--preset--color--luminous-vivid-amber, #fcb900);
    color: #000;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9em;
    transition: opacity 0.2s;
}

#nav button:hover,
#nav .button:hover {
    opacity: 0.9;
}

.showtimes-container h3[id] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 60px;
    background-color: var(--wp--preset--color--primary, #0073aa);
    color: white;
    padding: 1rem 0.5rem;
    margin: 0 0 1rem 0;
    border-radius: 3px;
    z-index: 99;
}

.showtimes-container h3 .hour {
    font-size: 1.2em;
    font-weight: bold;
}

.showtimes-container h3 a[href="#date"] {
    font-size: 0.7em;
    font-weight: 400;
    text-decoration: none;
    text-transform: lowercase;
    color: rgba(255,255,255,0.8);
    transition: color 0.2s;
}

.showtimes-container h3 a[href="#date"]:hover {
    color: white;
    text-decoration: none;
}

.showtimes-container p {
    margin: 0.5rem 0;
    padding: 0.75rem;
    background: #f9f9f9;
    border-radius: 5px;
    border-left: 4px solid var(--wp--preset--color--primary, #0073aa);
    line-height: 1.6;
}

.showtimes-container p:hover {
    background: #f0f0f0;
}

.showtimes-container a {
    color: var(--wp--preset--color--primary, #0073aa);
    text-decoration: none;
    font-weight: 500;
}

.showtimes-container a:hover {
    text-decoration: underline;
}

.showtimes-loading {
    text-align: center;
    padding: 3rem;
    background: #f9f9f9;
    border-radius: 10px;
    margin: 2rem 0;
}

.showtimes-loading p {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 1rem;
}

.showtimes-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--wp--preset--color--primary, #0073aa);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: showtimes-spin 1s linear infinite;
    margin: 0 auto;
}

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

.showtimes-fetch-controls {
    text-align: center;
    padding: 3rem;
    background: #f9f9f9;
    border-radius: 10px;
    margin: 2rem 0;
}

.showtimes-fetch-btn {
    background-color: var(--wp--preset--color--primary, #0073aa);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    margin-bottom: 1rem;
    transition: background-color 0.2s;
    min-width: 160px;
}

.showtimes-fetch-btn:hover {
    background-color: #005a87;
}

.showtimes-fetch-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.showtimes-fetch-status {
    margin: 1rem 0 0 0;
    font-size: 1em;
    min-height: 1.4em;
}

.showtimes-error {
    color: #d63384;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

.showtimes-success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

/* Mobile responsive design */
@media (max-width: 768px) {
    #nav {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem 0.5rem;
    }
    
    #nav a {
        margin: 0.1rem;
        font-size: 0.8em;
        padding: 0.3rem 0.4rem;
    }
    
    #nav button,
    #nav .button {
        font-size: 0.8em;
        padding: 0.4rem 0.8rem;
        margin-top: 0.25rem;
    }
    
    .showtimes-container h3[id] {
        top: 100px;
        font-size: 0.9em;
        padding: 0.75rem 0.5rem;
    }
    
    .showtimes-container p {
        padding: 0.5rem;
        font-size: 0.9em;
        line-height: 1.5;
    }
    
    .showtimes-fetch-btn {
        font-size: 1em;
        padding: 0.8rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .showtimes-container h2#date {
        font-size: 1.1em;
        padding: 0.75rem;
    }
    
    #nav {
        text-align: center;
    }
    
    #nav a {
        font-size: 0.75em;
        margin: 0.05rem;
    }
    
    .showtimes-container h3 .hour {
        font-size: 1em;
    }
    
    .showtimes-container h3 a[href="#date"] {
        font-size: 0.6em;
    }
    
    .showtimes-loading,
    .showtimes-fetch-controls {
        padding: 2rem 1rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #nav,
    .showtimes-container h3[id] {
        border: 2px solid;
    }
    
    .showtimes-container p {
        border-left-width: 6px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .showtimes-spinner {
        animation: none;
        border: 4px solid #666;
    }
    
    #nav a,
    #nav button,
    .showtimes-fetch-btn {
        transition: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .showtimes-container p {
        background: #333;
        color: #fff;
    }
    
    .showtimes-container p:hover {
        background: #444;
    }
    
    .showtimes-loading,
    .showtimes-fetch-controls {
        background: #333;
        color: #fff;
    }
    
    .showtimes-loading p {
        color: #ccc;
    }
}