@font-face {
    font-family: "Bubble";
    src: url("fonts/BubbleGum.ttf");
}

/* =========================
   COLORS
========================= */
:root {
    --bg: #F5EEDD;
    --blue: #84B3CE;
    --soda-blue: #72B8DF;
    --dark: #16587B;
    --cherry: #FF2E5B;
    --white: #ffffff;
    --hover-ocean: #0E3B52;
}

/* =========================
   RESET
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    font-family: "Inter", sans-serif;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* =========================
   DARK MODE BUTTON
========================= */
#theme-toggle {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    border: none;
    border-radius: 50%;
    background: var(--dark);
    color: white;
    cursor: pointer;
    font-size: 20px;
    transition: .3s;
    z-index: 100;
}

#theme-toggle:hover {
    transform: scale(1.08);
    background: var(--hover-ocean);
}

/* =========================
   NỀN SÓNG SODA & CHERRY DÍNH THEO SÓNG
========================= */
.soda-ocean {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 400px;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.soda-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background-repeat: repeat-x;
    background-position: 0 bottom;
}

/* Lớp sóng đằng sau */
.wave-back {
    height: 360px;
    opacity: 0.5;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><defs><linearGradient id="gradBack" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" style="stop-color:%2372B8DF;stop-opacity:0.85" /><stop offset="100%" style="stop-color:%2384B3CE;stop-opacity:0.15" /></linearGradient></defs><path d="M0,60 Q300,20 600,60 T1200,60 L1200,120 L0,120 Z" fill="url(%23gradBack)"></path></svg>');
    background-size: 1200px 360px;
    filter: blur(5px);
    animation: gentleWave 11s ease-in-out infinite alternate;
}

/* Lớp sóng đằng trước */
.wave-front {
    height: 300px;
    opacity: 0.7;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><defs><linearGradient id="gradFront" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" style="stop-color:%2384B3CE;stop-opacity:0.9" /><stop offset="100%" style="stop-color:%2316587B;stop-opacity:0.25" /></linearGradient></defs><path d="M0,50 Q300,90 600,50 T1200,50 L1200,120 L0,120 Z" fill="url(%23gradFront)"></path></svg>');
    background-size: 1000px 300px;
    filter: blur(2.5px);
    animation: gentleWave 11s ease-in-out infinite alternate-reverse;
}

/* Khung bọc Cherry */
.cherry-wrapper {
    position: absolute;
    bottom: 180px;
    left: 5%;
    z-index: 2;
    animation: gentleWave 11s ease-in-out infinite alternate-reverse;
}

/* Trái Cherry */
.soda-cherry {
    width: 135px;
    height: 135px;
    opacity: 0.92;
    filter: blur(0.5px) drop-shadow(0 8px 16px rgba(217, 4, 41, 0.4));
    animation: rockCherry 4s ease-in-out infinite alternate;
}

@keyframes gentleWave {
    0% { transform: translateX(0) translateY(12px); }
    100% { transform: translateX(-15%) translateY(-14px); }
}

@keyframes rockCherry {
    0% { transform: rotate(-14deg); }
    100% { transform: rotate(10deg); }
}

/* Bọt khí soda */
.soda-bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle, rgba(255,255,255,0.8) 2px, transparent 3px),
        radial-gradient(circle, rgba(255,255,255,0.6) 4px, transparent 5px),
        radial-gradient(circle, rgba(255,255,255,0.5) 3px, transparent 4px);
    background-size: 180px 180px, 250px 250px, 120px 120px;
    animation: riseBubbles 8s linear infinite;
    opacity: 0.75;
}

@keyframes riseBubbles {
    from { background-position: 0 0, 0 0, 0 0; }
    to { background-position: 0 -180px, 50px -250px, -30px -120px; }
}

/* =========================
   START SCREEN
========================= */
#start-screen {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: .5s;
    position: relative;
    z-index: 10;
}

.start-card {
    width: 760px;
    height: auto;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 40px;
    box-shadow: 0 20px 45px rgba(22, 88, 123, 0.1);
    padding: 45px 50px;
    transition: .35s;
}

.start-card:hover {
    transform: translateY(-5px);
}

.start-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    width: 100%;
}

.start-button-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: center;
}

.start-button-area h1 {
    font-family: "Bubble";
    color: var(--dark);
    font-size: 34px;
    letter-spacing: 1px;
    line-height: 1.3;
    max-width: 260px;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8);
}

.character img {
    width: 240px;
    height: auto;
    display: block;
}

#startBtn {
    font-family: "Bubble";
    width: 220px;
    height: 70px;
    border: none;
    border-radius: 999px;
    background: var(--dark);
    color: white;
    font-size: 26px;
    cursor: pointer;
    transition: .3s;
    box-shadow: 0 10px 25px rgba(22, 88, 123, .25);
}

