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

body {
    font-family: 'Nunito', sans-serif;
    background-color: #fdfbf7;
    color: #4a3b32;
    height: 100vh;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.bg-pattern {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(#d4c3b3 2px, transparent 2px);
    background-size: 40px 40px;
    opacity: 0.3;
    z-index: 0;
}

.container {
    position: absolute;
    z-index: 10;
    width: 100%;
    display: flex;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: translateY(20px);
}

.container.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.card {
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(74, 59, 50, 0.1);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    border: 1px solid #f0e9e1;
    max-height: 90vh;
    overflow-y: auto;
}

.card::-webkit-scrollbar {
    width: 4px;
}
.card::-webkit-scrollbar-thumb {
    background: #d4c3b3;
    border-radius: 10px;
}

.title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: #8b5e3c;
    margin-bottom: 15px;
}

.subtitle {
    font-size: 1.1rem;
    color: #6d5a4d;
    margin-bottom: 25px;
    line-height: 1.6;
}

.fortune-text {
    font-size: 1.15rem;
    color: #4a3b32;
    margin-bottom: 25px;
    line-height: 1.7;
    font-style: italic;
    min-height: 120px;
    transition: opacity 0.3s ease;
}

.cup-container {
    font-size: 6rem;
    margin: 20px 0;
    animation: float 3s ease-in-out infinite;
}

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

.btn {
    border: none;
    padding: 14px 32px;
    border-radius: 30px;
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 94, 60, 0.2);
    outline: none;
    white-space: nowrap;
}

.btn-primary {
    background: #8b5e3c;
    color: #fff;
}

.btn-primary:hover {
    background: #704b30;
    transform: translateY(-2px);
}

.btn-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    position: relative;
    height: 50px;
}

.btn-yes {
    background: #8b5e3c;
    color: white;
    z-index: 2;
}

.btn-yes:hover {
    transform: scale(1.05);
    background: #704b30;
}

.btn-no {
    background: #e2d7cc;
    color: #4a3b32;
    z-index: 3;
    box-shadow: none;
}

.hidden {
    display: none !important;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f0e9e1;
    border-top: 5px solid #8b5e3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.coffee-bean {
    position: fixed;
    font-size: 1.5rem;
    pointer-events: none;
    z-index: 20;
    animation: floatParticle linear forwards;
}

@keyframes floatParticle {
    to {
        transform: translateY(-120vh) rotate(360deg);
        opacity: 0;
    }
}

@media screen and (max-width: 480px) {
    .card {
        padding: 25px 20px;
        width: 85%;
    }
    
    .title {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    
    .subtitle {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .fortune-text {
        font-size: 1.05rem;
        min-height: 100px;
    }
    
    .cup-container {
        font-size: 4rem;
        margin: 15px 0;
    }

    .btn {
        padding: 12px 28px;
        font-size: 1rem;
    }
    
    .btn-group {
        gap: 10px;
    }
}
