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

/* Two-column layout for credits inside left box */
.box.play-credits.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.box.play-credits.two-cols .col .item:last-child { margin-bottom: 0; }

@media (max-width: 720px) {
    .box.play-credits.two-cols {
        grid-template-columns: 1fr;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    min-height: 100vh;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: #000;
    border-bottom: 1px solid #333;
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 2rem;
    align-items: center;
}

.menu-icon {
    cursor: pointer;
}

.menu-icon svg {
    fill: #fff;
    transition: fill 0.2s ease;
}

.menu-icon:hover svg {
    fill: #ccc;
}

.thalia-icon .title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e5e5e5;
}

.lang-btn.active {
    background: #4299e1;
    color: white;
    box-shadow: 0 2px 4px rgba(66, 153, 225, 0.3);
}

.lang-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.editor-controls { 
    display: flex; 
    gap: 0.5rem; 
    justify-self: end; 
}

.edit-btn, .save-btn {
    padding: 0.5rem 0.9rem;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-btn.active { 
    background: #3182ce; 
    border-color: #3182ce; 
}

.save-btn { 
    background: #38a169; 
    border-color: #38a169; 
}

.save-btn:hover { 
    filter: brightness(1.05); 
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Box Layout System (Thalia Theater Style) */
.box {
    background: #fff;
    border: 1px solid #e5e5e5;
    margin-bottom: 1.33rem;
    padding: 1.33rem;
}

.box.headline {
    background: #f8f9fa;
    /* slimmer headline box */
    border-left: none;
    font-size: 1.35rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    padding: 0.67rem 0.83rem;
    margin-bottom: 0.83rem;
}

.box.current-play {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
}

.box.play-credits .item {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.box.play-credits strong {
    color: #000;
    font-weight: 600;
}

.box.text h4 {
    color: #000;
    font-size: 1.1rem;
    margin: 1rem 0 0.75rem 0;
}

.box.text p {
    margin-bottom: 0.67rem;
    line-height: 1.7;
}

.box.text strong {
    color: #333;
    font-weight: 600;
}

/* Two Column Layout */
.box-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.33rem;
    margin-bottom: 1.33rem;
}

.box-half .left,
.box-half .right {
    min-width: 0;
}

/* Make the top hero image span two columns (only in hero section) */
.hero-section .box-half.play-site .left {
    grid-column: 1 / -1;
}

/* Place the right text below the full-width image (only in hero section) */
.hero-section .box-half.play-site .right {
    grid-column: 1 / -1;
}

/* Hero Section */
.hero-section {
    padding: 1.33rem 0;
}

.hero-section .box.headline {
    margin-bottom: 1.5rem;
}

.hero-section .size1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-section .description {
    font-size: 1.3rem;
    color: #666;
    font-weight: 400;
}

.hero-image {
    margin-bottom: 1.33rem;
}

/* Info basics (gray box) */
.box.info.basics {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

/* Password gate overlay */
.gate {
    position: fixed;
    inset: 0;
    background: #000; /* fully opaque to hide content */
    display: flex; /* visible by default; JS hides after unlock */
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.gated, .gated body { overflow: hidden; }
html.gated, body.gated { overflow: hidden; height: 100%; }
.gate-inner {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    width: min(90vw, 420px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    text-align: center;
}
.gate-inner h2 { margin-bottom: 0.75rem; }
.gate-inner input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}
.gate-inner button {
    display: inline-block;
    padding: 0.5rem 0.9rem;
    border: 1px solid #222;
    background: #111;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}
.gate-inner .gate-hint {
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.hero-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-info .item {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.hero-info strong {
    color: #000;
    font-weight: 600;
}

.hero-link {
    color: #000;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.hero-link:hover {
    color: #000;
    text-decoration: underline;
}

/* Footer / Impressum */
.site-footer {
    border-top: 1px solid #e5e5e5;
    background: #fafafa;
    margin-top: 1.33rem;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.33rem 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.33rem;
}
.impressum-box h3 { margin-bottom: 0.67rem; }
.impressum-box p { margin-bottom: 0.67rem; }
.impressum-box .smallprint { font-size: 0.9rem; color: #444; }
.footer-nav { align-self: start; }
.footer-nav .legal-link { color: #000; text-decoration: none; }
.footer-nav .legal-link:hover { text-decoration: underline; }
.legal-link { color: #000; }
.todo { font-style: italic; color: #555; }

@media (max-width: 800px) {
  .footer-content { grid-template-columns: 1fr; }
}

/* Info Sections */
.info-section {
    padding: 2rem 0;
}

/* Two-column text blocks for wide screens */
.box.text.two-col {
    column-count: 2;
    column-gap: 2rem;
}

@media (max-width: 900px) {
    .box.text.two-col {
        column-count: 1;
    }
}

/* Map Section - Full Screen */
.map-section-fullscreen {
    min-height: 100vh;
    background: #f8f9fa;
    padding: 2rem 0;
    margin: 0;
    width: 100%;
    max-width: none;
}

.map-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 2rem;
}

.map-header .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.map-description {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Map Container */
.map-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    /* Allow markers near the edges to be fully visible */
    overflow: visible;
    position: relative;
    margin: 0 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.map-wrapper {
    position: relative;
    width: 100%;
    height: auto;
}

.map-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
    /* Keep rounded corners on the visual image itself */
    border-radius: 16px;
}

/* Stage Areas */
.stage-areas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.stage-area {
    position: absolute;
    width: 66px;
    height: 66px;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stage-area.editing { 
    outline: 2px dashed #fff; 
    cursor: move; 
}

.stage-area.dragging { 
    opacity: 0.7; 
    transform: translate(-50%, -50%) scale(1.05) !important; 
}

.stage-area:hover {
    transform: scale(1.1);
    z-index: 10;
}

.stage-area:hover .stage-marker {
    background: #4299e1;
    box-shadow: none;
}

.stage-marker {
    width: 44px;
    height: 44px;
    background: #e53e3e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    box-shadow: none;
    transition: all 0.3s ease;
}

.middle-stage {
    width: 200px;
    height: 200px;
}

.middle-stage .stage-marker {
    background: #38a169;
    width: 200px;
    height: 200px;
}

.stage-number {
    color: white;
    font-family: 'Avenir Next', 'Avenir', -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
    font-weight: 400;
    font-size: 1.2rem;
    text-align: center;
    padding: 0 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.middle-stage .stage-number {
    font-size: 1.6rem;
    line-height: 1.3;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.video-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.video-modal-content {
    background: #000;
    border-radius: 16px;
    max-width: 90vw;
    max-height: 90vh;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #000;
    border-bottom: 1px solid #111;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.close-btn {
    background: #e53e3e;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #c53030;
    transform: scale(1.05);
}

.video-container {
    position: relative;
    width: 100%;
    background: #000;
}

#youtube-player {
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 70vh;
}

/* Positions modal */
.positions-modal { 
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,0.85); 
    z-index: 1100; 
}

.positions-content { 
    background: #0b0b0b; 
    color: #e5e5e5; 
    max-width: 900px; 
    width: 92vw; 
    margin: 8vh auto; 
    border-radius: 12px; 
    border: 1px solid #1f2937; 
    overflow: hidden; 
}

.positions-header { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 0.75rem 1rem; 
    background: #111; 
    border-bottom: 1px solid #1f2937; 
}

.positions-content textarea { 
    width: 100%; 
    min-height: 300px; 
    background: #0f172a; 
    color: #e5e5e5; 
    border: none; 
    padding: 1rem; 
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; 
    font-size: 0.9rem; 
}

.positions-actions { 
    padding: 0.75rem 1rem; 
    display: flex; 
    justify-content: flex-end; 
}

.control-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #4299e1;
    background: white;
    color: #4299e1;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-btn:hover {
    background: #4299e1;
    color: white;
    transform: translateY(-1px);
}

.control-btn.active {
    background: #4299e1;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .thalia-icon .title {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .box-half {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .box {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-section .size1 {
        font-size: 2.5rem;
    }
    
    .map-section-fullscreen {
        padding: 1rem 0;
    }
    
    .map-container {
        margin: 0 1rem;
    }
    
    .map-header {
        padding: 0 1rem;
    }
    
    .map-header .section-title {
        font-size: 2rem;
    }
    
    .video-modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .video-header {
        padding: 1rem;
    }
    
    .stage-area {
        width: 50px;
        height: 50px;
    }
    
    .stage-marker {
        width: 35px;
        height: 35px;
    }
    
    .middle-stage .stage-marker {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .hero-section .size1 {
        font-size: 2rem;
    }
    
    .map-header .section-title {
        font-size: 1.8rem;
    }
    
    .box {
        padding: 1rem;
    }
    
    .stage-area {
        width: 40px;
        height: 40px;
    }
    
    .stage-marker {
        width: 30px;
        height: 30px;
    }
    
    .stage-number {
        font-size: 0.9rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

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

/* Focus styles for accessibility */
.stage-area:focus,
.lang-btn:focus,
.close-btn:focus,
.control-btn:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

