/**
 * Kalender-Styles - Dual Theme Design
 * Weihnachtliches Design (Standard) / Lions Design
 */

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

/* ========================================
   Theme: Weihnachtlich (Standard)
   ======================================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 100%);
    min-height: 100vh;
}

/* Header Base */
.header {
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px 20px;
}

.header-text {
    text-align: left;
}

.header h1 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

.header .subtitle {
    font-size: 0.7rem;
    opacity: 0.85;
    margin-top: 2px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Christmas Header */
.header-christmas {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    color: white;
}

.header-christmas .logo {
    width: 45px;
    height: 45px;
    opacity: 0.9;
    flex-shrink: 0;
}

.header-christmas .logo svg {
    width: 100%;
    height: 100%;
}

/* Lions Header */
.header-lions {
    background: #f7c600;
    color: #003366;
    display: none;
}

.header-lions .lions-logo {
    width: 60px;
    height: auto;
    flex-shrink: 0;
}

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.1);
}

.toggle-lions {
    display: none;
}

/* ========================================
   Theme: Lions
   ======================================== */
body.theme-lions {
    background: linear-gradient(135deg, #f7c600 0%, #e5b400 100%);
}

body.theme-lions .header-christmas {
    display: none;
}

body.theme-lions .header-lions {
    display: block;
}

body.theme-lions .toggle-christmas {
    display: none;
}

body.theme-lions .toggle-lions {
    display: block;
}

body.theme-lions .theme-toggle {
    background: rgba(0, 51, 102, 0.2);
}

body.theme-lions .theme-toggle:hover {
    background: rgba(0, 51, 102, 0.35);
}

/* ========================================
   Main Content
   ======================================== */
.main {
    padding: 20px;
    display: flex;
    justify-content: center;
}

/* Kalender Grid */
.calendar {
    background-image: url(../images/motiv.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    max-width: 1850px;
    width: 100%;
    height: 1307px;
    display: grid;
    grid-template-areas:
        "seven twelve twenty eighteen eleven twentythree"
        "fifteen twentyone eight seventeen five four"
        "one six fourteen twentyfour three twentytwo"
        "sixteen ten two nineteen thirteen nine";
    justify-content: space-around;
    align-content: space-around;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* Türchen - Liquid Glass Style */
.door {
    width: 140px;
    height: 140px;
    font-size: 2.2rem;
    font-weight: 300;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    position: relative;

    /* Liquid Glass Effekt */
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.1) 100%
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);

    /* Glanz-Effekt oben */
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);

    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glanz-Highlight */
.door::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    border-radius: 24px 24px 50% 50%;
    pointer-events: none;
}

.door:hover {
    transform: scale(1.08) translateY(-4px);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.2) 100%
    );
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.25),
        0 0 40px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.door:active {
    transform: scale(1.02) translateY(-2px);
}

/* Grid Areas */
#one { grid-area: one; }
#two { grid-area: two; }
#three { grid-area: three; }
#four { grid-area: four; }
#five { grid-area: five; }
#six { grid-area: six; }
#seven { grid-area: seven; }
#eight { grid-area: eight; }
#nine { grid-area: nine; }
#ten { grid-area: ten; }
#eleven { grid-area: eleven; }
#twelve { grid-area: twelve; }
#thirteen { grid-area: thirteen; }
#fourteen { grid-area: fourteen; }
#fifteen { grid-area: fifteen; }
#sixteen { grid-area: sixteen; }
#seventeen { grid-area: seventeen; }
#eighteen { grid-area: eighteen; }
#nineteen { grid-area: nineteen; }
#twenty { grid-area: twenty; }
#twentyone { grid-area: twentyone; }
#twentytwo { grid-area: twentytwo; }
#twentythree { grid-area: twentythree; }
#twentyfour { grid-area: twentyfour; }

/* ========================================
   Responsive Design
   ======================================== */

