/* --- CSS Design Tokens --- */
:root {
    --bg-base: hsl(222, 24%, 6%);
    --bg-panel: rgba(13, 17, 23, 0.7);
    --bg-panel-hover: rgba(22, 28, 38, 0.8);
    --bg-card: rgba(25, 33, 47, 0.5);
    
    --primary: hsl(190, 100%, 45%);
    --primary-glow: hsla(190, 100%, 45%, 0.35);
    --secondary: hsl(280, 85%, 60%);
    --secondary-glow: hsla(280, 85%, 60%, 0.3);
    
    --text-main: hsl(210, 20%, 98%);
    --text-muted: hsl(215, 12%, 72%);
    --text-dimmed: hsl(215, 10%, 55%);
    
    --border-light: rgba(255, 255, 255, 0.08);
    --border-focus: hsla(190, 100%, 45%, 0.5);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    
    --shadow-premium: 0 10px 40px -10px rgba(0, 0, 0, 0.7);
    --transition-smooth: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Rarity colors */
    --color-common: hsl(0, 0%, 65%);
    --color-uncommon: hsl(120, 50%, 45%);
    --color-rare: hsl(210, 85%, 55%);
    --color-epic: hsl(290, 70%, 55%);
    --color-legendary: hsl(35, 95%, 55%);
    --color-mysthic: hsl(360, 80%, 55%);
}

/* --- Core Reset & Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Glow mesh background --- */
.glow-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.glow-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.45;
    animation: floatGlow 15s infinite alternate ease-in-out;
}

.glow-blue {
    top: -10%;
    left: 15%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
}

.glow-purple {
    bottom: -10%;
    right: 10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--secondary-glow) 0%, transparent 70%);
    animation-delay: -5s;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(4vw, 5vh) scale(1.15); }
}

/* --- Header & Logo --- */
.main-header {
    background: rgba(10, 12, 18, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--primary);
}

.logo-text span span {
    color: var(--text-main);
    font-weight: 500;
}

/* Navigation Tabs */
.navigation-bar {
    display: flex;
    gap: 0.5rem;
}

.nav-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.nav-tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-tab-btn.active {
    color: var(--primary);
    background: rgba(0, 229, 255, 0.08);
    box-shadow: inset 0 0 1px hsla(190, 100%, 45%, 0.2);
}

/* --- Main Layout --- */
.main-content {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Glass panel design system */
.glass-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-premium);
    overflow: hidden;
}

/* Tab Sections */
.content-tab-section {
    display: none;
    animation: tabFadeIn 0.4s ease-out forwards;
}

.content-tab-section.active {
    display: block;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- TAB 1: INTRODUCTION STYLE --- */
.intro-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 900px) {
    .intro-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.main-heading {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, #ffffff 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.paragraph-lead {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.key-features-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
}

.feature-icon {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.04);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.feature-item h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.feature-item p {
    color: var(--text-dimmed);
    font-size: 0.95rem;
}

/* --- Interactive Simulator Style --- */
.playground-card {
    padding: 2rem;
    border-color: rgba(0, 229, 255, 0.15);
}

.playground-header {
    margin-bottom: 1.5rem;
}

.badge {
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--bg-base);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.playground-header h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
}

/* Sim UI */
.sim-container {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.sim-hud-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sim-xp-bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sim-xp-bar-fill {
    height: 100%;
    background-color: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    transition: width var(--transition-smooth);
}

.sim-xp-text {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-dimmed);
    margin-top: 0.25rem;
}

.sim-stats-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.25rem;
}

.sim-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.sim-stat-entry {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
}

/* Interactive Card Overlay Modal */
.sim-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 4, 8, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.sim-modal-overlay.active {
    display: flex;
}

.sim-modal-content {
    max-width: 760px;
    width: 100%;
    padding: 2rem;
    border-color: rgba(255, 255, 255, 0.12);
}

.sim-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 1rem;
}

.sim-modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.sim-modal-rolls {
    font-family: var(--font-heading);
    font-weight: 600;
}

.sim-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 650px) {
    .sim-cards-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .sim-modal-overlay {
        overflow-y: auto;
    }
}

/* Individual Card Styling */
.sim-card {
    background: rgba(17, 24, 38, 0.9);
    border: 2px solid var(--color-common);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
}

.sim-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 30px rgba(0,0,0,0.6);
}

.card-rarity-banner {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    padding: 0.1rem 0;
    border-radius: 3px;
    background: rgba(255,255,255,0.04);
}

