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

/* Zorg dat de pagina 100% hoogte heeft en verberg scrollbar visueel maar houd scrollen mogelijk */
html, body {
    height: 100%;
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width: none; /* Firefox */
}

/* WebKit: verberg scrollbar visueel */
body::-webkit-scrollbar {
    width: 0;
    height: 0;
}

body {
    font-family: 'Quicksand', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(26, 77, 46, 0.9) 0%, rgba(45, 95, 63, 0.85) 25%, rgba(74, 30, 30, 0.85) 75%, rgba(44, 24, 16, 0.9) 100%),
                url('assets/bg.jpg') center/cover no-repeat fixed;
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 20px;
    overflow-x: hidden;
    position: relative;
    margin: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/bg.jpg') center/cover no-repeat fixed;
    filter: blur(5px);
    z-index: -1;
}

/* Sneeuwanimatie */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* expliciet viewport height zodat het niet bijdraagt aan document flow */
    overflow: hidden; /* voorkom dat sneeuw buiten de container de pagina laat verspringen */
    pointer-events: none;
    z-index: 9999;
}

.snowflake {
    position: absolute;
    top: -10%;
    color: white;
    font-size: 1.5em;
    opacity: 0.8;
    animation: fall linear infinite;
    will-change: transform; /* hint voor betere animatie-performantie */
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.snowflake:nth-child(1) { left: 5%; animation-duration: 12s; animation-delay: 0s; font-size: 1.2em; }
.snowflake:nth-child(2) { left: 15%; animation-duration: 15s; animation-delay: 3s; font-size: 1.8em; }
.snowflake:nth-child(3) { left: 25%; animation-duration: 10s; animation-delay: 6s; font-size: 1.4em; }
.snowflake:nth-child(4) { left: 35%; animation-duration: 14s; animation-delay: 1.5s; font-size: 1.6em; }
.snowflake:nth-child(5) { left: 45%; animation-duration: 11s; animation-delay: 4.5s; font-size: 1.3em; }
.snowflake:nth-child(6) { left: 55%; animation-duration: 13s; animation-delay: 7.5s; font-size: 1.7em; }
.snowflake:nth-child(7) { left: 65%; animation-duration: 16s; animation-delay: 2.5s; font-size: 1.5em; }
.snowflake:nth-child(8) { left: 75%; animation-duration: 12s; animation-delay: 5.5s; font-size: 1.4em; }
.snowflake:nth-child(9) { left: 85%; animation-duration: 14s; animation-delay: 0.5s; font-size: 1.6em; }
.snowflake:nth-child(10) { left: 95%; animation-duration: 11s; animation-delay: 3.5s; font-size: 1.2em; }
.snowflake:nth-child(11) { left: 10%; animation-duration: 15s; animation-delay: 6.5s; font-size: 1.8em; }
.snowflake:nth-child(12) { left: 30%; animation-duration: 13s; animation-delay: 1.8s; font-size: 1.5em; }
.snowflake:nth-child(13) { left: 50%; animation-duration: 12s; animation-delay: 4.8s; font-size: 1.3em; }
.snowflake:nth-child(14) { left: 70%; animation-duration: 14s; animation-delay: 0.8s; font-size: 1.7em; }
.snowflake:nth-child(15) { left: 90%; animation-duration: 16s; animation-delay: 3.8s; font-size: 1.4em; }
.snowflake:nth-child(16) { left: 8%; animation-duration: 13s; animation-delay: 2.2s; font-size: 1.3em; }
.snowflake:nth-child(17) { left: 18%; animation-duration: 14s; animation-delay: 5.2s; font-size: 1.6em; }
.snowflake:nth-child(18) { left: 28%; animation-duration: 12s; animation-delay: 7.2s; font-size: 1.4em; }
.snowflake:nth-child(19) { left: 38%; animation-duration: 15s; animation-delay: 1.2s; font-size: 1.7em; }
.snowflake:nth-child(20) { left: 48%; animation-duration: 11s; animation-delay: 4.2s; font-size: 1.2em; }
.snowflake:nth-child(21) { left: 58%; animation-duration: 16s; animation-delay: 6.2s; font-size: 1.5em; }
.snowflake:nth-child(22) { left: 68%; animation-duration: 13s; animation-delay: 2.8s; font-size: 1.4em; }
.snowflake:nth-child(23) { left: 78%; animation-duration: 14s; animation-delay: 5.8s; font-size: 1.6em; }
.snowflake:nth-child(24) { left: 88%; animation-duration: 12s; animation-delay: 0.3s; font-size: 1.3em; }
.snowflake:nth-child(25) { left: 12%; animation-duration: 15s; animation-delay: 3.3s; font-size: 1.8em; }
.snowflake:nth-child(26) { left: 22%; animation-duration: 11s; animation-delay: 6.3s; font-size: 1.5em; }
.snowflake:nth-child(27) { left: 42%; animation-duration: 13s; animation-delay: 1.6s; font-size: 1.4em; }
.snowflake:nth-child(28) { left: 62%; animation-duration: 14s; animation-delay: 4.6s; font-size: 1.7em; }
.snowflake:nth-child(29) { left: 82%; animation-duration: 16s; animation-delay: 7.6s; font-size: 1.3em; }
.snowflake:nth-child(30) { left: 92%; animation-duration: 12s; animation-delay: 2.3s; font-size: 1.6em; }

@keyframes fall {
    to {
        transform: translate3d(0, 110vh, 0) rotate(360deg);
    }
}

/* Muziekknop */
.music-control {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
}

.music-btn {
    background: linear-gradient(135deg, #d4af37, #f4e5b8);
    border: 2px solid #b8941f;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    color: #2c1810;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

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

/* Container en kaart */
.container {
    max-width: 600px;
    width: 100%;
    padding: 0 10px;
    animation: fadeIn 1s ease-in;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 769px) {
    .container {
        width: 90%;
        max-width: 600px;
        padding: 0;
    }
}

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

.card {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 50px 30px 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
                0 0 50px rgba(212, 175, 55, 0.3),
                inset 0 0 30px rgba(255, 215, 0, 0.1);
    position: relative;
    border: 3px solid rgba(196, 30, 58, 0.4);
    width: 100%;
    max-width: 600px;
}

/* Decoraties */
.decoration, .decoration-bottom {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    font-size: 2em;
}

.decoration-bottom {
    margin-top: 30px;
    margin-bottom: 0;
}

.ornament {
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

.ornament:nth-child(2) { animation-delay: 0.2s; }
.ornament:nth-child(3) { animation-delay: 0.4s; }
.ornament:nth-child(4) { animation-delay: 0.6s; }

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

/* Content */
.content {
    text-align: center;
}

/* Van/Aan sectie */
.from-to-section {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(196, 30, 58, 0.1));
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid rgba(196, 30, 58, 0.35);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.greeting-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8em;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.5;
    margin: 0;
}

.sender-highlight {
    color: #0d3d1f;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(13, 61, 31, 0.3);
}

.message-box {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(244, 229, 184, 0.15));
    border: 2px solid rgba(196, 30, 58, 0.35);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.main-message {
    font-size: 1.3em;
    font-weight: 600;
    color: #0d3d1f;
    margin-bottom: 15px;
    line-height: 1.5;
}

.sub-message {
    font-size: 1.25em;
    color: #2d2d2d;
    font-style: italic;
    line-height: 1.6;
}

/* Persoonlijke boodschap sectie */
.personal-section {
    margin: 30px 0;
}

.personal-message {
    margin-top: 0;
    opacity: 1;
    animation: fadeInMessage 0.8s ease-in;
}

.message-content {
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.08), rgba(212, 175, 55, 0.08));
    border: 2px solid rgba(196, 30, 58, 0.3);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15),
                inset 0 0 20px rgba(255, 215, 0, 0.1);
}