#startBtn:hover {
    background: var(--hover-ocean);
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 12px 25px rgba(14, 59, 82, 0.35);
}

/* =========================
   WEBSITE
========================= */
#website {
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: .5s;
    position: relative;
    z-index: 10;
}

.window {
    width: 1100px;
    height: 650px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 35px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0,0,0,.08);
}

header {
    height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 45px;
    border-bottom: 1px solid #ececec;
}

/* Ảnh Logo thay thế cho chữ */
.site-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

nav {
    display: flex;
    gap: 35px;
}

nav a {
    font-family: "Bubble";
    text-decoration: none;
    color: var(--dark);
    font-size: 22px;
    transition: .3s;
    position: relative;
}

nav a.active {
    color: var(--hover-ocean);
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--dark);
    border-radius: 2px;
}

nav a:hover {
    color: var(--hover-ocean);
}

main {
    height: 470px;
    position: relative;
    overflow-y: auto; /* Cho phép cuộn nhẹ nếu nội dung dài */
}

.page {
    display: none;
    width: 100%;
    min-height: 100%;
    align-items: center;
    justify-content: center;
    padding: 20px 40px;
}

.page.active {
    display: flex;
}

/* --- TRANG CHỦ (HOME) STYLES --- */
.home-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    text-align: center;
}

.welcome-banner h2 {
    font-family: "Bubble";
    color: var(--dark);
    font-size: 32px;
    margin-bottom: 8px;
}

.welcome-banner p {
    color: #555;
    font-size: 15px;
}

.featured-section {
    width: 100%;
}

.featured-section h3 {
    font-family: "Bubble";
    color: var(--dark);
    font-size: 20px;
    margin-bottom: 15px;
}

.cards-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.feature-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(22, 88, 123, 0.15);
    border-radius: 20px;
    padding: 15px;
    width: 220px;
    text-align: left;
    transition: .3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(22, 88, 123, 0.1);
}

.feature-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 10px;
}

.feature-card h4 {
    font-family: "Bubble";
    color: var(--dark);
    font-size: 17px;
    margin-bottom: 5px;
}

.feature-card p {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.home-action {
    margin-top: 5px;
}

/* --- ABOUT & OTHER PAGES --- */
.hero-image img {
    width: 320px;
    border-radius: 25px;
}

.hero-text {
    width: 360px;
    margin-left: 40px;
}

.hero-text h2 {
    font-family: "Bubble";
    color: var(--dark);
    font-size: 52px;
    margin-bottom: 20px;
}

.hero-text p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 30px;
}

.simple-page-content {
    text-align: center;
}

.simple-page-content h2 {
    font-family: "Bubble";
    color: var(--dark);
    font-size: 45px;
    margin-bottom: 15px;
}

.explore {
    border: none;
    border-radius: 999px;
    background: var(--dark);
    color: white;
    padding: 12px 30px;
    font-size: 15px;
    cursor: pointer;
    transition: .3s;
}

.explore:hover {
    background: var(--hover-ocean);
}

/* --- FOOTER & SOCIAL ICONS --- */
footer {
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 1px solid #ececec;
}

.social-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.social-icon {
    color: var(--dark);
    transition: .3s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.social-icon:hover {
    color: var(--hover-ocean);
    transform: translateY(-3px) scale(1.15);
}

/* =========================
   DARK MODE
========================= */
body,
.start-card,
.window,
#startBtn,
.explore,
header,
footer,
nav a,
.hero-text h2,
.hero-text p,
.welcome-banner h2,
.welcome-banner p,
.featured-section h3,
.feature-card,
.feature-card h4,
.feature-card p,
.simple-page-content h2,
.social-icon {
    transition: .4s ease;
}

body.dark {
    background: #0D2235;
}

body.dark .wave-back { opacity: 0.35; }
body.dark .wave-front { opacity: 0.55; }
body.dark .soda-cherry { opacity: 0.85; }

body.dark .start-card {
    background: rgba(20, 48, 71, 0.75);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark .window {
    background: rgba(21, 50, 74, 0.9);
}

body.dark header {
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

body.dark footer {
    border-top: 1px solid rgba(255, 255, 255, .12);
}

body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark nav a,
body.dark .social-icon {
    color: #F5EEDD;
}

body.dark nav a.active::after {
    background: #F5EEDD;
}

body.dark p {
    color: #E5E5E5;
}

body.dark .feature-card {
    background: rgba(13, 34, 53, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark #startBtn,
body.dark .explore {
    background: var(--soda-blue);
    color: #0D2235;
}

body.dark #startBtn:hover,
body.dark .explore:hover {
    background: var(--white);
    color: #0D2235;
}

body.dark #theme-toggle {
    background: var(--soda-blue);
    color: #0D2235;
}