.card-icon {
    font-size: 2.2rem;
    margin: 0.5rem 0;
}

.card-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Rarity Color Mappings for Cards */
.rarity-common { border-color: var(--color-common); }
.rarity-common .card-rarity-banner { color: var(--color-common); }
.rarity-common:hover { box-shadow: 0 0 15px rgba(255,255,255,0.1); }

.rarity-uncommon { border-color: var(--color-uncommon); }
.rarity-uncommon .card-rarity-banner { color: var(--color-uncommon); }
.rarity-uncommon:hover { box-shadow: 0 0 15px hsla(120, 50%, 45%, 0.3); }

.rarity-rare { border-color: var(--color-rare); }
.rarity-rare .card-rarity-banner { color: var(--color-rare); }
.rarity-rare:hover { box-shadow: 0 0 15px hsla(210, 85%, 55%, 0.3); }

.rarity-epic { border-color: var(--color-epic); }
.rarity-epic .card-rarity-banner { color: var(--color-epic); }
.rarity-epic:hover { box-shadow: 0 0 15px hsla(290, 70%, 55%, 0.3); }

.rarity-legendary { border-color: var(--color-legendary); }
.rarity-legendary .card-rarity-banner { color: var(--color-legendary); }
.rarity-legendary:hover { box-shadow: 0 0 15px hsla(35, 95%, 55%, 0.4); }

.rarity-mysthic { border-color: var(--color-mysthic); }
.rarity-mysthic .card-rarity-banner { color: var(--color-mysthic); }
.rarity-mysthic:hover { box-shadow: 0 0 20px hsla(360, 80%, 55%, 0.5); }

.sim-modal-footer {
    display: flex;
    justify-content: center;
}

/* --- TAB 2: DEVELOPER DOCS STYLE --- */
.section-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.section-intro {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
}

.step-card {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 2rem;
}

@media (max-width: 700px) {
    .step-card {
        flex-direction: column;
        gap: 1rem;
    }
}

.step-number {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-base);
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

/* Code block wrapper with copy button */
.code-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
    background: rgb(8, 10, 15);
}

.code-wrapper pre {
    padding: 1.25rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.copy-btn:hover {
    background: var(--primary);
    color: var(--bg-base);
    border-color: var(--primary);
}

/* --- TAB 3: AGENT DOCS STYLE --- */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 750px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.info-card {
    padding: 2rem;
}

.info-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--primary);
}

.ref-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ref-list li {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.ref-list code {
    display: block;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    color: var(--text-main);
    margin-bottom: 0.25rem;
    width: fit-content;
}

.alert-box {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
}

.warning-border {
    border-color: rgba(244, 67, 54, 0.25);
    background: rgba(244, 67, 54, 0.02);
}

.alert-icon {
    font-size: 2rem;
}

.alert-box h4 {
    font-family: var(--font-heading);
    color: var(--color-mysthic);
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.alert-box p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* --- TAB 4: CONTACT & FAQ STYLE --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* Accordion FAQs */
.faq-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion-item {
    transition: var(--transition-smooth);
}

.accordion-header {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 1.25rem;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.accordion-header .icon {
    font-size: 1.2rem;
    color: var(--primary);
    transition: transform var(--transition-smooth);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.25rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: max-height var(--transition-smooth), padding var(--transition-smooth);
}

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

.accordion-item.active .accordion-body {
    max-height: 160px;
    padding-bottom: 1.25rem;
}

/* Interactive Form */
.contact-form-panel {
    padding: 2rem;
}

.contact-form-panel h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.contact-form-panel p {
    color: var(--text-dimmed);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.form-status-msg {
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
    border-radius: var(--radius-sm);
}

.form-status-msg.success {
    padding: 0.5rem;
    background: rgba(76, 175, 80, 0.1);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

/* --- Buttons Design System --- */
.primary-btn {
    background: linear-gradient(135deg, var(--primary) 0%, #00b0ff 100%);
    color: var(--bg-base);
    border: none;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.primary-btn:active {
    transform: translateY(0);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    color: var(--text-main);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Colors helpers */
.text-gold { color: var(--color-legendary); }
.text-green { color: var(--color-uncommon); }

/* --- Footer --- */
.main-footer {
    background: rgba(5, 7, 10, 0.9);
    border-top: 1px solid var(--border-light);
    text-align: center;
    padding: 2rem;
    color: var(--text-dimmed);
    font-size: 0.85rem;
    margin-top: auto;
}
