/* ==========================================================================
   MASTER STYLESHEET
   1. Imports & Variables
   2. Resets & Global Layout (Body, HTML)
   3. Typography
   4. UI Components (Buttons, Inputs, Tables)
   5. Layout Containers (Grid, Flex, Sidebar)
   6. Modules: Shop & Guilds
   7. Modules: Gaming (Cards, Mana, Elements)
   8. Modules: Profile & Achievements
   9. Footer & Navigation
   10. Mobile & Responsive
   ========================================================================== */

/* =========================================
   1. FONTS & VARIABLES
   ========================================= */
/* Consolidated Import */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Inter:wght@400;500;700&family=Raleway:wght@300;400;500;600;700&display=swap');

:root {
    /* -- PALETTE: CORE -- */
    --bg-dark:       #f2f3f6;
    --bg-panel:      #ffffff;   
    --bg-input:      #ffffff;
    --bg-sunken:     #f6f7f9;
    
    /* -- PALETTE: TEXT -- */
    --text-main:     #1c2028;
    --text-muted:    #626a77;
    --text-white:    #1c2028;

    /* -- PALETTE: ACCENTS -- */
    --accent-gold:   #a87d2a; 
    --accent-glow:   #c5a059;
    --accent-red:    #d3202a;
    --accent-green:  #2e8b57;
    --accent-blue:   #0e68ab;
    
    /* -- UI ELEMENTS -- */
    --border-color:  #dcdfe5;
    --radius:        6px;
    --shadow:        0 1px 2px rgba(16,24,40,0.06), 0 4px 14px rgba(16,24,40,0.06);
    
    /* -- FONTS -- */
    --font-heading:  'Cinzel', serif;  
    --font-subhead:  'Raleway', sans-serif; 
    --font-body:     'Raleway', sans-serif;
    --font-ui:       'Inter', sans-serif;
    
    /* -- DEFAULT BUTTON VARS (Overwritten by PHP when needed) -- */
    --guild-btn-text: var(--accent-gold);
    --guild-btn-bg: transparent; 
    --guild-btn-hover-bg: var(--accent-gold);
    --guild-btn-hover-text: #000000;
}

/* =========================================
   2. RESET & GLOBAL LAYOUT (SAFE MODE)
   ========================================= */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
	overflow-x: hidden;
	overflow-x: clip; /* hides sideways overflow without breaking the sticky header and shop tabs */
}

body {
    background-color: var(--bg-dark);
    background-image: none;
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: none;
}

/* DECOUPLED NAVBAR AND FOOTER FOR FULL WIDTH */
.container, .page-wrapper, .dashboard-wrapper {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto; 
    width: 100%;
}

/* =========================================
   3. TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-white);
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

h1 { font-size: 2.2rem; color: var(--accent-gold); text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }
h2 { border-bottom: 2px solid var(--accent-gold); padding-bottom: 10px; margin-bottom: 20px; font-size: 1.8rem; }
h3 { font-family: var(--font-subhead); color: var(--text-main); }

a { color: var(--accent-gold); text-decoration: none; transition: 0.2s; }
a:hover { color: var(--accent-glow); text-decoration: underline; }

/* =========================================
   4. UI COMPONENTS (BUTTONS)
   ========================================= */