/* Responsive: 4 Spalten */
@media only screen and (max-width: 1200px) {
    .calendar {
        grid-template-areas:
            "seven twelve twenty eighteen"
            "eleven twentythree fifteen twentyone"
            "eight seventeen five four"
            "one six fourteen twentyfour"
            "three twentytwo sixteen ten"
            "two nineteen thirteen nine";
    }
}

/* Responsive: Kleinere Türen */
@media only screen and (max-width: 1000px) {
    .calendar {
        background-position: 60%;
    }
    .door {
        width: 130px;
        height: 130px;
        border-radius: 20px;
    }
    .door::before {
        border-radius: 20px 20px 50% 50%;
    }
}

/* Responsive: 3 Spalten */
@media only screen and (max-width: 800px) {
    .header-content {
        padding: 12px 15px;
    }

    .header-christmas .logo {
        width: 40px;
        height: 40px;
    }

    .header-lions .lions-logo {
        width: 50px;
    }

    .header h1 {
        font-size: 1.2rem;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        right: 10px;
    }

    .main {
        padding: 15px;
    }

    .calendar {
        grid-template-areas:
            "seven twelve twenty"
            "eighteen eleven twentythree"
            "fifteen twentyone eight"
            "seventeen five four"
            "one six fourteen"
            "twentyfour three twentytwo"
            "sixteen ten two"
            "nineteen thirteen nine";
        row-gap: 10px;
        height: 1800px;
        background-position: 60%;
        border-radius: 12px;
    }

    .door {
        width: 120px;
        height: 120px;
        border-radius: 18px;
    }
    .door::before {
        border-radius: 18px 18px 50% 50%;
    }
}

@media only screen and (max-width: 570px) {
    .door {
        width: 115px;
        height: 115px;
        font-size: 2rem;
        border-radius: 16px;
    }
    .door::before {
        border-radius: 16px 16px 50% 50%;
    }
}

@media only screen and (max-width: 530px) {
    .door {
        width: 105px;
        height: 105px;
    }
}

@media only screen and (max-width: 450px) {
    .header-content {
        padding: 10px 12px;
        gap: 10px;
    }

    .header-christmas .logo {
        width: 35px;
        height: 35px;
    }

    .header-lions .lions-logo {
        width: 40px;
    }

    .header h1 {
        font-size: 1.1rem;
    }

    .header .subtitle {
        font-size: 0.6rem;
    }

    .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        right: 8px;
    }

    .main {
        padding: 10px;
    }

    .door {
        width: 100px;
        height: 100px;
        font-size: 1.8rem;
        border-radius: 14px;
    }
    .door::before {
        border-radius: 14px 14px 50% 50%;
    }
}

@media only screen and (max-width: 390px) {
    .door {
        width: 95px;
        height: 95px;
        border-radius: 12px;
    }
    .door::before {
        border-radius: 12px 12px 50% 50%;
    }
}

@media only screen and (max-width: 340px) {
    .door {
        width: 85px;
        height: 85px;
        font-size: 1.5rem;
    }
    .calendar {
        row-gap: 10px;
    }
}

/* Landscape auf kleinen Geräten */
@media only screen and (max-height: 480px) {
    .header-content {
        padding: 8px 15px;
    }

    .header-christmas .logo {
        width: 30px;
        height: 30px;
    }

    .header-lions .lions-logo {
        width: 35px;
    }

    .header h1 {
        font-size: 1rem;
    }

    .main {
        padding: 10px;
    }

    .calendar {
        margin: 0 auto;
        height: 85vh;
        grid-template-areas:
            "seven twelve twenty eighteen eleven twentythree"
            "fifteen twentyone eight seventeen five four"
            "one six fourteen twentyfour three twentytwo"
            "sixteen ten two nineteen thirteen nine";
        justify-content: space-around;
        align-content: space-around;
    }
    .door {
        width: 14vh;
        height: 14vh;
    }
}