.message-content::before {
    content: '💌';
    font-size: 2em;
    display: block;
    text-align: center;
    margin-bottom: 15px;
}

.message-content p {
    font-size: 1.15em;
    color: #1a1a1a;
    line-height: 1.8;
    white-space: pre-wrap;
    font-style: italic;
}

@keyframes fadeInMessage {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Knop om create sectie te tonen */
.show-create-btn-container {
    margin: 30px 0;
    text-align: center;
}

.btn-show-create {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.1em;
    font-weight: 600;
    padding: 15px 35px;
    border: 2px solid rgba(196, 30, 58, 0.4);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(244, 229, 184, 0.1));
    color: #0d3d1f;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-show-create:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(244, 229, 184, 0.2));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

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

/* Maak groet sectie */
.create-section {
    background: rgba(26, 77, 46, 0.05);
    border: 2px dashed rgba(196, 30, 58, 0.4);
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding: 0 25px;
    }
    to {
        opacity: 1;
        max-height: 1000px;
        padding: 25px;
    }
}

.create-section h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8em;
    color: #0d3d1f;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    font-size: 1em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(26, 77, 46, 0.3);
    border-radius: 8px;
    font-family: 'Quicksand', sans-serif;
    font-size: 1em;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a4d2e;
    box-shadow: 0 0 10px rgba(26, 77, 46, 0.2);
}

/* Knoppen */
.btn-create,
.btn-share {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.1em;
    font-weight: 600;
    padding: 15px 35px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin: 10px 5px;
}

.btn-create {
    background: linear-gradient(135deg, #1a4d2e, #2d5f3f);
    color: white;
    width: 100%;
}

.btn-create:hover {
    background: linear-gradient(135deg, #2d5f3f, #1a4d2e);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 77, 46, 0.4);
}

.btn-share {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
}

.btn-share:hover {
    background: linear-gradient(135deg, #128C7E, #25D366);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-create:active,
.btn-share:active {
    transform: translateY(0);
}

/* Share sectie */
.share-section {
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .card {
        padding: 30px 20px;
    }

    .greeting-title {
        font-size: 1.4em;
    }

    .main-message {
        font-size: 1.1em;
    }

    .sub-message {
        font-size: 1em;
    }

    .decoration, .decoration-bottom {
        font-size: 1.5em;
    }

    .music-btn {
        width: 45px;
        height: 45px;
        font-size: 1em;
    }

    .music-control {
        top: 10px;
        right: 10px;
    }

    .create-section h2 {
        font-size: 1.5em;
    }

    .btn-create,
    .btn-share {
        padding: 12px 25px;
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .greeting-title {
        font-size: 1.2em;
    }

    .snowflake {
        font-size: 1.2em;
    }
}