@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Lato:wght@300;400;700&family=Noto+Serif+SC:wght@400;700&display=swap');

:root {
    /* Colors */
    --bg-dark: #1a1206;
    --bg-medium: #261e0e;
    --card-bg: rgba(30, 22, 12, 0.75);
    
    /* Accents */
    --gold: #f5b042;
    --gold-dim: rgba(245, 176, 66, 0.2);
    --gold-glow: rgba(245, 176, 66, 0.4);
    --jade: #4a7c59;
    --red: #b83b2a;
    --cherry: #e8a4a4;
    --silk: #fef0cf;
    --bamboo: #5a7a4a;
    --bronze: #b87c4a;
    --pearl: #faf3e0;
    
    /* Typography */
    --text-primary: #fef5e6;
    --text-secondary: #d4c8b0;
    --font-head: 'Cinzel', serif;
    --font-body: 'Lato', sans-serif;
    --font-accent: 'Noto Serif SC', serif;
    
    /* Layout */
    --sidebar-desktop: 88px;
    --sidebar-tablet: 75px;
    --max-width: 1400px;
    --transition: all 0.3s ease;
    --radius-lg: 24px;
    --radius-md: 16px;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at top right, rgba(245, 176, 66, 0.03) 0%, transparent 40%),
        radial-gradient(circle at bottom left, rgba(74, 124, 89, 0.03) 0%, transparent 40%);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--silk);
    line-height: 1.2;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.8rem; }

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Base Layout Container */
.main-wrapper {
    margin-left: var(--sidebar-desktop);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
    width: 100%;
}

section {
    padding: 100px 0;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid var(--gold);
    border-radius: 100px;
    font-family: var(--font-accent);
    color: var(--gold);
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
    background: rgba(245, 176, 66, 0.05);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 36px;
    border-radius: 100px;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--bronze));
    color: var(--bg-dark);
    border: none;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px var(--gold-glow);
}

.btn-secondary {
    background: transparent;
    border: 1.5px solid var(--gold);
    color: var(--gold);
}

.btn-secondary:hover {
    background: rgba(245, 176, 66, 0.1);
}

/* Floating Pagoda Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-desktop);
    height: 100vh;
    background: rgba(26, 18, 6, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--gold-dim);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 32px 0;
    z-index: 1000;
}

.sidebar-top .logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-top .logo svg {
    width: 32px;
    height: 32px;
    fill: var(--gold);
}

.sidebar-top .logo span {
    font-family: var(--font-head);
    font-size: 12px;
    color: var(--gold);
    writing-mode: vertical-rl;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 16px;
}

.sidebar-mid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    width: 56px;
    height: 56px;
    background: rgba(245, 176, 66, 0.05);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    margin-bottom: 4px;
    transition: var(--transition);
}

.nav-item span {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.nav-item:hover {
    background: rgba(245, 176, 66, 0.15);
    border-color: var(--gold-dim);
    transform: translateX(4px);
    color: var(--gold);
}

.nav-item.active {
    background: rgba(245, 176, 66, 0.2);
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 15px var(--gold-dim);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 3px;
    background: var(--gold);
    border-radius: 0 4px 4px 0;
}

.sidebar-bottom .lotus-cta {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gold), var(--bronze));
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: gentlePulse 3s infinite;
}

.lotus-cta svg {
    width: 24px;
    height: 24px;
    fill: var(--bg-dark);
}

/* Mobile Header & Overlay */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(26, 18, 6, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--gold-dim);
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-logo svg {
    width: 24px;
    height: 24px;
    fill: var(--gold);
}