.btn, .cta-btn {
    display: inline-flex; 
    align-items: center;
	text-align: center;
    justify-content: center;
    padding: 10px 20px;
    width: auto; 
    background: linear-gradient(180deg, #3a3a3a, #222);
    color: #fff !important; 
    border: 1px solid var(--accent-gold);
    border-radius: var(--radius);
    font-family: var(--font-ui);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none !important; 
    transition: 0.2s;
    white-space: nowrap; 
}

.btn:hover, .cta-btn:hover {
    background: #444 !important;
    color: var(--accent-glow) !important;
    border-color: var(--accent-glow);
    box-shadow: 0 0 12px rgba(197, 160, 89, 0.4);
}

/* Fallback generic gold button if not overridden by PHP */
.btn-gold {
    background: var(--accent-gold) !important;
    color: #000 !important;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center; 
    text-align: center;
    padding: 60px 20px;
}

.hero .cta-btn {
    display: inline-flex;
}

.ctrl-btn {
    padding: 0;
    width: 26px; 
    height: 26px;
    font-size: 1.2em;
    border-color: #444;
    color: #aaa;
}
.ctrl-btn:hover { border-color: #fff; color: #fff; background: #333; }

/* --- INPUTS & FORMS --- */
input[type="text"], 
input[type="number"], 
input[type="email"],
input[type="password"],
select, 
textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid #444;
    color: #fff;
    border-radius: var(--radius);
    box-sizing: border-box;
    margin-bottom: 15px;
    font-family: var(--font-body);
    font-size: 16px; 
    transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 8px rgba(197, 160, 89, 0.3);
}

/* --- BOXES & CARDS --- */
.box, .stat-card, .login-box, .info-panel, .events-panel, .shop-container {
    background: var(--bg-panel);
    padding: 20px;
    border: 1px solid var(--accent-gold);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    
    backdrop-filter: blur(5px);
}

/* --- TABLES --- */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: var(--radius);
    border: 1px solid #333;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0,0,0,0.3);
}

th {
    background: #2c2c35;
    color: var(--accent-gold);
    padding: 12px;
    text-align: left;
    font-family: var(--font-heading);
    border-bottom: 1px solid var(--accent-gold);
}

td {
    padding: 12px;
    border-bottom: 1px solid #333;
    font-size: 0.9rem;
    color: #ccc;
}

tr:hover td { background: rgba(255,255,255,0.05); }

