:root {
    --bg-primary: #111827;
    --bg-secondary: #1B2433;
    --surface: #243247;
    --royal-gold: #F2C14E;
    --shield-bronze: #C88A3D;
    --knight-silver: #C9D3E3;
    --emerald-banner: #3EB489;
    --royal-blue: #4D8CFF;
    --accent-glow: #8FD8FF;
    --text-primary: #F8FAFC;
    --text-secondary: #D9E1EA;
    --text-muted: #9AA7B5;
    
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 1px;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-padding {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

.gold-text {
    background: linear-gradient(to right, var(--royal-gold), var(--shield-bronze));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--royal-gold);
    text-align: center;
    text-transform: uppercase;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--royal-gold), var(--shield-bronze));
    color: #000;
    box-shadow: 0 4px 15px rgba(242, 193, 78, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(242, 193, 78, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--royal-gold);
    border: 2px solid var(--shield-bronze);
}

.btn-secondary:hover {
    background: rgba(200, 138, 61, 0.1);
    box-shadow: 0 0 15px rgba(200, 138, 61, 0.3);
}

/* Header & Nav */
header {
    background-color: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--surface);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.header-scrolled {
    background-color: rgba(17, 24, 39, 1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--royal-gold);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 28px;
    background: var(--shield-bronze);
    clip-path: polygon(50% 0%, 100% 20%, 100% 70%, 50% 100%, 0 70%, 0 20%);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-transform: uppercase;
    position: relative;
}

.nav-links a:hover {
    color: var(--royal-gold);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--royal-gold);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--royal-gold);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding-top: 120px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at center, rgba(36, 50, 71, 0.8) 0%, var(--bg-primary) 100%),
                url('images/hero-large-royal-shield-castle-fortress-gold-accents.webp') center/cover no-repeat;
    position: relative;
    border-bottom: 2px solid var(--shield-bronze);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, var(--bg-primary), transparent);
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

/* Game Section */
.game-section {
    background-color: var(--bg-primary);
    background-image: radial-gradient(var(--surface) 1px, transparent 1px);
    background-size: 30px 30px;
}

.game-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 4px solid var(--shield-bronze);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(200, 138, 61, 0.4), inset 0 0 20px #000;
    position: relative;
    overflow: hidden;
    padding: 4px;
}

.game-wrapper::before {
    content: '';
    position: absolute;
    top: -10px; right: -10px; bottom: -10px; left: -10px;
    background: linear-gradient(45deg, var(--royal-gold), transparent, var(--shield-bronze));
    z-index: -1;
    border-radius: 12px;
}

.game-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 4px;
    display: block;
}

@media (min-width: 768px) {
    .game-wrapper { width: 90%; }
}
@media (min-width: 1024px) {
    .game-wrapper { width: 75%; }
}

/* Adventures Cards */
.adventures {
    background-color: var(--bg-secondary);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--surface);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(200, 138, 61, 0.2);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--royal-gold);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4), 0 0 15px rgba(242, 193, 78, 0.15);
}

.card-img {
    height: 200px;
    overflow: hidden;
    border-bottom: 2px solid var(--shield-bronze);
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 25px;
    text-align: center;
}

.card-content h3 {
    color: var(--royal-gold);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Achievements */
.achievements {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.95) 0%, rgba(36, 50, 71, 0.95) 100%),
                radial-gradient(circle at center, rgba(200, 138, 61, 0.05) 0%, transparent 100%);
    border-top: 1px solid var(--shield-bronze);
    border-bottom: 1px solid var(--shield-bronze);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--royal-gold);
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    color: var(--knight-silver);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* About Snippet */
.about-snippet {
    background-color: var(--bg-primary);
}

.about-content-box {
    background: var(--surface);
    padding: 50px;
    border-radius: 8px;
    border: 1px solid rgba(201, 211, 227, 0.1);
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content-box::before {
    content: '';
    position: absolute;
    top: 10px; left: 10px; right: 10px; bottom: 10px;
    border: 1px dashed var(--shield-bronze);
    border-radius: 4px;
    pointer-events: none;
}

/* FAQ */
.faq-section {
    background-color: var(--bg-secondary);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--surface);
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid rgba(242, 193, 78, 0.1);
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-primary);
}

.faq-question:hover {
    color: var(--royal-gold);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-secondary);
}

.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 200px;
}

.faq-icon {
    color: var(--shield-bronze);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* Contact Form */
.contact-section {
    background-color: var(--bg-primary);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--surface);
    padding: 40px;
    border-radius: 8px;
    border-top: 4px solid var(--shield-bronze);
    position: relative;
}

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

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

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border: 1px solid rgba(201, 211, 227, 0.2);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--royal-gold);
    box-shadow: 0 0 10px rgba(242, 193, 78, 0.2);
}

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

.form-state {
    display: none;
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

.state-loading {
    color: var(--royal-gold);
    border: 1px solid var(--royal-gold);
}

.state-success {
    color: var(--emerald-banner);
    border: 1px solid var(--emerald-banner);
    background: rgba(62, 180, 137, 0.1);
}

.state-error {
    color: #ef4444;
    border: 1px solid #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Legal Pages Content */
.legal-content {
    background: var(--surface);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid rgba(200, 138, 61, 0.2);
}

.legal-content h2 {
    color: var(--royal-gold);
    margin: 30px 0 15px;
    font-size: 1.8rem;
}

.legal-content p, .legal-content ul {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.legal-content ul {
    padding-left: 20px;
    list-style: disc;
}

/* Footer Redesign */
footer {
    background-color: #090E17;
    color: var(--text-secondary);
    position: relative;
    border-top: 3px solid var(--shield-bronze);
}

.footer-strip {
    background: linear-gradient(to right, var(--shield-bronze), var(--royal-gold), var(--shield-bronze));
    padding: 18px 0;
    text-align: center;
    color: #111827;
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(242, 193, 78, 0.2);
}

.main-footer {
    padding: 80px 0 60px;
    background-image: radial-gradient(rgba(242, 193, 78, 0.05) 2px, transparent 2px);
    background-size: 30px 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
}

.footer-col h4 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 25px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 12px;
    letter-spacing: 2px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--royal-gold), transparent);
}

.footer-col p {
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links a {
    color: var(--text-secondary);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-links a::before {
    content: '›';
    color: var(--shield-bronze);
    font-size: 1.5rem;
    line-height: 0.8;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--royal-gold);
    transform: translateX(8px);
}

.footer-links a:hover::before {
    color: var(--royal-gold);
}

.support-email {
    font-family: var(--font-body);
    color: var(--royal-gold);
    padding: 12px 15px;
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(242, 193, 78, 0.2);
    border-radius: 6px;
    display: inline-block;
    margin-top: 15px;
    font-weight: 500;
}

.bottom-bar {
    background-color: #05080D;
    padding: 25px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(242, 193, 78, 0.1);
}

.bottom-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.bottom-bar-content p {
    margin: 0;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: var(--surface);
    border-top: 2px solid var(--shield-bronze);
    padding: 20px 0;
    z-index: 9999;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
    transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.show {
    bottom: 0;
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.cookie-text {
    flex: 1;
    min-width: 280px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--bg-primary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 40px;
        transition: var(--transition);
        border-top: 1px solid var(--surface);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .bottom-bar-content {
        justify-content: center;
        text-align: center;
    }
}