/* =========================================
   1. GLOBAL BACKGROUND & LAYOUT
   ========================================= */
body {
    background: linear-gradient(135deg, #0b0b18, #1a1a2e, #16213e);
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    padding-bottom: 40px;
    padding-top: 70px; /* Space for fixed header */
}

/* =========================================
   2. TOP HEADER STYLES
   ========================================= */
.top-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 60px;
    background: rgba(11, 11, 24, 0.95); backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center; z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1); box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.app-logo {
    font-size: 1.2rem; font-weight: 800; letter-spacing: 1px;
    background: linear-gradient(to right, #0dcaf0, #d63384);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-right: auto;
    margin-left: 20px;
}

/* =========================================
   3. CORE CARD STYLES
   ========================================= */
.glass-card {
    background: rgba(30, 30, 40, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px; padding: 20px; margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3); overflow: hidden;
}

/* Stat Cards (for Calculator) */
.stat-card {
    background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px; padding: 10px; text-align: center; height: 100%;
}
.stat-val { font-size: 1.1rem; font-weight: 800; color: #fff; display: block; }
.stat-lbl { font-size: 0.65rem; color: #adb5bd; text-transform: uppercase; letter-spacing: 0.5px; }

/* =========================================
   4. UI HELPER ELEMENTS
   ========================================= */
.guide-box {
    background: rgba(13, 202, 240, 0.08); border-left: 3px solid #0dcaf0;
    padding: 12px; border-radius: 0 8px 8px 0; margin-bottom: 20px;
    font-size: 0.85rem; color: #adb5bd;
}
.step-badge { background: #0dcaf0; color: #000; font-weight: 700; padding: 1px 6px; border-radius: 4px; font-size: 0.7rem; margin-right: 5px; }

.btn-modern { border-radius: 50px; font-weight: 600; padding: 10px 0; box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.jp-display { font-size: 2rem; color: #0dcaf0; font-weight: 700; margin: 15px 0; }

/* =========================================
   5. POKEMON TCG CARD STYLE
   ========================================= */
.tcg-card {
    width: 100%; max-width: 320px; margin: 0 auto; border-radius: 20px; padding: 12px;
    background: #1a1a1a; border: 8px solid #fbd34d; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative; color: #fff; font-family: 'Segoe UI', sans-serif;
}
.tcg-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tcg-name { font-weight: 800; font-size: 1.2rem; }
.tcg-hp { font-weight: 700; color: #dc3545; font-size: 1rem; }
.tcg-image-box {
    background: #fff; box-shadow: inset 0 0 10px rgba(0,0,0,0.2); border-radius: 4px; height: 180px;
    display: flex; justify-content: center; align-items: center; margin-bottom: 10px;
    background-image: url('https://img.freepik.com/free-vector/abstract-background-with-squares_23-2148995948.jpg'); background-size: cover;
}
.tcg-img { height: 160px; filter: drop-shadow(5px 5px 5px rgba(0,0,0,0.4)); transition: transform 0.3s; }
.tcg-img:hover { transform: scale(1.15); }

.tcg-stats-box {
    background: #f8f9fa; /* Light background */
    border-radius: 4px;
    padding: 12px;
    font-size: 0.85rem;
    color: #212529 !important; /* Force text dark */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}
.tcg-footer { margin-top: 8px; font-size: 0.7rem; text-align: center; font-style: italic; opacity: 0.8; color: #fff; }

/* =========================================
   6. UTILITIES & ANIMATIONS
   ========================================= */
.custom-checkbox { width: 20px; height: 20px; cursor: pointer; accent-color: #0dcaf0; }

.section-view { display: none; }
.active-view { display: block; animation: fadeIn 0.4s; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }

/* =========================================
   7. FORCE MENU VISIBILITY FIX
   ========================================= */

/* Force the Main Menu Background to be Dark */
#menuOffcanvas {
    background-color: #0b0b18 !important; /* Dark Navy Background */
    background: #0b0b18 !important;       /* Fallback */
    color: #ffffff !important;            /* Force all text inside to be white */
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* Force the Close Button (X) to be White */
#menuOffcanvas .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 1;
}

/* Style the Menu Buttons */
.menu-btn {
    display: flex !important;             /* Ensure layout is correct */
    align-items: center !important;
    width: 100% !important;               /* Full width */
    padding: 15px !important;
    margin-bottom: 12px !important;

    /* Make button dark semi-transparent */
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 15px !important;

    /* Text Color */
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3); /* Add shadow for depth */
}

/* Ensure Text inside buttons is White */
.menu-btn span {
    color: #ffffff !important;
}

/* Hover Effects */
.menu-btn:hover {
    background-color: rgba(13, 202, 240, 0.2) !important; /* Cyan Tint */
    border-color: #0dcaf0 !important;
    transform: translateX(5px);
}

/* Icon Box Styles */
.icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Menu Header Line */
#menuOffcanvas .border-bottom {
    border-color: rgba(255,255,255,0.2) !important;
}

/* =========================================
   8. DATA VISUALIZATION STYLES
   ========================================= */
.data-pill {
    font-size: 0.7rem; font-weight: 600; padding: 4px 10px; border-radius: 12px;
    background: rgba(0, 0, 0, 0.05); color: #495057;
    border: 1px solid rgba(0, 0, 0, 0.1); display: inline-block; margin: 2px; text-transform: capitalize;
}

.stat-label {
    font-size: 0.7rem; font-weight: 700; color: #6c757d; width: 60px;
}
.progress-thin {
    height: 6px; border-radius: 3px; background-color: rgba(0,0,0,0.1);
    flex-grow: 1; margin: 0 10px;
}
.progress-fill {
    height: 100%; border-radius: 3px; transition: width 1s ease-in-out;
}

.info-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    text-align: center; background: rgba(255,255,255,0.05);
    border-radius: 12px; padding: 10px; margin-bottom: 15px;
}
.info-item h6 {
    font-size: 0.65rem; color: #adb5bd; text-transform: uppercase; margin-bottom: 2px; letter-spacing: 0.5px;
}
.info-item span {
    font-size: 0.95rem; font-weight: 800; color: #fff;
}