/* ==========================================================================
   FASAN 2026 - Retro DDR-Style Stylesheet
   ========================================================================== */

/* Custom Fonts & Variable Configuration */
:root {
    /* Color Palette */
    --color-bg-paper: #ece6d9;
    --color-text-dark: #29241f;
    --color-text-muted: #6e6458;
    
    /* Day Border Colors */
    --color-day-green: #376348;
    --color-day-purple: #4c326b;
    --color-day-yellow: #b5922f;
    
    /* Day Header Fill */
    --color-day-header-bg: #32253d;
    --color-day-header-text: #ece6d9;

    /* Location Brand Colors */
    --loc-camping: #376348;
    --loc-marktplatz: #a62a4d;
    --loc-bunker: #56337a;
    --loc-goldhorn: #216a73;
    --loc-schleiereule: #7a1d4b;
    --loc-gelande: #376348;
    --loc-see: #1c5ba1;
    --loc-fasanerie: #264a2f;
    --loc-gesamtes-gelande: #376348;

    /* Typography */
    --font-typewriter: 'Special Elite', 'Courier New', Courier, monospace;
    --font-body: 'Courier Prime', Courier, monospace;

    /* Visual Polish */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    --box-shadow-poster: 0 15px 35px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

body {
    background-color: #d1c8b8;
    background-image: radial-gradient(circle, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0.1) 100%);
    font-family: var(--font-body);
    color: var(--color-text-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    position: relative;
    overflow-x: hidden;
}

/* Paper Texture Overlay (covers entire screen, blends with elements) */
.paper-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('assets/paper_bg.png');
    background-repeat: repeat;
    opacity: 0.08;
    pointer-events: none;
    z-index: 1000;
}

/* Poster Container (Main Page Wrapper) */
.poster-container {
    background-color: var(--color-bg-paper);
    background-image: url('assets/paper_bg.png');
    background-repeat: repeat;
    width: 100%;
    max-width: 860px;
    padding: 40px 45px 30px 45px;
    border-radius: 4px;
    box-shadow: var(--box-shadow-poster);
    border: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Subtle inner vignetting on the paper poster */
.poster-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 80px rgba(40, 30, 20, 0.04);
    pointer-events: none;
    border-radius: inherit;
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */
.poster-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 35px;
}

.logo-wrapper {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    perspective: 1000px; /* 3D perspective context */
}

.logo-coin {
    width: 250px;
    height: 250px;
    max-width: 100%;
    position: relative;
    
    /* 3D context configuration */
    transform-style: preserve-3d;
    backface-visibility: visible;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.6s ease;
    
    /* Continuous 3D spin animation */
    animation: logoSpin 16s linear infinite;
    cursor: pointer;
}

/* Base style for front & back faces */
.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    overflow: hidden;
    border: 5px solid var(--color-text-dark);
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.15);
}

.coin-front {
    background-image: url('assets/logo.png');
    background-size: cover;
    background-position: center;
    background-color: var(--color-bg-paper);
    z-index: 2;
}

.coin-back {
    background-image: url('assets/logo.png');
    background-size: cover;
    background-position: center;
    background-color: var(--color-bg-paper);
    z-index: 1;
}

/* Edge layers for 3D volume extrusion */
.coin-thickness {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #1a1613; /* Dark bronze/wood edges */
    border: 5px solid #1a1613; /* Blend with borders */
}

/* When hover begins, pause the automatic spin and increase shadows */
.logo-wrapper:hover .logo-coin {
    animation-play-state: paused;
    box-shadow: 0 22px 40px rgba(0, 0, 0, 0.22);
    /* Transition is made very short on hover to follow the cursor movement instantly in JS */
    transition: transform 0.1s ease, box-shadow 0.3s ease;
}

/* Smooth transition back to spin when mouse leaves */
.logo-coin.resetting {
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.6s ease;
}

@keyframes logoSpin {
    0% {
        transform: rotateY(0deg) rotateX(6deg);
    }
    50% {
        transform: rotateY(180deg) rotateX(-6deg);
    }
    100% {
        transform: rotateY(360deg) rotateX(6deg);
    }
}

.poster-title {
    font-family: var(--font-typewriter);
    font-weight: normal;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.title-text {
    font-size: 3.8rem;
    line-height: 1;
    letter-spacing: 0.1em;
    color: var(--color-text-dark);
}

.title-year {
    font-size: 1.8rem;
    font-family: var(--font-typewriter);
    border: 2px solid var(--color-text-dark);
    padding: 2px 14px;
    margin-top: 12px;
    border-radius: 10px;
    letter-spacing: 0.05em;
    background-color: rgba(255, 255, 255, 0.25);
    box-shadow: 1px 2px 0px rgba(0,0,0,0.15);
}

.poster-subtitle {
    font-family: var(--font-typewriter);
    font-size: 1.4rem;
    letter-spacing: 0.15em;
    word-spacing: 0.1em;
    color: var(--color-text-dark);
    margin-top: 10px;
}

.poster-subtitle .dash {
    color: var(--color-text-muted);
}

/* ==========================================================================
   GRID SCHEDULE
   ========================================================================== */
.schedule-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Cards (Days) */
.day-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.day-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.04);
}

