@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Roboto:wght@400;700&display=swap');

        /* --- THEME --- */
        :root {
            --primary: #0091ea; 
            --primary-dim: #0064b7;
            --bg-glass: rgba(15, 15, 15, 0.95);
            --text-main: #ffffff;
            --text-dim: #aaaaaa;
            --border: 1px solid rgba(0, 145, 234, 0.3);
            --green: #00e676;
            --alert: #ff3d00;
        }

        /* --- BLACK BOX FIX: CRITICAL SETTINGS --- */
        body {
            margin: 0;
            padding: 0;
            font-family: 'Roboto', sans-serif;
            background-color: transparent; /* ESSENTIAL */
            color: var(--text-main);
            overflow: hidden;
            height: 100vh; /* ESSENTIAL */
            width: 100vw;  /* ESSENTIAL */
            user-select: none;
        }

        /* --- DRAGGABLE CONTAINER --- */
        #app-container {
            position: absolute;
            top: 50px;
            left: 50px;
            width: 320px;
            background: var(--bg-glass);
            border: var(--border);
            border-radius: 8px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.8);
            display: flex;
            flex-direction: column;
            resize: both;
            overflow: hidden;
            min-height: 250px;
        }

        /* --- HEADER --- */
        header {
            background: linear-gradient(90deg, var(--primary-dim), var(--primary));
            padding: 8px 12px;
            cursor: move;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-family: 'Rajdhani', sans-serif;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-size: 1.1em;
        }

        /* --- CONTENT --- */
        #content {
            padding: 12px;
            flex: 1;
            overflow-y: auto;
            scrollbar-width: thin;
        }

        .section {
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        .section:last-child { border-bottom: none; }

        .label {
            font-size: 0.75em;
            color: var(--text-dim);
            text-transform: uppercase;
            margin-bottom: 2px;
        }
        .value {
            font-size: 1.1em;
            font-weight: bold;
            color: var(--text-main);
        }
        .value.highlight { color: var(--primary); }
        .value.bxp { color: var(--green); }

        /* --- PROGRESS BAR --- */
        .progress-container {
            position: relative;
            height: 18px;
            background: rgba(0,0,0,0.5);
            border-radius: 4px;
            margin: 5px 0 5px 0;
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.1);
        }
        .progress-bar {
            height: 100%;
            background: var(--primary);
            width: 0%;
            transition: width 0.3s ease;
        }
        .progress-text {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 0.7em;
            text-shadow: 1px 1px 2px black;
            font-weight: bold;
            z-index: 2;
        }
        
        /* --- INVENTORY ROWS --- */
        .inv-row {
            display: flex; 
            justify-content: space-between; 
            align-items: center;
            background: rgba(0,0,0,0.2); 
            padding: 4px 8px;
            margin-bottom: 4px; 
            border-radius: 4px;
            border-left: 3px solid var(--text-dim);
        }
        .inv-name { font-size: 0.8em; }
        .inv-stats { font-size: 0.8em; text-align: right; }
        .inv-used { color: var(--primary); font-weight: bold; margin-left: 6px; }
        .low-stock { border-left-color: var(--alert); }

        /* --- STAT GRID (UPDATED TO 3 COLUMNS) --- */
        .stat-grid {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr; /* 3 Columns for Avg XP */
            gap: 5px;
        }
        .stat-box {
            background: rgba(255,255,255,0.05);
            padding: 8px;
            border-radius: 4px;
            text-align: center;
        }

        /* --- INPUTS --- */
        input[type="number"] {
            width: 90%;
            background: rgba(0,0,0,0.3);
            border: 1px solid #444;
            color: white;
            padding: 6px;
            border-radius: 4px;
            margin-top: 5px;
            font-family: inherit;
        }
        input:focus { outline: 1px solid var(--primary); }

        /* --- ALERTS / CALCULATOR --- */
        .calc-output {
            margin-top: 8px;
            font-size: 0.85em;
            line-height: 1.4;
            color: var(--text-dim);
            word-wrap: break-word;
        }
        .calc-output b { color: white; }
        
        /* QUICK BUTTONS */
        .quick-btn-row {
            display: flex; gap: 5px; margin-top: 5px; justify-content: center;
        }
        .quick-btn {
            background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
            color: #ccc; font-size: 0.7em; padding: 2px 6px; border-radius: 3px; cursor: pointer;
            font-family: 'Rajdhani', sans-serif; font-weight: bold; flex: 1;
        }
        .quick-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }