/* ============================================
   EINSCHULUNGS-EINLADUNG - DESIGN SYSTEM
   ============================================ */

:root {
    /* Farbpalette - Fröhliche Schulfarben */
    --primary: #FF6B6B;           /* Rot */
    --secondary: #4ECDC4;         /* Türkis */
    --accent: #FFE66D;            /* Gelb */
    --purple: #A8E6CF;            /* Mint/Grün */
    --orange: #FFB347;            /* Orange */
    --bg: #FFF8F0;                /* Warmes Weiß */
    --text-dark: #2C3E50;
    --text-light: #5A6C7D;
    --white: #FFFFFF;
    
    /* Typografie */
    --font-heading: 'Fredoka', sans-serif;
    --font-body: 'Nunito', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   PAGE STRUCTURE - Scroll Snap
   ============================================ */

.page {
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
    position: relative;
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 70px 0 30px;
}

/* ============================================
   SEITE 1: HERO
   ============================================ */

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="%23ffffff" opacity="0.05"/><path d="M0,50 Q25,25 50,50 T100,50" stroke="%23ffffff" stroke-width="2" fill="none" opacity="0.1"/></svg>');
    opacity: 0.3;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
    color: var(--white);
    padding: 20px 70px 20px 30px;
}

.school-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    animation: bounce 2s ease-in-out infinite;
}

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

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 4px 8px rgba(0,0,0,0.2);
}

.hero-name {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 600;
    margin-bottom: 8px;
    opacity: 0.95;
}

.hero-date {
    font-size: clamp(0.85rem, 2vw, 1.1rem);
    margin-bottom: 0;
    opacity: 0.9;
}

.hero-image {
    margin-top: 50px;
}

.portrait {
    width: 250px !important;
    height: 250px !important;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--white);
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    animation: fadeInScale 1s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Konfetti Animation */
.confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent);
    opacity: 0.8;
    animation: confettiFall 4s linear infinite;
}

.confetti-piece:nth-child(1) { left: 10%; background: var(--primary); animation-delay: 0s; }
.confetti-piece:nth-child(2) { left: 30%; background: var(--secondary); animation-delay: 0.5s; }
.confetti-piece:nth-child(3) { left: 50%; background: var(--accent); animation-delay: 1s; }
.confetti-piece:nth-child(4) { left: 70%; background: var(--purple); animation-delay: 1.5s; }
.confetti-piece:nth-child(5) { left: 85%; background: var(--orange); animation-delay: 2s; }
.confetti-piece:nth-child(6) { left: 95%; background: var(--primary); animation-delay: 2.5s; }

@keyframes confettiFall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================
   SEITE 2: PERSONAL TEXT
   ============================================ */

.personal-section {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 15px;
}

.header-icon {
    font-size: 2.5rem;
    margin-bottom: 6px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.title-underline {
    width: 70px;
    height: 2px;
    background: var(--primary);
    margin: 0 auto;
    border-radius: 2px;
}

.personal-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.personal-text {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
    color: var(--text-light);
    text-align: center;
}

.fun-fact {
    margin-top: 12px;
    padding: 10px 12px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--orange) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.85rem;
}

.fact-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* ============================================
   SEITE 3: DETAILS
   ============================================ */

.details-section {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 550px;
    margin: 12px auto 0;
}

.detail-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 10px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detail-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.detail-icon {
    font-size: 2rem;
    margin-bottom: 6px;
}

.detail-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.detail-info {
    font-size: 0.8rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 2px;
    line-height: 1.3;
}

.detail-subinfo {
    font-size: 0.7rem;
    color: var(--text-light);
    line-height: 1.2;
}

/* ============================================
   SEITE 4: TIMELINE
   ============================================ */

.schedule-section {
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
}

.timeline {
    position: relative;
    max-width: 550px;
    margin: 0 auto;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    position: relative;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 31px;
    top: 50px;
    width: 2px;
    height: calc(100% + 12px);
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.timeline-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    background: var(--white);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    position: relative;
    z-index: 2;
}