.mobile-logo span {
    font-family: var(--font-head);
    color: var(--gold);
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.hamburger {
    background: none;
    border: none;
    color: var(--gold);
    cursor: pointer;
}

.hamburger svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(26, 18, 6, 0.98);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.mobile-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-overlay .nav-item {
    width: 200px;
    height: 60px;
    flex-direction: row;
    gap: 15px;
    margin: 10px 0;
}

.mobile-overlay .nav-item span {
    font-size: 14px;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(26, 18, 6, 0.8), rgba(26, 18, 6, 0.9)),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M0 50 Q 25 25, 50 50 T 100 50" fill="none" stroke="rgba(245, 176, 66, 0.05)" stroke-width="1"/></svg>') repeat;
    z-index: -1;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 24px;
    text-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 90%;
}

.hero-features {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-accent);
    color: var(--silk);
    font-size: 0.9rem;
}

.hero-feature span.seal {
    width: 32px;
    height: 32px;
    background: rgba(184, 59, 42, 0.2);
    border: 1px solid var(--red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red);
    font-weight: bold;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.hero-disclaimer {
    margin-top: 40px;
    font-size: 0.8rem;
    color: rgba(212, 200, 176, 0.5);
    display: flex;
    gap: 15px;
    align-items: center;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dragon-graphic {
    width: 100%;
    max-width: 500px;
    animation: floatDragon 6s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(245, 176, 66, 0.2));
}

.floating-lantern {
    position: absolute;
    width: 60px;
    animation: floatDragon 8s ease-in-out infinite reverse;
}

.fl-1 { top: 10%; right: 10%; }
.fl-2 { bottom: 20%; left: 0%; width: 40px; }

/* Game Section */
.game-section {
    position: relative;
    z-index: 10;
}

.game-container {
    background: linear-gradient(145deg, rgba(38, 30, 14, 0.9), rgba(26, 18, 6, 0.95));
    border-radius: 32px;
    padding: 24px;
    border: 2px solid var(--gold-glow);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-width: 980px;
    margin: 0 auto;
    position: relative;
}

/* Corner Motifs */
.game-container::before, .game-container::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid var(--gold);
    z-index: 2;
    pointer-events: none;
}
.game-container::before {
    top: -10px; left: -10px;
    border-right: none; border-bottom: none;
    border-radius: 12px 0 0 0;
}
.game-container::after {
    bottom: -10px; right: -10px;
    border-left: none; border-top: none;
    border-radius: 0 0 12px 0;
}

.game-frame {
    border-radius: 24px;
    background: #1e160c;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gold-dim);
    aspect-ratio: 16/9;
}

.game-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: linear-gradient(135deg, #2a2212, #1a1206);
}

/* Features Section */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    margin-bottom: 16px;
    color: var(--gold);
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.feature-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    border: 1px solid var(--gold-dim);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--gold);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    font-size: 52px;
    margin-bottom: 24px;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(245, 176, 66, 0.3));
}

.feature-card h3 {
    font-size: 22px;
    color: var(--gold);
    margin-bottom: 16px;
}

.feature-card p {
    font-size: 15px;
    color: var(--text-secondary);
}

/* How It Works */
.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    position: relative;
}

.step-card {
    text-align: center;
    position: relative;
}

.step-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: rgba(74, 124, 89, 0.1);
    position: relative;
    z-index: 2;
}

.step-card h3 {
    font-size: 22px;
    color: var(--gold);
    margin-bottom: 12px;
}

/* Imperial Wisdom */
.wisdom-section {
    padding: 80px 40px;
    margin: 60px 0;
}

.wisdom-container {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(245,176,66,0.05), rgba(74,124,89,0.05));
    border: 1px solid var(--gold-dim);
    border-radius: 48px;
    padding: 60px;
    text-align: center;
    position: relative;
}

.wisdom-container::before {
    content: '❝';
    position: absolute;
    top: 20px;
    left: 40px;
    font-size: 80px;
    color: rgba(245, 176, 66, 0.1);
    font-family: var(--font-accent);
}

.wisdom-quote {
    font-family: var(--font-accent);
    font-size: 1.8rem;
    color: var(--silk);
    line-height: 1.6;
    margin-bottom: 30px;
    font-style: italic;
}

