@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap');

:root {
    --primary: #f36d21;
    --secondary: #1a7fa0;
    --accent: #f8b400;
    --text: #333;
    --glass: rgba(255, 255, 255, 0.98);
}

html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
}

body {
    font-family: 'Quicksand', sans-serif;
    background: #a2b6bd;
    min-height: 100vh;
}

/* Music Toggle */
.music-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: var(--glass);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5em;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Layout */
.home-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.hero-image {
    width: 100%;
    display: block;
    position: relative; /* For scroll indicator */
}

.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 2em;
    cursor: pointer;
    animation: bounce 2s infinite;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    z-index: 5;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);}
    40% {transform: translateX(-50%) translateY(-10px);}
    60% {transform: translateX(-50%) translateY(-5px);}
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Home Content */
.home-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1px 20px 50px; /* Added bottom padding */
    text-align: center;
    color: white;
}

.guest-counter {
    margin-bottom: 30px;
}

.count-tag {
    background: var(--accent);
    color: #000;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    font-size: 1.2em;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1.1em;
    margin: 10px 5px;
}

.btn-lg {
    padding: 20px 45px;
    font-size: 1.4em;
    box-shadow: 0 10px 30px rgba(243, 109, 33, 0.4);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

/* Pulse Animation */
.pulse {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(243, 109, 33, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(243, 109, 33, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(243, 109, 33, 0);
    }
}

/* MODAL */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-container {
    background: var(--glass);
    width: 85%;
    max-width: 420px;
    min-width: 300px;
    border-radius: 30px;
    position: relative;
    min-height: 280px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    padding: 45px 25px 35px;
    margin: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 35px;
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    line-height: 1;
}

/* Selector Grid */
.selector-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 25px 0;
}

.selector-btn {
    padding: 16px;
    background: #f8f9fa;
    border: 2px solid #eee;
    border-radius: 15px;
    font-size: 1.3em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--secondary);
}

.selector-btn:hover {
    border-color: var(--secondary);
    transform: scale(1.05);
}

.selector-btn.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

/* Dynamic Names Overlay */
.name-fields {
    text-align: left;
    margin: 10px 0 20px;
}

.guest-input-group {
    margin-bottom: 15px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-15px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.guest-input-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: #555;
}

.guest-input-group input {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #ddd;
    box-sizing: border-box;
    font-size: 1em;
    font-family: inherit;
}

.guest-input-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(243, 109, 33, 0.1);
}

/* Helper classes */
.hidden {
    display: none !important;
}

.form-content {
    text-align: center;
}

h1,
h2 {
    margin: 0 0 15px;
    font-weight: 800;
}

h1 {
    font-size: 1.8em;
    color: var(--primary);
}

h2 {
    font-size: 1.4em;
    color: var(--secondary);
}

.step {
    display: none;
}

.step.active {
    display: block;
    animation: stepEnter 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes stepEnter {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.nav-btns {
    margin-top: 20px;
}

/* Responsive adjustments */
/* Entrance Overlay */
#invitation-cover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #8aa6b0;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
}

#invitation-cover.opened {
    transform: translateY(-100%);
}

.cover-content {
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.cover-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px 20px;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.cover-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.cover-card h1 {
    color: var(--secondary);
    margin-bottom: 10px;
}

.cover-card p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* Share Buttons */
.share-buttons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.share-buttons a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.2em;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.share-buttons .whatsapp {
    background: #25d366;
}

.share-buttons .viber {
    background: #7360f2;
}

.share-buttons .copylink {
    background: #666;
}

.share-buttons a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.modal-copy {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9em;
    display: none;
    z-index: 1000;
}

/* Mobile Fixes */
@media (max-width: 480px) {
    .home-wrapper {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        border-radius: 0;
        box-shadow: none;
    }

    .home-content {
        padding-top: 5px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .btn-lg {
        padding: 12px 25px !important;
        font-size: 1.1em !important;
        width: 100% !important;
        max-width: 280px;
        margin: 10px auto;
        box-sizing: border-box;
    }

    .hero-image {
        max-height: none !important;
        width: 100%;
    }

    .hero-image img {
        width: 100%;
        height: auto;
    }

    .modal-container {
        width: 92%;
        padding: 35px 15px 25px;
        border-radius: 25px;
    }

    .count-tag {
        font-size: 1em;
        padding: 10px 20px;
    }

    .selector-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .selector-btn {
        padding: 12px;
        font-size: 1.1em;
    }

    .cover-card {
        padding: 30px 15px;
    }
}