@font-face {
    font-family: 'KZ Sign Painter';
    src: url('KZ_Sign Painter_kz.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

* {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    font-family: 'KZ Sign Painter', serif;
    color: #fff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Music control button */
.music-control-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(45, 80, 22, 0.9);
    border: 2px solid #2d5016;
    color: #fff;
    font-size: 1.2em;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.music-control-btn:hover {
    background: rgba(45, 80, 22, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.music-control-btn:active {
    transform: scale(0.95);
}

.music-icon {
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1;
}

.music-control-btn.playing .music-icon::before {
    content: '⏸';
}

.music-control-btn:not(.playing) .music-icon::before {
    content: '▶';
}

/* Common Section Styles */
section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 40px 20px;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
}

.content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 500px;
    padding: 20px;
    padding-top: 0px;
}

.hero-section .content {
    min-height: 300px;
    height: 300px;
    position: relative;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Hero Section with video1.mp4 */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: cover;
}

.hero-section .overlay {
    background: transparent;
}

.main-title {
    font-family: 'KZ Sign Painter', serif;
    font-size: 4em;
    font-weight: normal;
    margin-bottom: 30px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    letter-spacing: 2px;
}

.case1, .case2 {
    position: absolute;
    width: 100%;
    left: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease-in-out;
    margin: 0;
}

.case1 {
    top: 20%;
}

.case {
    top: 0%;
}

.case1.active, .case2.active {
    opacity: 1;
    pointer-events: auto;
    position: absolute;
}

.age-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.95);
    color: #764ba2;
    padding: 20px 50px;
    border-radius: 50px;
    font-family: 'KZ Sign Painter', serif;
    font-size: 2.8em;
    font-weight: normal;
    letter-spacing: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-top: 20px;
}

.scroll-indicator {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-indicator:hover {
    transform: translateX(-50%) translateY(-5px);
    opacity: 1;
}

.scroll-indicator:active {
    transform: translateX(-50%) translateY(0);
}

.scroll-indicator span {
    font-size: 2em;
    color: #ffd700;
    display: block;
    transition: color 0.3s ease;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.6);
}

.scroll-indicator:hover span {
    color: #ffed4e;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 1), 0 0 15px rgba(0, 0, 0, 0.8);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}


/* Invitation Section with 2.jpg */
.invitation-section {
    background-image: url('2.jpg');
}

.invitation-section .overlay {
    background: transparent;
}

/* Invitation Section 2 with 4.jpg */
.invitation-section-2 {
    background-image: url('5.jpg');
}

.invitation-section-2 .overlay {
    background: transparent;
}

.invitation-text {
    line-height: 1.3;
}

/* Green text for invitation sections */
.invitation-section .greeting,
.invitation-section-2 .greeting {
    color: #2d5016;
    font-size: 2em;
    margin: 8px 0;
    text-shadow: 2px 2px 8px rgba(255, 255, 255, 0.8), 0 0 10px rgba(255, 255, 255, 0.5);
}

.greeting, .name, .event-type, .event-name, .invitation-end, .call {
    font-family: 'KZ Sign Painter', serif;
    font-size: 2em;
    margin: 15px 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    font-weight: normal;
    letter-spacing: 0.5px;
}

.name {
    font-family: 'KZ Sign Painter', serif;
    font-size: 3em;
    color: #ffd700;
    font-weight: normal;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
}

.call {
    font-family: 'KZ Sign Painter', serif;
    font-size: 2.2em;
    color: #ffd700;
    font-weight: normal;
    margin-top: 30px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
}

/* Date Section with 3.jpg */
.date-section {
    background-image: url('4.jpg');
    background-color: #764ba2;
}

.date-section .overlay {
    background: transparent;
}

.date-time {
    margin-bottom: 10px;
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.date {
    font-size: 2.8em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #2d5016;
}

.time {
    font-size: 1.8em;
    font-weight: 500;
    color: #2d5016;
}

.location {
    margin-bottom: 10px;
    padding: 30px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.location h2 {
    font-family: 'KZ Sign Painter', serif;
    font-size: 1.8em;
    font-weight: normal;
    margin-bottom: 20px;
    color: #2d5016;
    letter-spacing: 1px;
}

.city, .address, .venue {
    font-size: 1.3em;
    margin: 12px 0;
    color: #2d5016;
}

.owners {
    font-size: 1.4em;
    margin: 12px 0;
    color: #2d5016;
}

.venue {
    font-weight: bold;
    font-size: 1.6em;
    color: #ffd700;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
}

.gis-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 25px;
    background: #2d5016;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.1em;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(45, 80, 22, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.gis-button:hover {
    background: #1f3a0f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 80, 22, 0.6);
}

.gis-button:active {
    transform: translateY(0);
}

.gis-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.gis-button span {
    font-size: 1.1em;
}


.countdown-section h2 {
    font-family: 'KZ Sign Painter', serif;
    font-size: 1.8em;
    font-weight: normal;
    margin-bottom: 20px;
    color: #2d5016;
    letter-spacing: 1px;
}

.countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 100%;
    margin: 0 auto;
    color: #2d5016;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 10px 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
    min-width: 60px;
}

.countdown-number {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 4px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.countdown-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    line-height: 1;
}

/* Program Section with 4.jpg */
.program-section {
    background-image: url('4.jpg');
    background-color: #667eea;
}

.program-section .overlay {
    background: transparent;
}

.dress-code {
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.dress-code h2 {
    font-family: 'KZ Sign Painter', serif;
    font-size: 1.8em;
    font-weight: normal;
    margin-bottom: 25px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.dress-code-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dress-code-item {
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dress-code-item h3 {
    font-family: 'KZ Sign Painter', serif;
    font-size: 1.5em;
    font-weight: normal;
    margin-bottom: 10px;
    color: #ffd700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

.dress-code-item p {
    font-size: 1.2em;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.program {
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.program h2 {
    font-family: 'KZ Sign Painter', serif;
    font-size: 1.8em;
    font-weight: normal;
    margin-bottom: 25px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.program-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.program-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 15px;
    font-weight: 500;
    font-size: 1.1em;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, background 0.3s ease;
}

.program-item:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

.signature {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.signature p {
    font-family: 'KZ Sign Painter', serif;
    font-size: 2em;
    font-weight: normal;
    color: #ffd700;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    section {
        background-attachment: scroll;
        min-height: 100vh;
        padding: 30px 15px;
    }

    .main-title {
        font-size: 3em;
    }

    .age-badge {
        font-size: 2em;
        padding: 15px 35px;
    }

    .greeting, .guests-group, .event-type, .event-name, .invitation-end, .call {
        font-size: 2em;
    }

    .name-label, .guests-group, .confirmation-group {
        font-size: 1.2em;
    }

    .call {
        font-size: 2em;
    }

    .date {
        font-size: 2em;
    }

    .time {
        font-size: 2em;
    }

    .countdown {
        gap: 8px;
    }

    .countdown-item {
        padding: 8px 12px;
        min-width: 50px;
    }

    .countdown-number {
        font-size: 2em;
    }

    .countdown-label {
        font-size: 0.65em;
    }

    .program-items {
        grid-template-columns: 1fr;
    }

    .program-item {
        font-size: 1em;
    }
}

/* Landscape orientation */
@media (max-height: 500px) and (orientation: landscape) {
    section {
        min-height: auto;
        padding: 20px;
    }

    .main-title {
        font-size: 2em;
    }

    .age-badge {
        font-size: 1.5em;
        padding: 10px 25px;
    }
}

/* Form Section with 3.jpg */
.form-section {
    background-image: url('3.jpg');
    background-color: #764ba2;
}

.form-section .overlay {
    background: transparent;
}

.form-title {
    font-family: 'KZ Sign Painter', serif;
    font-size: 2.5em;
    font-weight: normal;
    margin-bottom: 30px;
    color: #2d5016;
    text-shadow: 3px 3px 12px rgba(138, 170, 152, 0.9), 0 0 10px rgba(0, 0, 0, 0.7);
    text-align: center;
}

.rsvp-form {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-family: 'KZ Sign Painter', serif;
    font-size: 1.3em;
    color: #2d5016;
    margin-bottom: 10px;
    font-weight: normal;
}

.hint {
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.85em;
    color: #5a7a4a;
    margin-bottom: 8px;
    font-style: italic;
    line-height: 1.4;
    padding: 8px 12px;
    background: rgba(45, 80, 22, 0.1);
    border-left: 3px solid #2d5016;
    border-radius: 5px;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #2d5016;
    border-radius: 10px;
    font-size: 1.1em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    background: #fff;
    box-sizing: border-box;
}

.form-group input[type="text"]::placeholder {
    color: #999;
}

.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: 'KZ Sign Painter', serif;
    font-size: 1.2em;
    color: #2d5016;
}

.radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #2d5016;
}

.guests-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.counter-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #2d5016;
    background: #2d5016;
    color: #fff;
    border-radius: 50%;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.counter-btn:active {
    transform: scale(0.95);
    background: #1f3a0f;
}

.counter-btn:hover:not(:disabled) {
    background: #1f3a0f;
}

.counter-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #5a7a4a;
}

.guests-counter input[type="number"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.guests-counter input[type="number"] {
    width: 80px;
    padding: 12px;
    border: 2px solid #2d5016;
    border-radius: 10px;
    font-size: 1.3em;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: bold;
    color: #2d5016;
    background: #fff;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: #2d5016;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'KZ Sign Painter', serif;
    font-size: 1.5em;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    background: #1f3a0f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 80, 22, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .rsvp-form {
        padding: 20px;
    }

    .form-title {
        font-size: 2em;
    }

    .form-group label {
        font-size: 1.1em;
    }

    .hint {
        font-size: 0.8em;
        padding: 6px 10px;
    }

    .counter-btn {
        width: 40px;
        height: 40px;
        font-size: 1.3em;
    }

    .guests-counter input[type="number"] {
        width: 70px;
        font-size: 1.2em;
    }

    .music-control-btn {
        width: 45px;
        height: 45px;
        top: 15px;
        right: 15px;
        font-size: 1em;
    }
}

/* Desktop styles - larger fonts */
@media (min-width: 769px) {
    .main-title {
        font-size: 5em;
    }

    .age-badge {
        font-size: 3.5em;
        padding: 25px 60px;
    }

    .greeting, .name, .event-type, .event-name, .invitation-end, .call {
        font-size: 2em;
    }

    .name {
        font-size: 4em;
    }

    .call {
        font-size: 2.8em;
    }

    .invitation-section .greeting,
    .invitation-section-2 .greeting {
        font-size: 2.2em;
    }

    .date {
        font-size: 2.8em;
    }

    .time {
        font-size: 2.2em;
    }

    .location h2,
    .countdown-section h2,
    .dress-code h2,
    .program h2 {
        font-size: 2.5em;
    }

    .city, .address, .venue {
        font-size: 1.6em;
    }

    .venue {
        font-size: 1.8em;
    }

    .countdown-number {
        font-size: 2em;
    }

    .countdown-label {
        font-size: 0.9em;
    }

    .form-title {
        font-size: 3em;
    }

    .form-group label {
        font-size: 1.6em;
    }

    .form-group input[type="text"] {
        font-size: 1.3em;
        padding: 15px 20px;
    }

    .radio-label {
        font-size: 1.4em;
    }

    .dress-code-item h3 {
        font-size: 1.8em;
    }

    .dress-code-item p {
        font-size: 1.4em;
    }

    .program-item {
        font-size: 1.3em;
        padding: 18px 30px;
    }

    .signature p {
        font-size: 2.5em;
    }

    .submit-btn {
        font-size: 1.8em;
        padding: 18px;
    }

    .hint {
        font-size: 1em;
    }
}
