:root {
    --bg-sky: linear-gradient(135deg, #e0f2fe 0%, #fef3c7 100%);
    --text-dark: #374151;
    --bubble-bg: #ffffff;
    --primary-color: #ff6b6b;
    --primary-hover: #ff5252;
    --shadow-color: rgba(74, 85, 104, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Quicksand', -apple-system, sans-serif;
}

body {
    background: var(--bg-sky);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    padding: 20px;
}

/* Đám mây trôi nổi phía sau */
.cloud {
    position: absolute;
    font-size: 5rem;
    opacity: 0.25;
    user-select: none;
    z-index: 1;
    pointer-events: none;
}

.cloud-1 {
    top: 10%;
    left: -10%;
    animation: drift 25s linear infinite;
}

.cloud-2 {
    top: 40%;
    right: -10%;
    animation: drift 35s linear infinite reverse;
    font-size: 7rem;
}

.cloud-3 {
    bottom: 15%;
    left: 15%;
    animation: drift 20s linear infinite;
    font-size: 4rem;
}

.cloud-4 {
    top: 20%;
    left: 50%;
    animation: bounceSlow 4s ease-in-out infinite;
    font-size: 6rem;
}

@keyframes drift {
    0% { transform: translateX(-100px); }
    100% { transform: translateX(110vw); }
}

/* Container chính */
.container {
    max-width: 580px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 10;
    animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Linh vật */
.mascot-container {
    position: relative;
    margin-bottom: 20px;
}

.cute-cloud {
    animation: bob 3s ease-in-out infinite;
}

.balloon {
    position: absolute;
    font-size: 2.5rem;
    top: -10px;
    right: -15px;
    animation: balloonFloat 4s ease-in-out infinite;
    transform-origin: bottom center;
}

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

@keyframes balloonFloat {
    0%, 100% { transform: translateY(0) rotate(5deg); }
    50% { transform: translateY(-8px) rotate(-5deg); }
}

/* Bong bóng lời thoại */
.speech-bubble {
    background: var(--bubble-bg);
    border: 4px solid var(--text-dark);
    border-radius: 30px;
    padding: 30px;
    position: relative;
    box-shadow: 0 12px 0 var(--shadow-color);
    margin-bottom: 35px;
    font-weight: 700;
}

/* Cái đuôi của bong bóng lời thoại */
.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 15px;
    border-style: solid;
    border-color: transparent transparent var(--text-dark) transparent;
}

.speech-bubble::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px;
    border-style: solid;
    border-color: transparent transparent var(--bubble-bg) transparent;
    z-index: 11;
}

.speech-bubble p {
    font-size: 1.4rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.speech-bubble p:last-child {
    margin-bottom: 0;
}

.speech-bubble p strong {
    color: #ff6b6b;
    font-size: 1.5rem;
}

.speech-bubble .main-msg {
    font-size: 1.15rem;
    color: #4b5563;
    font-weight: 500;
}

/* Nút bấm tưng tưng */
.btn-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.btn-goto {
    display: inline-block;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    padding: 16px 30px;
    border-radius: 50px;
    border: 4px solid var(--text-dark);
    box-shadow: 0 8px 0 var(--text-dark);
    transition: all 0.15s ease;
    animation: bounce 2s infinite;
}

.btn-pdf {
    background: #ff6b6b;
}

.btn-pdf:hover {
    background: #ff5252;
    transform: translateY(2px);
    box-shadow: 0 6px 0 var(--text-dark);
    animation-play-state: paused;
}

.btn-qr {
    background: #8b5cf6;
    animation-delay: 0.3s; /* Tạo nhịp nhảy so le */
}

.btn-qr:hover {
    background: #7c3aed;
    transform: translateY(2px);
    box-shadow: 0 6px 0 var(--text-dark);
    animation-play-state: paused;
}

.btn-qr-adv {
    background: #f59e0b;
    animation-delay: 0.6s; /* Tạo nhịp nhảy so le làn sóng thứ 3 */
}

.btn-qr-adv:hover {
    background: #d97706;
    transform: translateY(2px);
    box-shadow: 0 6px 0 var(--text-dark);
    animation-play-state: paused;
}

.btn-goto:active {
    transform: translateY(6px) !important;
    box-shadow: 0 2px 0 var(--text-dark) !important;
}

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

.footer-hint {
    margin-top: 30px;
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

/* Hi ứng bong bóng bay lên khi click chuột */
.click-emoji {
    position: absolute;
    pointer-events: none;
    font-size: 1.5rem;
    z-index: 99;
    animation: floatUp 1.2s ease-out forwards;
}

@keyframes floatUp {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -150px) scale(1.5) rotate(20deg);
        opacity: 0;
    }
}

/* Hiệu ứng load trang */
@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

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

/* Responsive */
@media (max-width: 480px) {
    .speech-bubble p {
        font-size: 1.15rem;
    }
    .speech-bubble p strong {
        font-size: 1.25rem;
    }
    .speech-bubble .main-msg {
        font-size: 1rem;
    }
    .btn-goto {
        font-size: 1.05rem;
        padding: 12px 24px;
    }
}

/* Thẻ tác giả ở góc dưới bên phải */
.author-tag {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    background: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    border: 3px solid var(--text-dark);
    box-shadow: 0 4px 0 var(--text-dark);
    z-index: 100;
    transition: all 0.2s ease;
    user-select: none;
}

.author-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--text-dark);
}

@media (max-width: 640px) {
    .author-tag {
        position: static;
        margin-top: 20px;
        display: inline-block;
        box-shadow: 0 4px 0 var(--text-dark);
    }
}
