* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #172026;
    background: #f3f5f7;
    font-family: Arial, "Noto Sans TC", sans-serif;
}

.shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 32px;
}

.panel {
    width: min(100%, 1240px);
    padding: 40px;
    border: 1px solid #d9e0e7;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(23, 32, 38, 0.08);
}

.eyebrow {
    margin: 0 0 12px;
    color: #006d77;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
}

h1 {
    margin: 0;
    font-size: clamp(36px, 8vw, 64px);
    line-height: 1;
}

.lead {
    margin: 20px 0 28px;
    color: #4c5a63;
    font-size: 18px;
    line-height: 1.6;
}

/* === Cute Theme Body & Global Navigation === */
body.cute-theme-body {
    margin: 0;
    min-height: 100vh;
    color: #1e293b;
    background: linear-gradient(135deg, #fff7ed 0%, #fdf2f8 50%, #f0fdf4 100%);
    background-attachment: fixed;
    font-family: 'Nunito', 'Noto Sans TC', Arial, sans-serif;
    transition: padding 0.3s ease;
}

/* Cute Navbar Toggle Button (Top-Left floating / sticky) */
.cute-nav-toggle-btn {
    position: fixed;
    top: 10px;
    left: 12px;
    z-index: 1050;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 2px solid #fdba74;
    background: #ffffff;
    color: #ea580c;
    font-size: 13px;
    font-weight: 800;
    font-family: 'Nunito', 'Noto Sans TC', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(251, 146, 60, 0.2);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    outline: none;
}

.cute-nav-toggle-btn:hover {
    transform: translateY(-2px) scale(1.05);
    background: #fff7ed;
    border-color: #fb923c;
    box-shadow: 0 6px 18px rgba(251, 146, 60, 0.3);
}

.cute-nav-toggle-btn:active {
    transform: translateY(1px) scale(0.96);
}

.cute-nav-toggle-btn .nav-toggle-icon {
    font-size: 12px;
    line-height: 1;
    display: inline-block;
    transition: transform 0.25s ease;
}

.cute-nav-toggle-btn .nav-toggle-text {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Collapsed Floating Pill at Top-Left */
.cute-nav-toggle-btn.is-collapsed,
body.nav-collapsed .cute-nav-toggle-btn {
    top: 8px;
    left: 8px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #fb923c 0%, #f43f5e 100%);
    color: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 4px 16px rgba(244, 63, 94, 0.38);
}

.cute-nav-toggle-btn.is-collapsed .nav-toggle-icon,
body.nav-collapsed .cute-nav-toggle-btn .nav-toggle-icon {
    font-size: 14px;
}

.cute-nav-toggle-btn.is-collapsed:hover,
body.nav-collapsed .cute-nav-toggle-btn:hover {
    background: linear-gradient(135deg, #f97316 0%, #e11d48 100%);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.5);
    transform: translateY(-2px) scale(1.08);
}

/* Navbar Wrapper */
.cute-navbar-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #fed7aa;
    box-shadow: 0 4px 16px rgba(251, 146, 60, 0.08);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, max-height 0.3s ease;
    max-height: 140px;
    overflow: visible;
}

.cute-navbar-wrapper.is-collapsed {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    max-height: 0;
    margin: 0;
    padding: 0;
    border-bottom-color: transparent;
    box-shadow: none;
}

.cute-nav-menu {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px 10px 92px; /* Space on left for toggle button */
    display: flex;
    align-items: center;
    gap: 16px;
    transition: padding 0.2s ease;
}

.nav-brand-wrap {
    display: flex;
    align-items: center;
}

.nav-brand-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.nav-brand-link:hover {
    transform: scale(1.03);
}

.nav-brand-icon {
    font-size: 24px;
}

.nav-brand-text {
    font-size: 19px;
    font-weight: 800;
    color: #1e293b;
    font-family: 'Fredoka', 'Nunito', sans-serif;
}

.nav-brand-tag {
    background: linear-gradient(135deg, #fb923c, #f43f5e);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
}

.nav-link-item {
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    padding: 6px 12px;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.nav-link-item:hover {
    background: #fff7ed;
    color: #ea580c;
}

.nav-user-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-pill-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff7ed;
    border: 1.5px solid #fed7aa;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    color: #475569;
}

.user-avatar-dot {
    font-size: 15px;
}

.user-greeting strong {
    color: #ea580c;
}

.nav-btn-sub {
    font-size: 13px;
    color: #64748b;
}

.nav-btn-logout {
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    color: #dc2626;
    background: #fee2e2;
    padding: 5px 12px;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.nav-btn-logout:hover {
    background: #fecaca;
    color: #b91c1c;
}

.nav-btn-login {
    font-size: 13px !important;
    padding: 6px 16px !important;
}

.cute-main-content {
    min-height: calc(100vh - 70px);
    transition: min-height 0.3s ease;
}

body.nav-collapsed .cute-main-content {
    min-height: 100vh;
}

@media (max-width: 860px) {
    .cute-nav-menu {
        padding: 8px 14px 8px 84px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .cute-nav-toggle-btn {
        top: 8px;
        left: 8px;
        padding: 5px 10px;
        font-size: 12px;
    }
    .nav-brand-text {
        font-size: 16px;
    }
    .nav-brand-tag {
        display: none;
    }
    .nav-links-wrap {
        margin-left: 0;
        gap: 4px;
    }
    .nav-link-item {
        font-size: 12px;
        padding: 4px 8px;
    }
    .user-pill-badge {
        padding: 3px 8px;
        font-size: 12px;
    }
}

/* === Cute OOXX Game Styles === */
.panel-game {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.panel-game h1 {
    font-size: 26px;
    line-height: 1.3;
    margin: 8px 0 6px;
    color: #1e293b;
}

.panel-game .lead {
    font-size: 14px;
    margin: 0 0 16px;
    color: #64748b;
}

.game-header-badge {
    margin-bottom: 6px;
}

.game-container {
    text-align: center;
    margin-top: 10px;
}

/* Match Players Card */
.match-info-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #ffffff;
    border: 2px solid #fed7aa;
    border-radius: 20px;
    padding: 10px 18px;
    margin: 10px auto 14px;
    max-width: 380px;
    box-shadow: 0 8px 20px rgba(251, 146, 60, 0.08);
}

.player-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.player-pill.player-me {
    justify-content: flex-start;
}

.player-pill.player-opp {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.player-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    flex-shrink: 0;
}

.player-meta {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.player-pill.player-opp .player-meta {
    text-align: right;
}

.player-role {
    font-size: 11px;
    color: #94a3b8;
    font-weight: bold;
}

.player-symbol, .player-name {
    font-size: 15px;
    font-weight: 800;
    color: #1e293b;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-vs-badge {
    background: linear-gradient(135deg, #ff6b8b 0%, #ff8e53 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(255, 107, 139, 0.3);
    letter-spacing: 1px;
}

/* Turn Status Card */
.turn-status-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 14px;
    transition: all 0.3s ease;
}

.turn-status-card.turn-my {
    background: #ecfdf5;
    color: #059669;
    border: 2px solid #a7f3d0;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
    animation: cuteGlow 2s infinite ease-in-out;
}

.turn-status-card.turn-opp {
    background: #f5f3ff;
    color: #7c3aed;
    border: 2px solid #ddd6fe;
}

.turn-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* Cute Board Wrapper & Grid */
.cute-board-wrapper {
    display: inline-block;
    padding: 14px;
    background: linear-gradient(135deg, #fdf2f8 0%, #faf5ff 50%, #eff6ff 100%);
    border: 2px solid #fbcfe8;
    border-radius: 28px;
    box-shadow: 0 16px 36px rgba(236, 72, 153, 0.1), 0 4px 12px rgba(0, 0, 0, 0.04);
    margin: 4px auto 14px;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 86px);
    grid-template-rows: repeat(3, 86px);
    gap: 10px;
    justify-content: center;
    position: relative;
    width: 278px;
    height: 278px;
    background: #ffffff;
    padding: 12px;
    border-radius: 20px;
    border: 2px solid #ede9fe;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.08);
}

.cell {
    width: 86px;
    height: 86px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    padding: 8px;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cell:hover:not([data-val="O"]):not([data-val="X"]) {
    background: #fdf2f8;
    border-color: #f472b6;
    transform: scale(1.06);
    box-shadow: 0 6px 16px rgba(244, 114, 182, 0.25);
}

.cell:active:not([data-val="O"]):not([data-val="X"]) {
    transform: scale(0.96);
}

.cell[data-val="O"], .cell[data-val="X"] {
    cursor: default;
    background: #ffffff;
}

.cell.win {
    background: #fef9c3 !important;
    border-color: #facc15 !important;
    box-shadow: 0 0 16px rgba(250, 204, 21, 0.5) !important;
    animation: cutePulse 1.2s infinite ease-in-out;
}

/* Symbol SVGs */
.symbol-svg {
    width: 100%;
    height: 100%;
    animation: symbolPopIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes symbolPopIn {
    0% {
        transform: scale(0) rotate(-20deg);
        opacity: 0;
    }
    70% {
        transform: scale(1.15) rotate(4deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Win SVG & Animated Strike Line */
.win-svg {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 278px;
    height: 278px;
    pointer-events: none;
    z-index: 10;
}

.win-line-animated {
    animation: winDash 1s linear infinite;
    filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.5));
}

@keyframes winDash {
    to {
        stroke-dashoffset: -32;
    }
}

/* Cute Lobby View */
.cute-lobby-view {
    margin: 16px auto;
    max-width: 420px;
}

.lobby-card {
    background: linear-gradient(135deg, #fff1f2 0%, #faf5ff 50%, #eff6ff 100%);
    border: 2px solid #fbcfe8;
    border-radius: 24px;
    padding: 26px 20px;
    box-shadow: 0 12px 30px rgba(236, 72, 153, 0.08);
}

.lobby-mascot-box {
    width: 130px;
    height: 85px;
    margin: 0 auto 12px;
    animation: cuteFloating 3s ease-in-out infinite;
}

.lobby-mascot-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lobby-title {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 6px;
}

.loader-cute {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 14px 0;
}

.loader-cute span {
    width: 10px;
    height: 10px;
    background: #f43f5e;
    border-radius: 50%;
    animation: cuteBounce 1.4s infinite ease-in-out both;
}

.loader-cute span:nth-child(1) { animation-delay: -0.32s; }
.loader-cute span:nth-child(2) { animation-delay: -0.16s; }

@keyframes cuteBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

@keyframes cuteGlow {
    0%, 100% { box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15); }
    50% { box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35); }
}

/* Cute Result View */
.cute-result-view {
    display: none;
    margin-top: 16px;
}

.result-card {
    background: #ffffff;
    border: 2px solid #fed7aa;
    border-radius: 24px;
    padding: 24px 20px;
    max-width: 380px;
    margin: 0 auto;
    box-shadow: 0 12px 30px rgba(251, 146, 60, 0.12);
    animation: resultPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes resultPopIn {
    from {
        transform: scale(0.85);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.result-icon-badge {
    font-size: 42px;
    margin-bottom: 8px;
}

.result-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 14px;
}

.result-title.result-win { color: #059669; }
.result-title.result-lose { color: #e11d48; }
.result-title.result-abort { color: #d97706; }
.result-title.result-draw { color: #475569; }

.status-msg { font-size: 14px; margin: 4px 0 6px; font-weight: bold; color: #475569; }
.abort-status-msg { color: #ea580c; font-size: 13px; margin-top: 8px; }
.actions-btn { margin-top: 10px; }
#play-view, #result-view { display: none; }

.button-cute-pill {
    border-radius: 999px !important;
    padding: 10px 24px !important;
    font-weight: 800 !important;
}

.button-sm {
    min-height: 34px !important;
    padding: 0 14px !important;
    font-size: 13px !important;
}

dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 0;
}

dl div {
    padding: 16px;
    border: 1px solid #d9e0e7;
    border-radius: 8px;
}

dt {
    margin-bottom: 6px;
    color: #65727c;
    font-size: 13px;
}

dd {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.detail {
    margin: 8px 0 0;
    color: #65727c;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.status-ok {
    color: #147a3f;
}

.status-error {
    color: #b42318;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    background: #006d77;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.button:hover {
    background: #008b99;
}

.button:active {
    transform: translateY(1px);
}

/* 第2顆：次要按鈕 - 淺灰藍 */
.button-secondary {
    color: #1a2332;
    background: #e8edf3;
}
.button-secondary:hover {
    background: #d5dee9;
}

/* 第3顆：深海軍藍 */
.button-third {
    color: #ffffff;
    background: #1e3a5f;
}
.button-third:hover {
    background: #2a4f7a;
}

/* 第4顆：翡翠綠 */
.button-fourth {
    color: #ffffff;
    background: #0d7c4f;
}
.button-fourth:hover {
    background: #14a064;
}

/* 第5顆：薄荷綠 */
.button-fifth {
    color: #1a2332;
    background: #6abf8a;
}
.button-fifth:hover {
    background: #7fd19e;
}

/* 第6顆：暖陽黃 */
.button-sixth {
    color: #1a2332;
    background: #f4b942;
}
.button-sixth:hover {
    background: #f7c95c;
}

/* 第7顆：珊瑚橘 */
.button-seventh {
    color: #ffffff;
    background: #e07040;
}
.button-seventh:hover {
    background: #e8855a;
}

/* 第8顆：玫瑰紅 */
.button-eighth {
    color: #ffffff;
    background: #c0395a;
}
.button-eighth:hover {
    background: #d94a6e;
}

/* 第9顆：薰衣草紫 */
.button-ninth {
    color: #ffffff;
    background: #7c5f9e;
}
.button-ninth:hover {
    background: #9477b8;
}

/* 第10顆：星空深紫 */
.button-tenth {
    color: #ffffff;
    background: #3d2b5a;
}
.button-tenth:hover {
    background: #523d74;
}


.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 24px 0 28px;
}

.form {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.form label {
    display: grid;
    gap: 8px;
    color: #4c5a63;
    font-size: 14px;
    font-weight: 700;
}

.form input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #c7d0d9;
    border-radius: 6px;
    color: #172026;
    background: #ffffff;
    font: inherit;
}

.form input:focus {
    border-color: #006d77;
    outline: 3px solid rgba(0, 109, 119, 0.14);
}

.alert {
    margin-top: 22px;
    padding: 12px 14px;
    border-radius: 6px;
    font-weight: 700;
}

.alert-error {
    color: #8a1f17;
    background: #fde8e5;
}

.alert-success {
    color: #0f5d31;
    background: #e3f4e9;
}

.link {
    color: #006d77;
    font-weight: 700;
    text-decoration: none;
}

/* === Guess Number (幾A幾B) page styles === */
/* 改為全版寬度，避免桌面寬螢幕出現大片留白 */
.panel-guess { width: 100%; max-width: none; }
.panel-guess h1 {
    font-size: 28px;
    line-height: 1.2;
    margin: 8px 0 6px;
}
.panel-guess .lead {
    font-size: 14px;
    margin: 0 0 8px;
    color: #555;
}
.guess-layout {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 左右平均各一半 */
    gap: 24px;
    align-items: start;
}
.guess-right h3 { margin: 6px 0 8px; }
.history-panel {
    border: 1px solid #d9e0e7;
    border-radius: 8px;
    padding: 10px;
    background: #fafbfd;
    max-height: 87.5vh; /* 從 70vh 提高 1/4（+25%）以顯示更多歷程內容 */
    overflow: auto;
}
/* 歷程在右側以單欄顯示，較易閱讀 */
.history-panel dl { display: block; }
.history-panel dl div { padding: 8px 6px; border-bottom: 1px solid #eef2f6; }
.history-panel dl div:last-child { border-bottom: 0; }

@media (max-width: 820px) {
    .guess-layout { grid-template-columns: 1fr; }
    .panel-guess { width: 100%; }
}

/* 數字鍵盤（猜數字頁） */
.num-pad {
    margin: 10px 0 8px;
    display: grid;
    grid-template-columns: repeat(3, minmax(64px, 1fr));
    gap: 10px;
    max-width: 480px;
}
.num-pad button {
    padding: 10px 0;
    font-size: 18px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease;
}
.num-pad button:hover { background: #f3f6fa; }
.num-pad button:active { background: #e6edf7; box-shadow: inset 0 2px 4px rgba(0,0,0,.06); }
.num-pad button.wide { grid-column: span 2; }

/* 數字鍵盤下方工具列 */
.num-tools {
    margin: 6px 0 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* === Card & Quiz Multi-Player Styles === */
.card {
    border: 1px solid #d9e0e7;
    border-radius: 8px;
    padding: 20px;
    background: #fafbfd;
    margin-bottom: 20px;
}
.card h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.panel-quiz {
    width: 100%;
    max-width: none;
}
.panel-quiz h1 {
    font-size: 28px;
    line-height: 1.2;
    margin: 8px 0 6px;
}
.panel-quiz .lead {
    font-size: 14px;
    margin: 0 0 8px;
    color: #555;
}

.quiz-layout {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 左右各佔一半 */
    gap: 24px;
    align-items: start;
}

#question {
    font-size: 32px;
    font-weight: bold;
    color: #006d77;
    background: #f0fdfa;
    border: 2px dashed #006d77;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}

#question + #quiz-msg {
    margin: -8px 0 20px;
}

#answer-form label {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    display: block;
}

#answer-input {
    font-size: 24px;
    height: 54px;
    padding: 10px 16px;
    text-align: center;
    font-weight: bold;
}

#btn-submit-answer {
    font-size: 18px;
    padding: 12px 24px;
    width: 100%;
}

#quiz-msg {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    padding: 15px;
    border-radius: 8px;
}

#quiz-msg.is-flashing {
    color: #b45309;
    background: #fff7ed;
    animation: quiz-flash 0.8s ease-in-out infinite;
}

@keyframes quiz-flash {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 rgba(251, 146, 60, 0);
    }
    50% {
        opacity: 0.35;
        transform: scale(1.03);
        box-shadow: 0 0 18px rgba(251, 146, 60, 0.45);
    }
}

@media (max-width: 820px) {
    .quiz-layout {
        grid-template-columns: 1fr;
    }
    .panel-quiz {
        width: 100%;
    }
}

/* === Cute Redesigned Homepage Styles === */
.home-panel {
    width: min(100%, 1200px);
    padding: 36px 40px;
    border: 1px solid #fed7aa;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 20px 45px rgba(251, 146, 60, 0.08), 0 8px 18px rgba(0, 0, 0, 0.04);
}

.hero-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    background: linear-gradient(135deg, #fff1f2 0%, #fef3c7 50%, #eff6ff 100%);
    border: 2px solid #ffe4e6;
    border-radius: 20px;
    padding: 36px 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 25px rgba(244, 63, 94, 0.06);
    position: relative;
    overflow: hidden;
}

.hero-text {
    flex: 1;
    min-width: 280px;
}

.cute-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    color: #e11d48;
    font-size: 13px;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.12);
    margin-bottom: 16px;
    border: 1px solid #fecdd3;
    animation: cute-bounce 3s ease-in-out infinite;
}

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

.hero-title {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 46px);
    font-weight: 900;
    color: #1e293b;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.hero-title .title-highlight {
    background: linear-gradient(135deg, #f43f5e 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-lead {
    font-size: 16px;
    color: #475569;
    line-height: 1.7;
    margin: 0 0 24px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn-cute-primary {
    background: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%);
    color: #ffffff;
    font-weight: 700;
    border-radius: 30px;
    padding: 12px 24px;
    box-shadow: 0 6px 18px rgba(244, 63, 94, 0.35);
    border: none;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-cute-primary:hover {
    background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 22px rgba(244, 63, 94, 0.45);
}

.btn-cute-secondary {
    background: #ffffff;
    color: #0284c7;
    font-weight: 700;
    border-radius: 30px;
    padding: 12px 22px;
    border: 2px solid #bae6fd;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.1);
    transition: all 0.25s ease;
}

.btn-cute-secondary:hover {
    background: #f0f9ff;
    border-color: #38bdf8;
    color: #0369a1;
    transform: translateY(-2px);
}

.btn-cute-ghost {
    background: rgba(255, 255, 255, 0.8);
    color: #64748b;
    font-weight: 600;
    border-radius: 30px;
    padding: 12px 20px;
    border: 1px solid #cbd5e1;
    transition: all 0.2s ease;
}

.btn-cute-ghost:hover {
    background: #ffffff;
    color: #334155;
    border-color: #94a3b8;
}

.hero-art {
    flex: 0 0 320px;
    max-width: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-mascot-img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 12px 20px rgba(244, 63, 94, 0.15));
    transition: transform 0.4s ease;
}

.hero-mascot-img:hover {
    transform: scale(1.04) rotate(1deg);
}

/* === Section Title === */
.section-title-wrap {
    text-align: center;
    margin: 10px 0 30px;
}

.section-title-wrap h2 {
    font-size: 26px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 6px;
}

.section-title-wrap p {
    font-size: 15px;
    color: #64748b;
    margin: 0;
}

/* === Cute Game Grid === */
.cute-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.cute-game-card {
    background: #ffffff;
    border-radius: 20px;
    border: 2px solid #f1f5f9;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.cute-game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(244, 63, 94, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
    border-color: #fecdd3;
}

.card-img-wrap {
    width: 100%;
    height: 180px;
    background: #fafafa;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-game-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cute-game-card:hover .card-game-img {
    transform: scale(1.06);
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.card-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
}

.card-tag.hot {
    background: #fff1f2;
    color: #e11d48;
}

.card-tag.multi {
    background: #f0fdf4;
    color: #16a34a;
}

.card-tag.puzzle {
    background: #eff6ff;
    color: #2563eb;
}

.card-title {
    font-size: 19px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-desc {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 16px;
    flex: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.btn-card-play {
    flex: 1;
    background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 14px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-card-play:hover {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.btn-card-rank {
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.btn-card-rank:hover {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #cbd5e1;
}

/* === Cute Features Section === */
.cute-features-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.feature-item {
    background: #fafaf9;
    border-radius: 18px;
    padding: 22px;
    border: 1px solid #f5f5f4;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.feature-item:hover {
    transform: translateY(-3px);
    background: #fdf4ff;
    border-color: #f5d0fe;
}

.feature-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.feature-info h4 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.feature-info p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

.cute-footer-banner {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-radius: 16px;
    border: 1px dashed #a7f3d0;
    margin-top: 10px;
}

.cute-footer-banner p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #047857;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-card {
        flex-direction: column-reverse;
        text-align: center;
        padding: 28px 20px;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-art {
        max-width: 220px;
    }
    .home-panel {
        padding: 20px 16px;
    }
}