.wisdom-author {
    color: var(--gold);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.imperial-seal {
    width: 40px;
    height: 40px;
    background: var(--red);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-accent);
    border-radius: 4px;
    font-size: 14px;
}

/* Inner Pages General */
.page-header {
    padding: 120px 0 60px;
    text-align: center;
    background: 
        linear-gradient(to bottom, rgba(26, 18, 6, 0.9), var(--bg-dark)),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M0 50 Q 25 25, 50 50 T 100 50" fill="none" stroke="rgba(245, 176, 66, 0.05)" stroke-width="1"/></svg>') repeat;
    border-bottom: 1px solid var(--gold-dim);
}

.page-content {
    padding: 80px 0;
    max-width: 900px;
    margin: 0 auto;
}

.text-block {
    margin-bottom: 40px;
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gold-dim);
}

.text-block h2 {
    color: var(--gold);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.text-block p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.text-block ul {
    list-style: none;
    margin-left: 20px;
    margin-bottom: 16px;
}

.text-block ul li {
    margin-bottom: 10px;
    color: var(--text-secondary);
    position: relative;
}

.text-block ul li::before {
    content: '🐉';
    position: absolute;
    left: -25px;
    font-size: 12px;
    top: 4px;
}

/* Contact Form */
.scroll-form {
    background: linear-gradient(145deg, #2a2212, #1a1206);
    padding: 50px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gold-dim);
    position: relative;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--gold);
    font-family: var(--font-accent);
}

.form-control {
    width: 100%;
    padding: 16px;
    background: rgba(26, 18, 6, 0.8);
    border: 1px solid var(--gold-dim);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(245, 176, 66, 0.2);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background: #120e06;
    border-top: 2px solid var(--gold);
    padding: 80px 0 40px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: var(--gold);
    margin-bottom: 24px;
    font-size: 1.2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-logo svg {
    width: 32px;
    height: 32px;
    fill: var(--gold);
}

.footer-logo span {
    font-family: var(--font-head);
    font-size: 1.5rem;
    color: var(--gold);
}

.footer-motto {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-style: italic;
}

.social-icons {
    display: flex;
    gap: 16px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(245, 176, 66, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    border: 1px solid var(--gold-dim);
}

.social-icon:hover {
    background: var(--gold);
    color: var(--bg-dark);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--gold);
    padding-left: 8px;
}

.messenger-box {
    background: rgba(245, 176, 66, 0.05);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--gold-dim);
}

.messenger-box a {
    color: var(--gold);
    font-weight: bold;
    display: block;
    margin-top: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(245, 176, 66, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-disclaimers {
    display: flex;
    gap: 20px;
    align-items: center;
}

.age-icon {
    width: 30px;
    height: 30px;
    border: 2px solid currentColor;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 176, 66, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px 0 rgba(245, 176, 66, 0.2); }
}

.animate-up {
    animation: fadeInUp 0.8s forwards;
}

/* Responsive Breakpoints */
@media (max-width: 1199px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-content h1 { font-size: 2.8rem; }
}

@media (max-width: 991px) {
    .sidebar { display: none; }
    .main-wrapper { margin-left: 0; }
    .mobile-header { display: flex; }
    .hero { padding-top: 120px; }
    .hero .container { grid-template-columns: 1fr; text-align: center; }
    .hero-features { justify-content: center; }
    .hero-actions { justify-content: center; }
    .hero-disclaimer { justify-content: center; }
    .steps-container { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .game-section { padding: 40px 0; }
    .game-container { padding: 12px; width: 90%; }
}

@media (max-width: 768px) {
    .features-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 2.2rem; }
    .wisdom-container { padding: 40px 20px; }
    .wisdom-quote { font-size: 1.4rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .game-container { width: 100%; border-radius: 16px; }
    .game-frame { border-radius: 12px; }
}