/* --- BADGES --- */
.badge { padding: 4px 8px; border-radius: 4px; font-size: 0.75em; font-weight: bold; text-transform: uppercase; display: inline-block; }
.badge-open { background: #d3202a; color: white; }
.badge-fixed, .badge-live { background: #28a745; color: white; }
.badge-paid { background: #ffd700; color: #000; }
.badge-plan { background: #6f42c1; color: white; }
.badge-prog { background: #fd7e14; color: white; }

/* =========================================
   5. LAYOUT CONTAINERS
   ========================================= */
.overlay {
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
	overflow-x: hidden;
	overflow-x: clip; /* hides sideways overflow without breaking the sticky header and shop tabs */
}

header, .navbar, .site-footer, footer {
    width: 100%;
}

.hero,  
.container, 
.shop-container, 
.builder-container,
.page-wrapper {
    width: 100%;
    max-width: 1200px; 
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* =========================================
   6. MODULE: SHOP & GUILDS
   ========================================= */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 20px;
    margin-top: 20px;
    width: 100%;
}

.shop-item {
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: var(--radius);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center; 
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 100%;
}

.shop-item:hover {
    border-color: var(--accent-glow);
    box-shadow: 0 8px 20px rgba(0,0,0,0.7);
}

.shop-item img {
    width: 100%;       
    height: 140px;     
    object-fit: contain; 
    border: 1px solid #333;
    border-radius: 4px;
    margin-bottom: 10px;
    background: #000;
}

.shop-title {
    font-family: var(--font-heading);
    color: var(--text-white);
    font-size: 1rem;
    margin: 5px 0;
    font-weight: 700;
}

.shop-price { 
    color: var(--accent-gold); 
    font-weight: bold; 
    font-size: 1.1em; 
    margin-top: auto; 
    margin-bottom: 10px;
}

/* --- GUILD SHOWCASE --- */
.guild-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
    margin-top: 30px;
}

.guild-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333;
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: flex-start; 
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    text-decoration: none;
    min-height: 200px; 
}

.guild-card:hover {
    border-color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.guild-img-box {
    width: 100%;       
    height: 120px;     
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2); 
    border-radius: 4px; 
}

.guild-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; 
}

.g-name {
    font-family: var(--font-heading);
    color: var(--text-white);
    font-size: 1.1em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 5px;
}

.g-members {
    font-size: 0.8em;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* --- JACK TRADES CARDS BANNER --- */
.jtc-banner {
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--accent-gold);
    border-radius: var(--radius);
    padding: 30px;
    margin-top: 40px;
    text-align: center;
    color: var(--text-main);
    width: 100%;
    white-space: normal; 
    transition: border-color 0.2s, background 0.2s;
}
.jtc-banner:hover { background: rgba(197, 160, 89, 0.1); border-color: var(--accent-glow); }
.jtc-banner img { height: 70px; width: auto; object-fit: contain; margin-bottom: 15px; }

/* =========================================
   7. MODULE: GAMING (Cards/Deckbuilder)
   ========================================= */
.builder-container { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 20px; }
.deck-sidebar { flex: 1; min-width: 250px; }
.deck-workspace { flex: 3; min-width: 300px; }

.card-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: rgba(15, 15, 20, 0.95);
    border: 1px solid #333;
    border-radius: 8px;
    position: relative;
    transition: border-color 0.2s;
}
.card-item:hover { border-color: #666; }

.card-name { font-size: 1.1em; font-weight: 700; color: #fff; margin-bottom: 5px; }
.card-type { font-size: 0.85em; color: #888; font-style: italic; }

.mana-display { display: flex; gap: 3px; }
.ms {
    display: inline-block; width: 18px; height: 18px; border-radius: 50%;
    text-align: center; line-height: 18px; font-size: 11px; font-weight: 800;
    color: #000; box-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
.ms-W { background: #f8e7b9; } 
.ms-U { background: #0e68ab; color:#fff; } 
.ms-B { background: #150b00; color:#fff; }
.ms-R { background: #d3202a; color:#fff; } 
.ms-G { background: #00733e; color:#fff; }

.type-badge { padding: 1px 6px; border-radius: 8px; font-size: 0.75em; color: white; font-weight: bold; margin-right: 2px; }
.type-Fire { background: #F08030; } 
.type-Water { background: #6890F0; } 
.type-Grass { background: #78C850; }

/* =========================================
   8. MODULE: PROFILE & ACHIEVEMENTS
   ========================================= */
.profile-header { text-align: center; margin-bottom: 20px; }
.profile-avatar { width: 120px; height: 120px; border-radius: 50%; border: 3px solid var(--accent-gold); object-fit: cover; }

.stat-overview {
    display: flex;
    justify-content: center; 
    align-items: center;
    gap: 15px;
    flex-wrap: wrap; 
    width: 100%;
    margin-bottom: 30px;
}

.stat-pill {
    background: var(--bg-panel);
    border: 1px solid #444;
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.stat-pill strong {
    font-size: 1rem;
    color: #fff;
}

.ach-panel {
    background: var(--bg-panel);
    border: 1px solid #333;
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: border-color 0.3s;
}

.ach-header {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(90deg, #222, #1a1a1a);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--accent-gold);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    border: none;
    text-align: left;
    transition: background 0.2s;
}

.ach-header:hover {
    background: #2a2a2a;
    color: #fff;
}

.ach-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.ach-panel.open .ach-arrow {
    transform: rotate(180deg);
}

.ach-content {
    display: none; 
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid #333;
}

.ach-panel.open .ach-content {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.ach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.ach-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333;
    padding: 15px;
    border-radius: var(--radius);
    transition: border-color 0.2s, background 0.2s;
}

.ach-card:hover {
    border-color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.05);
}

.ach-icon-box {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border: 1px solid #444;
    border-radius: 8px;
    font-size: 1.5rem;
}

.ach-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.ach-info { display: flex; flex-direction: column; }
.ach-title { color: #fff; font-weight: 700; font-size: 0.95rem; margin-bottom: 3px; }
.ach-desc { color: var(--text-muted); font-size: 0.8rem; line-height: 1.3; margin-bottom: 5px; }
.ach-req { color: var(--accent-gold); font-size: 0.75rem; font-weight: bold; text-transform: uppercase; }

.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    width: 100%;
    margin-bottom: 30px;
}

.profile-badge {
    background: var(--bg-panel); 
    border: 1px solid #333;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: border-color 0.2s;
    height: 100%; 
}

.profile-badge:hover {
    border-color: var(--accent-gold);
}

.profile-badge img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 10px;
}

.profile-badge strong {
    color: var(--accent-gold);
    font-size: 0.9rem;
    margin-bottom: 5px;
    line-height: 1.2;
}

.badge-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: auto; 
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   9. NAVIGATION & FOOTER (FULL WIDTH FIX)
   ========================================= */
.navbar {
    width: 100% !important;
    max-width: none !important;
    background: rgba(0, 0, 0, 0.85); 
    border-bottom: 1px solid var(--accent-gold);
    display: flex;
    justify-content: center; 
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    margin: 0; 
    padding: 0; 
}

.header-container {
    width: 100%;
    max-width: 1200px; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.header-actions {
    display: flex; 
    gap: 15px;
    align-items: center;
}

.site-footer {
    width: 100% !important;
    max-width: none !important;
    background: #0a0a0a;
    border-top: 1px solid var(--accent-gold);
    padding: 30px 0 70px; 
    text-align: center;
    margin-top: auto;
    position: relative;
    z-index: 10;
}

.footer-content, .site-footer p {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-content strong, .site-footer strong {
    color: var(--text-main);
}

.feedback-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.9); 
    backdrop-filter: blur(5px);         
    border-top: 1px solid var(--accent-red); 
    padding: 12px;
    text-align: center;
    z-index: 9999;
    font-size: 0.85rem;
    color: #ccc;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.5);
}

.feedback-bar a {
    color: var(--accent-red); 
    font-weight: 700;
    margin-left: 8px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.feedback-bar a:hover {
    color: #ff6b6b;
    text-decoration: underline;
    text-shadow: 0 0 5px rgba(211, 32, 42, 0.5);
}

/* =========================================
   10. DISCORD WIDGET & SOCIAL
   ========================================= */
.discord-float-btn {
    position: fixed; 
    bottom: 30px; 
    right: 20px; 
    z-index: 10002; 
    width: 60px; 
    height: 60px; 
    background: #5865F2; 
    border: 2px solid var(--accent-gold); 
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6); 
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.discord-float-btn:hover { 
    box-shadow: 0 0 20px var(--accent-glow); 
}

.discord-float-btn svg { 
    width: 30px; 
    height: 30px; 
    fill: white; 
}

.discord-widget-container {
    display: none; 
    position: fixed;
    bottom: 90px; 
    right: 20px;
    width: 300px;  
    height: 400px; 
    z-index: 10002;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: -5px 5px 30px rgba(0,0,0,0.9);
    border: 1px solid var(--accent-gold);
    background: #000;
}

/* =========================================
   11. DASHBOARD SPECIFIC LAYOUTS
   ========================================= */
.guild-header-bar {
    width: 100% !important;
    max-width: none !important;
    background: rgba(0, 0, 0, 0.95); 
    border-bottom: 1px solid var(--accent-gold);
    padding: 10px 40px;
    display: flex;
    justify-content: space-between; 
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(5px);
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.switcher-val {
    color: var(--accent-gold);
    font-weight: 700;
    font-family: var(--font-heading);
}

/* --- HORIZONTAL BUTTON GRID (Updated to restore images) --- */
.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 15px;
    width: 100%;
    margin-bottom: 20px;
}

.button-grid .btn {
    width: 100% !important;  
    height: auto !important;            
    min-height: 80px !important;        
    display: flex !important;
    flex-direction: row !important;     
    align-items: center !important;     
    justify-content: flex-start !important; 
    text-align: left !important;
    padding: 10px 15px !important;
    gap: 15px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.button-grid .btn img {
    width: 50px !important;
    height: 50px !important;
    object-fit: contain !important;
    flex-shrink: 0; 
}

.guild-switcher {
    background: rgba(0,0,0,0.4);
    padding: 15px;
    border-radius: var(--radius);
    border: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

/* =========================================
   12. LOG MATCH ROWS
   ========================================= */
.log-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
    background: rgba(255,255,255,0.02);
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #333;
}

.log-rank {
    width: 30px;
    text-align: center;
    color: #888;
    font-size: 1.1em;
}

.log-item select {
    margin-bottom: 0; 
}

.deck-box {
    background: rgba(0,0,0,0.3);
    border: 1px solid #444;
    border-radius: var(--radius);
    padding: 10px;
    display: flex;
    align-items: center;
    height: 45px; 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================
   13. FEATURE GRID & ROADMAP
   ========================================= */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
    width: 100%;
    max-width: 1200px; 
    margin: 40px auto; 
    padding: 0 20px;
    box-sizing: border-box;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333;
    padding: 25px;
    border-radius: var(--radius);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: border-color 0.2s, background 0.2s;
    height: 100%; 
}

.feature-card:hover {
    border-color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.05);
}

.feature-card img {
    width: 100px;
    height: 100px;
    border-radius: 25%;
    object-fit: cover;
    border: 2px solid var(--accent-gold);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    margin-bottom: 15px;
}

.feature-card h3 { margin-bottom: 10px; font-size: 1.1rem; color: var(--accent-gold); }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.4; }

.roadmap-container { width: 100%; max-width: 1200px; margin: 60px auto; padding: 0 20px; }
.roadmap-header { text-align: center; margin-bottom: 40px; }
.roadmap-header h2 { font-size: 2.5rem; color: var(--accent-gold); border-bottom: none; margin-bottom: 10px; }
.roadmap-header p { color: var(--text-muted); font-size: 1.1rem; }

.roadmap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.roadmap-col { background: var(--bg-panel); padding: 20px; border-radius: var(--radius); border: 1px solid #333; display: flex; flex-direction: column; height: 100%; }
.roadmap-col h3 { text-align: center; border-bottom: 1px solid #333; padding-bottom: 15px; margin-top: 0; margin-bottom: 20px; font-family: var(--font-heading); color: #fff; }

.roadmap-col.plan { border-top: 4px solid #6f42c1; }
.roadmap-col.prog { border-top: 4px solid #fd7e14; }
.roadmap-col.live { border-top: 4px solid #28a745; }

.roadmap-card { 
    background: rgba(255, 255, 255, 0.03); 
    padding: 15px; 
    border-radius: 4px; 
    margin-bottom: 15px; 
    border-left: 4px solid #444; 
    transition: background 0.2s; 
}
.roadmap-card:hover { 
    background: rgba(255, 255, 255, 0.06); 
}

.roadmap-col.plan .roadmap-card { border-left-color: #6f42c1; }
.roadmap-col.prog .roadmap-card { border-left-color: #fd7e14; }
.roadmap-col.live .roadmap-card { border-left-color: #28a745; }
.roadmap-card h4 { margin: 0 0 8px 0; color: #fff; font-family: var(--font-body); font-weight: 700; }
.roadmap-card p { margin: 0; font-size: 0.9em; color: var(--text-muted); line-height: 1.4; }
.empty-msg { text-align: center; opacity: 0.5; font-style: italic; font-size: 0.9em; }

/* =========================================
   14. AUTH PORTALS & GUILD LOGIN
   ========================================= */
.portal-wrapper { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 80vh; width: 100%; padding: 15px; }
.login-box { width: 100%; max-width: 360px; text-align: center; background: rgba(30, 30, 36, 0.95); padding: 30px 20px; border: 1px solid var(--accent-gold); border-radius: var(--radius); box-shadow: 0 0 25px rgba(0,0,0,0.8); position: relative; }
.login-box h2 { font-size: 1.5rem; margin-bottom: 5px; color: var(--text-white); border: none; }
.login-box p { font-size: 0.9rem; margin-bottom: 25px; }
.login-box input { width: 100%; background: #0a0a0a; border: 1px solid #333; text-align: center; font-size: 0.95rem; padding: 10px; transition: 0.3s; border-radius: var(--radius); color: #fff; }
.login-box input:focus { border-color: var(--accent-gold); box-shadow: 0 0 8px rgba(197, 160, 89, 0.2); outline: none; }
.login-box img { filter: drop-shadow(0 0 5px rgba(0,0,0,0.8)); transition: transform 0.3s; }
.login-box:hover img { transform: scale(1.05); }

.guild-login-grid { display: grid; grid-template-columns: 1fr 380px 1fr; gap: 20px; width: 100%; max-width: 1400px; margin: 40px auto; padding: 0 20px; align-items: start; }
.gl-sidebar { background: rgba(18, 17, 16, 0.85); border: 1px solid #333; border-radius: var(--radius); padding: 20px; backdrop-filter: blur(10px); max-height: 80vh; overflow-y: auto; }
.gl-sidebar h4 { border-bottom: 1px solid var(--accent-gold); padding-bottom: 10px; margin-bottom: 15px; font-size: 1rem; color: var(--accent-gold); }
.member-tag { display: inline-block; padding: 5px 10px; background: #000; border: 1px solid #333; border-radius: 4px; margin: 3px; font-size: 0.8rem; color: #ccc; }
.ach-item { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 8px; background: rgba(255,255,255,0.03); border-radius: 4px; }
.ach-icon-small { width: 32px; height: 32px; object-fit: contain; }
.event-item { margin-bottom: 15px; padding: 12px; background: linear-gradient(90deg, rgba(255,255,255,0.03), transparent); border-left: 3px solid var(--accent-gold); }


/* =========================================
   15. MOBILE & RESPONSIVE BREAKPOINTS
   ========================================= */
.mobile-nav { display: none; }

@media screen and (max-width: 1100px) {
    .guild-login-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "login login" "left right"; }
    .guild-login-grid > .login-box { grid-area: login; margin: 0 auto 30px; width: 100%; max-width: 400px; }
    .gl-sidebar:first-child { grid-area: left; } 
    .gl-sidebar:last-child { grid-area: right; } 
}

@media screen and (max-width: 1024px) {
    .guild-grid { grid-template-columns: repeat(2, 1fr); }
    .features { grid-template-columns: repeat(2, 1fr); }
}

@media screen and (max-width: 900px) {
    .roadmap-grid { grid-template-columns: 1fr; }
}

@media screen and (max-width: 768px) {
    .desktop-only, .navbar .nav-links { display: none !important; }
    
    .mobile-nav {
        display: flex !important;
        position: fixed; bottom: 0; left: 0; width: 100%;
        background: #1a1816;
        border-top: 1px solid var(--accent-gold);
        justify-content: space-around;
        padding: 10px 0;
        z-index: 9999;
        box-shadow: 0 -5px 15px rgba(0,0,0,0.8);
    }
    
    .nav-item {
        display: flex; flex-direction: column; align-items: center;
        text-decoration: none; color: var(--text-muted); font-size: 0.7rem;
    }
    .nav-item.active { color: var(--accent-gold); }

    .page-wrapper { flex-wrap: wrap; }
    .deck-sidebar, .deck-workspace { flex: 100%; }
    .container { padding-bottom: 80px; } 
    
    .mobile-table thead { display: none; }
    .mobile-table tr { 
        display: block; margin-bottom: 15px; border: 1px solid #444; 
        background: rgba(0,0,0,0.2); padding: 10px; border-radius: 8px;
    }
    .mobile-table td { display: block; border: none; padding-left: 0; }
    
    .guild-login-grid { display: flex; flex-direction: column; }
    .guild-login-grid > .login-box { order: -1; } 

    .log-header { display: none !important; }
    .log-row { flex-direction: column; align-items: stretch; gap: 5px; padding: 15px; }
    .log-rank { text-align: left; margin-bottom: 5px; color: var(--accent-gold); }
    .log-item { width: 100%; }

    /* MOBILE: Guild Switcher Fix */
    .guild-switcher form {
        flex-direction: column;
        align-items: stretch !important;
    }
    .guild-switcher select {
        width: 100% !important;
    }
}

@media screen and (max-width: 600px) {
    .guild-grid { grid-template-columns: 1fr; }
    .features { grid-template-columns: 1fr; }
    
    .button-grid { grid-template-columns: 1fr; }
    .guild-header-bar { padding: 10px; }
    .switcher-val { font-size: 0.9em; }
}

@media screen and (max-width: 480px) {
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.4rem; }
    
    .portal-wrapper { justify-content: flex-start; padding-top: 60px; }
    .login-box { padding: 20px 15px; }
    
    .discord-widget-container { width: 85%; right: 7.5%; bottom: 90px; height: 50vh; }
}

/* Add to style.css */
html {
    scroll-behavior: smooth;
}

/* Prevent layout shift on images/boxes */
img {
    height: auto;
    max-width: 100%;
}
.basket-sidebar {
    position: fixed;
    right: -350px; /* Hidden by default */
    top: 0;
    width: 350px;
    height: 100%;
    background: #0f0f10;
    border-left: 2px solid var(--accent-gold);
    transition: 0.3s;
    z-index: 9999;
    padding: 20px;
    overflow-y: auto;
}

.basket-sidebar.open {
    right: 0; /* Slides into view */
}

.basket-icon {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--accent-gold);
}

/* Shared light interface, aligned with Engine's site palette. */
body {
    background-color: var(--bg-dark);
    background-image: none;
    color: var(--text-main);
}

body::before {
    display: none;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    text-shadow: none;
}

a {
    color: var(--accent-gold);
}

a:hover {
    color: var(--accent-glow);
}

.btn, .cta-btn {
    background: var(--bg-panel);
    color: var(--text-main) !important;
    border-color: var(--accent-gold);
    box-shadow: var(--shadow);
}

.btn:hover, .cta-btn:hover {
    background: var(--bg-sunken, #f6f7f9) !important;
    color: var(--accent-gold) !important;
    border-color: var(--accent-gold);
    box-shadow: var(--shadow);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    background: var(--bg-input);
    color: var(--text-main);
    border-color: var(--border-color);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(168, 125, 42, 0.14);
}

.box, .stat-card, .login-box, .info-panel, .events-panel, .shop-container,
.profile-badge, .ach-panel {
    background: var(--bg-panel);
    color: var(--text-main);
    border-color: var(--border-color);
    box-shadow: var(--shadow);
    backdrop-filter: none;
}

.table-container {
    border-color: var(--border-color);
}

table {
    background: var(--bg-panel);
    color: var(--text-main);
}

th {
    background: var(--bg-sunken, #f6f7f9);
    color: var(--text-main);
    border-bottom-color: var(--border-color);
}

td {
    color: var(--text-main);
    border-bottom-color: var(--border-color);
}

tr:hover td {
    background: rgba(0, 0, 0, 0.035);
}

.shop-item, .guild-card, .ach-card {
    background: var(--bg-panel);
    border-color: var(--border-color);
    box-shadow: var(--shadow);
}

.shop-item img, .guild-img-box, .ach-icon-box {
    background: var(--bg-dark);
    border-color: var(--border-color);
}

.shop-title, .g-name, .ach-title, .stat-pill strong {
    color: var(--text-main);
}

.g-members, .ach-desc, .badge-desc {
    color: var(--text-muted);
}

.ach-header {
    background: var(--bg-sunken, #f6f7f9);
    color: var(--accent-gold);
}

.ach-header:hover {
    background: var(--bg-dark);
    color: var(--accent-gold);
}

.ach-content {
    background: var(--bg-sunken, #f6f7f9);
    border-top-color: var(--border-color);
}

.navbar, .guild-header-bar {
    background: var(--bg-panel);
    border-color: var(--border-color);
    box-shadow: var(--shadow);
}

.site-footer {
    background: var(--bg-panel);
    border-top-color: var(--border-color);
}

.feedback-bar {
    background: rgba(255, 255, 255, 0.96);
    color: var(--text-main);
    border-top-color: var(--accent-red);
    box-shadow: 0 -2px 8px rgba(16, 24, 40, 0.08);
}

.basket-sidebar {
    background: var(--bg-panel);
    border-left-color: var(--accent-gold);
    box-shadow: var(--shadow);
}

.mobile-table tr {
    background: var(--bg-panel);
    border-color: var(--border-color);
}

@media (max-width: 950px) {
    .tcg-navbar {
        background: rgba(255, 255, 255, 0.97) !important;
        border-bottom-color: var(--border-color) !important;
        box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
    }
}