/* --- BASIS-RESET & BOX-MODEL --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    background-color: var(--primary-purple);
}

:root {
    color-scheme: only light;
    -webkit-color-scheme: only light;
    --primary-purple: #6e44a7;
    --accent-highlight: #f1c40f;
    --accent-purple: #8e68c9;
    --bg-light: #ffffff;
    --text-white: #ffffff;
    --text-dark: #333333;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --card-shadow: 0 8px 24px rgba(0,0,0,0.15);
    --main-font: system-ui, -apple-system, sans-serif;
    --alternative-font: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--main-font);
    background-color: var(--primary-purple);
    color: var(--text-white);
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.app-shell {
    width: 100%;
    max-width: 480px;
    padding: 0 20px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-bottom: 180px;
}

/* --- FIXIERTER HEADER (Sticky) --- */
.sticky-header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: var(--primary-purple);
    z-index: 100;
    padding-top: 30px;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
}

.main-logo {
    width: 180px;
    height: auto;
    display: block;
    margin: 0 auto 5px auto;
}

@media (max-width: 380px) {
    .main-logo {
        width: 140px;
    }
}

.shakespeare-sub {
    font-family: var(--alternative-font);
    font-style: italic;
    font-size: 0.85rem;
    margin: 0 0 15px 0;
    opacity: 0.8;
}

.header p.subtitle {
    font-family: var(--alternative-font);
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 600;
    line-height: 1.4;
}

.highlight-accent {
    color: var(--accent-highlight);
    font-weight: bold;
    text-transform: uppercase;
}

/* --- NAVIGATION --- */
.nav-tabs {
    display: flex;
    background: rgba(0,0,0,0.2);
    padding: 5px;
    border-radius: 50px;
    width: 100%;
    margin-bottom: 10px;
    gap: 5px;
}
.tab-btn {
    flex: 1;
    border: none;
    background: none;
    color: rgba(255,255,255,0.7);
    padding: 10px 5px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
}
.tab-btn.active {
    background: white;
    color: var(--primary-purple);
}

/* --- CONTENT BEREICH --- */
.main-content {
    width: 100%;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tab-content {
    display: none;
    width: 100%;
    animation: fadeIn 0.3s ease forwards;
}
.tab-content.active { display: flex; flex-direction: column; gap: 15px; }

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

/* --- TICKETS HEADING & ARROW --- */
.tickets-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.tickets-header h2 {
    font-family: var(--alternative-font);
    text-align: center;
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--text-white);
    margin: 10px 0 0 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    flex: 1;
}

@media (max-width: 380px) {
    .tickets-header h2 {
        font-size: 1.15rem;
        margin: 5px 0 0 0;
    }
}

.arrow-down {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    color: var(--accent-highlight);
    animation: bounce 2s ease-in-out infinite;
    cursor: pointer;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* --- TICKETS & TEXT --- */
.event-card {
    display: flex;
    gap: 10px;
    width: 100%;
}
.btn-main {
    flex: 1;
    background: white;
    color: var(--primary-purple);
    text-decoration: none;
    padding: 16px;
    border-radius: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--card-shadow);
}
.btn-info {
    width: 54px;
    background: var(--glass-bg);
    border: 2px solid rgba(255,255,255,0.4);
    color: var(--accent-highlight);
    border-radius: 16px;
    font-family: var(--alternative-font);
    font-style: italic;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
}

.text-box {
    position: relative;
    width: 100%;
    background: white;
    color: var(--text-dark);
    padding: 20px;
    border-radius: 20px;
    line-height: 1.6;
    max-height: 45vh;
    overflow-y: auto;
}

.text-box h2 {
    color: var(--primary-purple);
    margin-top: 0;
    font-family: var(--alternative-font);
}

.team-photo {
    display: block;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px auto;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: transform 0.2s;
}
.team-photo:active {
    transform: scale(0.95);
}

.expand-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary-purple);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.expand-btn:hover,
.expand-btn:active {
    opacity: 1;
}

/* --- BILDERGALERIE --- */
#bilder-galerie {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-height: 50vh;
    overflow-y: auto;
    padding: 0 5px 20px 0;
}

.media-fit {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    background: var(--glass-bg);
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: transform 0.2s;
}
.media-fit:active {
    transform: scale(0.95);
}

/* --- SCROLLBAR --- */
.text-box::-webkit-scrollbar,
#bilder-galerie::-webkit-scrollbar { width: 6px; }
.text-box::-webkit-scrollbar-thumb,
#bilder-galerie::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 10px;
}

/* --- FOOTER --- */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(110, 68, 167, 0.95), var(--primary-purple));
    padding-top: 20px;
    padding-bottom: 20px;
    text-align: center;
    width: 100%;
    z-index: 99;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
}
.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
}
.social-links a { color: white; transition: 0.3s; }
.legal-links { font-size: 0.75rem; opacity: 0.6; }
.legal-links a { color: white; text-decoration: none; }

@media (max-width: 380px) {
    .footer {
        padding-top: 12px;
        padding-bottom: 12px;
    }
    .social-links {
        gap: 20px;
        margin-bottom: 10px;
    }
}

/* --- MODALS --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-card {
    background: white;
    color: var(--text-dark);
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 24px;
    padding: 30px;
    position: relative;
}
.modal-close {
    position: absolute;
    top: 15px; right: 15px;
    background: none; border: none; font-size: 1.5rem; color: var(--primary-purple);
    cursor: pointer;
}

/* Spezifisch für das Bild-Modal */
#imageModal .modal-close {
    color: white;
    top: 20px;
    right: 20px;
}
#modalImage {
    max-width: 95%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Video Player Modal */
#videoModal .modal-close {
    color: white;
    top: 20px;
    right: 20px;
}
#videoModal .gallery-counter {
    bottom: 20px;
}
#modalVideo {
    display: block;
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: #000;
}

/* Play button overlay on video thumbnails */
.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    pointer-events: none;
    transition: background 0.2s;
    z-index: 10;
}
.video-wrapper:hover .play-icon,
.video-wrapper:active .play-icon {
    background: white;
}

/* Gallery Navigation Arrows */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 1001;
}
.gallery-nav-btn:hover {
    background: rgba(255, 255, 255, 0.6);
}
.gallery-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}
.gallery-nav-btn.prev {
    left: 20px;
}
.gallery-nav-btn.next {
    right: 20px;
}

/* Gallery Counter */
.gallery-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 1001;
}
