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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 500px;
    animation: slideIn 0.6s ease-out;
}

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

.card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

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

.heart {
    position: absolute;
    font-size: 30px;
    animation: float 3s ease-in-out infinite;
    opacity: 0.3;
}

.heart:nth-child(1) {
    left: 10%;
    top: -50px;
    animation-delay: 0s;
}

.heart:nth-child(2) {
    left: 30%;
    top: -50px;
    animation-delay: 0.5s;
}

.heart:nth-child(3) {
    left: 60%;
    top: -50px;
    animation-delay: 1s;
}

.heart:nth-child(4) {
    left: 80%;
    top: -50px;
    animation-delay: 1.5s;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(500px) rotate(360deg);
        opacity: 0;
    }
}

/* Content */
.content {
    text-align: center;
    position: relative;
    z-index: 2;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.content.hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
    position: absolute;
}

.title {
    font-size: 2.5rem;
    color: #764ba2;
    margin-bottom: 15px;
    font-weight: 800;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.subtitle {
    font-size: 1.2rem;
    color: #999;
    margin-bottom: 40px;
    font-weight: 300;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* Password Container */
.password-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.password-input {
    padding: 12px 20px;
    border: 2px solid #764ba2;
    border-radius: 10px;
    font-size: 1rem;
    text-align: center;
    letter-spacing: 1px;
    transition: border-color 0.3s ease;
}

.password-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.password-hint {
    font-size: 0.95rem;
    color: #e74c3c;
    margin-top: 10px;
    font-weight: 500;
    min-height: 24px;
}

.btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    min-width: 120px;
}

.btn-yes {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-yes:hover,
.btn-yes:active {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-no {
    background: #f0f0f0;
    color: #764ba2;
    position: relative;
}

.btn-no:hover {
    background: #e0e0e0;
}

/* Success State */
.title-success {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
    animation: bounce 0.6s ease;
}

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

.success-text {
    font-size: 1.3rem;
    color: #764ba2;
    margin-bottom: 30px;
    font-weight: 500;
}

.celebration {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.fact {
    font-size: 1.2rem;
    color: #764ba2;
    margin: 10px 0;
    font-weight: 500;
    animation: slideInFact 0.5s ease forwards;
    opacity: 0;
}

.fact:nth-child(1) {
    animation-delay: 0.2s;
}

.fact:nth-child(2) {
    animation-delay: 0.4s;
}

.fact:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes slideInFact {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.btn-restart {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-top: 20px;
}

.btn-restart:hover,
.btn-restart:active {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

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

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    animation: confettiFall 2.5s ease-out forwards;
}

@keyframes confettiFall {
    to {
        transform: translateY(500px) rotateZ(360deg);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .card {
        padding: 30px 20px;
        border-radius: 15px;
    }

    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .button-group {
        gap: 10px;
        margin-top: 25px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 1rem;
        min-width: 100px;
    }

    .title-success {
        font-size: 2.5rem;
    }

    .success-text {
        font-size: 1.1rem;
    }

    .fact {
        font-size: 1rem;
    }

    .celebration {
        padding: 20px;
    }

    body {
        padding: 15px;
    }

    .heart {
        font-size: 24px;
    }
}

/* Photo Container */
.photo-container {
    margin: 30px 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.6s ease-out;
}

.special-photo {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 15px;
}

@media (max-width: 340px) {
    .card {
        padding: 25px 15px;
    }

    .title {
        font-size: 1.6rem;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .title-success {
        font-size: 2rem;
    }
}

/* Landscape Mode */
@media (max-height: 600px) and (orientation: landscape) {
    .card {
        padding: 20px 30px;
    }

    .title {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .subtitle {
        margin-bottom: 20px;
    }

    .button-group {
        margin-top: 15px;
    }
}