.timeline-time {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    background: var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    min-width: 70px;
    text-align: center;
    flex-shrink: 0;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 12px;
    border-radius: 8px;
    flex-grow: 1;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.timeline-content h4 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.timeline-content p {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* ============================================
   SEITE 5: RSVP FORM
   ============================================ */

.rsvp-section {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.section-subtitle {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 8px;
    font-weight: 300;
}

.rsvp-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 18px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

@media (min-width: 600px) {
    .form-row:not(.form-row:has(.full-width)) {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 3px;
    letter-spacing: 0.3px;
}

.radio-label-main {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
    display: block;
    letter-spacing: 0.3px;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
    font-family: var(--font-body);
    font-size: 0.75rem;
    padding: 6px 8px;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    background: var(--white);
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 45px;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23FF6B6B' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--white);
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: var(--primary);
    background: rgba(255, 107, 107, 0.05);
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-custom {
    width: 12px;
    height: 12px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: var(--primary);
    background: var(--primary);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 5px;
    height: 5px;
    background: var(--white);
    border-radius: 50%;
}

.radio-text {
    font-size: 0.7rem;
    color: var(--text-dark);
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.3);
    margin-top: 5px;
    letter-spacing: 0.8px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* ============================================
   NAVIGATION DOTS (Radiergummi-Form)
   ============================================ */

.page-nav {
    position: fixed;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.nav-dot {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.eraser-icon {
    width: 18px;
    height: 26px;
    background: linear-gradient(to bottom, 
        #FF6B6B 0%, 
        #FF6B6B 60%, 
        #FFE66D 60%, 
        #FFE66D 100%
    );
    border-radius: 2px 2px 4px 4px;
    position: relative;
    opacity: 0.4;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.eraser-icon::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 1px;
}

.nav-dot.active .eraser-icon {
    opacity: 1;
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.4);
}

.nav-dot:hover .eraser-icon {
    opacity: 0.8;
    transform: scale(1.08);
}

/* ============================================
   MUSIK BUTTON
   ============================================ */

.music-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 0.8rem;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.3));
}

.music-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.music-btn:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 12px 30px rgba(70, 100, 200, 0.5));
}

.music-btn:active {
    transform: scale(0.95);
}

.music-btn.playing {
    animation: pulse 1.5s ease-in-out infinite;
}

.music-btn.playing .music-icon {
    animation: spin 3s linear infinite;
}

/* Animationen */
@keyframes pulse {
    0%, 100% {
        filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.3));
    }
    50% {
        filter: drop-shadow(0 12px 40px rgba(70, 100, 200, 0.7));
    }
}

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

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .page-nav {
        right: 0.5rem;
        gap: 0.5rem;
    }
    
    .nav-dot {
        width: 24px;
        height: 34px;
    }
    
    .eraser-icon {
        width: 16px;
        height: 24px;
    }
    
    .music-btn {
        width: 60px;
        height: 60px;
        bottom: 1rem;
        right: 0.5rem;
    }
    
    .container {
        padding: 0 50px 0 20px;
    }
    
    .hero-content {
        padding: 20px 50px 20px 20px;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .timeline-item {
        gap: 8px;
    }
    
    .timeline-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .timeline-time {
        font-size: 0.85rem;
        min-width: 60px;
        padding: 3px 8px;
    }
    
    .rsvp-form {
        padding: 12px 15px;
    }
    
    .personal-content {
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .page {
        padding: 20px 0;
    }
    
    .container {
        padding: 0 45px 0 20px;
    }
    
    .hero-content {
        padding: 20px 45px 20px 20px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .detail-card,
    .timeline-content,
    .rsvp-form {
        padding: 10px 12px;
    }
    
    .personal-content {
        padding: 10px 12px;
    }
}

/* ============================================
   ANIMATIONS & UTILITIES
   ============================================ */

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

.page.visible {
    animation: fadeIn 0.6s ease-out;
}