/* Specific Day Borders */
.day-card.day-freitag { border: 2.5px solid var(--color-day-green); }
.day-card.day-samstag { border: 2.5px solid var(--color-day-purple); }
.day-card.day-sonntag { border: 2.5px solid var(--color-day-yellow); }
.day-card.day-montag { border: 2.5px solid var(--color-day-green); }

/* Card Header (Wochentag) */
.day-header {
    background-color: var(--color-day-header-bg);
    color: var(--color-day-header-text);
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--color-text-dark);
}

.day-name {
    font-family: var(--font-typewriter);
    font-size: 1.25rem;
    letter-spacing: 0.12em;
}

.day-smiley {
    font-size: 1.4rem;
    line-height: 1;
}

/* Events Table Layout */
.day-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.event-row {
    display: grid;
    grid-template-columns: 55px 95px 1fr;
    align-items: start;
    padding: 12px 14px;
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.08);
    transition: background-color 0.2s ease;
}

.event-row:last-child {
    border-bottom: none;
}

/* Hover over an event row for a subtle vintage highlighted look */
.event-row:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Special Dashed Separator for custom breaks (like Saturday noon) */
.event-row.separator-dashed {
    border-top: 1.5px dashed rgba(0, 0, 0, 0.25);
}

/* Event Icons */
.event-icon-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 2px;
}

.event-icon-cell svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
    opacity: 1;
}

/* Event Times */
.event-time-cell {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text-dark);
    padding-top: 2px;
    letter-spacing: -0.02em;
    min-width: 0; /* Allows shrinking in grid layout to enable wrapping */
    overflow-wrap: break-word; /* Forces wrapping of long words */
}

/* Event Details & Locations */
.event-details-cell {
    display: flex;
    flex-direction: column;
}

.event-title {
    font-size: 0.95rem;
    line-height: 1.35;
    font-weight: bold;
    color: var(--color-text-dark);
    margin-bottom: 3px;
}

.event-location {
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: capitalize;
    letter-spacing: 0.02em;
}

.event-subtext {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--loc-marktplatz); /* red accent color from DDR palette */
    font-weight: bold;
    margin-top: 5px;
    letter-spacing: 0.02em;
}

/* ==========================================================================
   LOCATION COLORS (TEXT DYNAMICS)
   ========================================================================== */
.loc-camping { color: var(--loc-camping); }
.loc-marktplatz { color: var(--loc-marktplatz); }
.loc-bunker { color: var(--loc-bunker); }
.loc-goldhorn { color: var(--loc-goldhorn); }
.loc-schleiereule { color: var(--loc-schleiereule); }
.loc-gelande { color: var(--loc-gelande); }
.loc-see { color: var(--loc-see); }
.loc-fasanerie { color: var(--loc-fasanerie); }
.loc-gesamtes-gelande { color: var(--loc-gesamtes-gelande); }

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */
.poster-footer {
    border-top: 1px dashed rgba(0, 0, 0, 0.15);
    margin-top: auto;
    padding-top: 25px;
    text-align: center;
}

.footer-note {
    font-family: var(--font-typewriter);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
}

/* NoScript and Error Fallbacks */
.noscript-message {
    grid-column: span 2;
    padding: 30px;
    text-align: center;
    border: 2px dashed var(--color-day-purple);
    background-color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-typewriter);
    border-radius: 8px;
    font-size: 1.1rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE OPTIMIZATION)
   ========================================================================== */
@media (max-width: 768px) {
    body {
        padding: 15px 10px;
    }

    .poster-container {
        padding: 25px 20px 20px 20px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    }

    .title-text {
        font-size: 2.8rem;
    }

    .title-year {
        font-size: 1.4rem;
        padding: 1px 10px;
        margin-top: 8px;
    }

    .poster-subtitle {
        font-size: 1.1rem;
        letter-spacing: 0.1em;
    }

    .schedule-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 25px;
    }

    .day-header {
        padding: 8px 12px;
    }

    .day-name {
        font-size: 1.1rem;
    }

    .event-row {
        grid-template-columns: 45px 85px 1fr;
        padding: 10px 8px;
    }

    .event-icon-cell svg {
        width: 25px;
        height: 25px;
    }

    .event-time-cell {
        font-size: 0.85rem;
    }

    .event-title {
        font-size: 0.85rem;
    }

    .event-location {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .title-text {
        font-size: 2.3rem;
    }

    .logo-coin {
        width: 190px;
        height: 190px;
    }

    .poster-subtitle {
        font-size: 0.95rem;
        letter-spacing: 0.05em;
    }
}
