/* 
   GOTT DESIGN SYSTEM V3 (GODTIER)
   Unified Design Language for EdelsteinScalper
*/

:root {
    /* --- COLOR PALETTE --- */
    --bg-dark: #050505;
    --bg-glass: rgba(16, 18, 27, 0.6);
    --bg-glass-heavy: rgba(11, 12, 16, 0.85);

    --primary: #00f0ff;
    /* Neon Cyan */
    --primary-dim: rgba(0, 240, 255, 0.1);
    --primary-glow: rgba(0, 240, 255, 0.4);

    --accent: #ff0055;
    /* Neon Red */
    --accent-dim: rgba(255, 0, 85, 0.1);

    --secondary: #7000ff;
    /* Neon Purple */

    --success: #39ff14;
    /* Matrix Green */
    --warning: #ffcc00;
    /* Cyber Yellow */
    --danger: #ff2244;
    /* Critical Red */

    /* --- TYPOGRAPHY --- */
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-mono: 'Roboto Mono', monospace;

    --text-main: #ffffff;
    --text-dim: #a0a0b0;
    --text-muted: #666;

    /* --- SPACING & LAYOUT --- */
    --container-width: 1440px;
    --header-height: 80px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    /* --- GLASSMORPHISM --- */
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-blur: blur(20px);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

/* --- RESET & BASE --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* BACKGROUND (Starfield / Neural) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 15% 50%, rgba(112, 0, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(0, 240, 255, 0.05) 0%, transparent 40%),
        url('assets/bg.png');
    /* Fallback */
    background-size: cover;
    z-index: -2;
    pointer-events: none;
    animation: bgPulse 12s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }

    100% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* SCANLINES */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.2));
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.12;
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #020202;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-dim);
    border-radius: 4px;
    border: 1px solid var(--primary-dim);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: white;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

h2 {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

h3 {
    font-size: 1.2rem;
    color: var(--primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.text-dim {
    color: var(--text-dim);
}

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

.text-accent {
    color: var(--accent);
}

/* --- LAYOUT UTILITIES --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

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

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.flex {
    display: flex;
    gap: 15px;
}

.flex-col {
    flex-direction: column;
}

.flex-center {
    align-items: center;
    justify-content: center;
}

.flex-between {
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .flex-mobile-col {
        flex-direction: column;
    }
}

/* --- COMPONENTS --- */

/* 1. CARDS (Glassmorphism) */
.card {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s, border-color 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--glass-shadow), 0 0 20px var(--primary-dim);
    border-color: rgba(0, 240, 255, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Scraper Statuses */
.status-idle {
    background: #333;
    color: #aaa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

.status-running {
    background: var(--warning);
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    animation: bgPulse 1s infinite alternate;
}

.status-success {
    background: var(--success);
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

.status-failed {
    background: var(--danger);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* 2. BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    color: white;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: black;
    box-shadow: 0 0 15px var(--primary-dim);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

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

.btn-accent {
    background: var(--accent);
    color: white;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.btn-accent:hover {
    background: #ff2a6d;
    box-shadow: 0 0 20px var(--accent);
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-dim);
}

.btn-ghost:hover {
    border-color: white;
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

/* 3. INPUTS */
.input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #333;
    color: white;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    width: 100%;
    transition: 0.3s;
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-dim);
    background: rgba(0, 0, 0, 0.6);
}

/* 4. MODALS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    display: flex;
}

.modal-content {
    background: var(--bg-glass-heavy);
    border: 1px solid var(--primary-dim);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    padding: 30px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* --- HEADER (Global) --- */
header {
    height: var(--header-height);
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 500;
}

.header-inner {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

/* --- SPECIFIC MODULES (Tables, Alerts, Etc) --- */
.table-wrapper {
    background: var(--bg-glass);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

th,
td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(57, 255, 20, 0.1);
    color: var(--success);
    border: 1px solid rgba(57, 255, 20, 0.3);
}

.badge-warning {
    background: rgba(255, 204, 0, 0.1);
    color: var(--warning);
    border: 1px solid rgba(255, 204, 0, 0.3);
}

.badge-danger {
    background: rgba(255, 34, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(255, 34, 68, 0.3);
}

/* Animations */
@keyframes glitch {
    0% {
        transform: translate(0)
    }

    20% {
        transform: translate(-2px, 2px)
    }

    40% {
        transform: translate(-2px, -2px)
    }

    60% {
        transform: translate(2px, 2px)
    }

    80% {
        transform: translate(2px, -2px)
    }

    100% {
        transform: translate(0)
    }
}

.glitch-hover:hover {
    animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

/* Utilities specific to old layout to keep it working (Legacy Support) */
.mission-control {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.alerts-panel {
    height: 300px;
    overflow-y: auto;
}


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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Rajdhani', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* GODTIER BACKGROUND */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 10% 20%, rgba(112, 0, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 240, 255, 0.1) 0%, transparent 40%),
        url('assets/bg.png');
    /* Fallback / Texture */
    background-size: cover;
    z-index: -2;
    animation: bgPulse 10s ease-in-out infinite;
}

/* SCANLINE OVERLAY (CRT EFFECT) */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.2));
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.15;
}

@keyframes bgPulse {
    0% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.8;
    }
}

/* CUSTOM SCROLLBAR (Neon) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #050505;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
    box-shadow: 0 0 10px var(--primary);
}

::-webkit-scrollbar-thumb:hover {
    background: #fff;
}

/* GLITCH ANIMATION KEYFRAMES */
@keyframes glitch-anim-1 {
    0% {
        clip-path: inset(20% 0 80% 0);
        transform: translate(-2px, 1px);
    }

    20% {
        clip-path: inset(60% 0 10% 0);
        transform: translate(2px, -1px);
    }

    40% {
        clip-path: inset(40% 0 50% 0);
        transform: translate(-2px, 2px);
    }

    60% {
        clip-path: inset(80% 0 5% 0);
        transform: translate(2px, -2px);
    }

    80% {
        clip-path: inset(10% 0 70% 0);
        transform: translate(-1px, 1px);
    }

    100% {
        clip-path: inset(30% 0 50% 0);
        transform: translate(1px, -1px);
    }
}

.glitch-active {
    position: relative;
    animation: glitch-anim-1 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
    color: var(--primary);
    text-shadow: 2px 0 var(--accent), -2px 0 var(--secondary);
}

/* Typography */
h1,
h2,
h3 {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

/* Glassmorphism Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: var(--glass);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(5, 5, 5, 0.85);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    flex-wrap: wrap;
    /* Allow wrapping for mobile */
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Trading Bar - Now Integrated */
.trading-bar {
    display: flex;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    align-items: center;
    transition: all 0.3s ease;
}

.trading-bar:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-dim);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.stat-item {
    font-size: 0.8rem;
    color: var(--text-dim);
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.stat-value {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
}

.stat-value.highlight {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-dim);
}

.stat-value.accent {
    color: var(--accent);
}

/* Auth Buttons */
.btn-logout {
    background: rgba(255, 34, 68, 0.1);
    border: 1px solid rgba(255, 34, 68, 0.3);
    color: var(--score-low);
    padding: 8px 16px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Rajdhani', sans-serif;
    border-radius: 4px;
    transition: all 0.2s;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.btn-logout:hover {
    background: var(--score-low);
    color: #000;
    box-shadow: 0 0 15px var(--score-low);
}

/* Inputs & Form Elements */
.input-dark {
    background: #111;
    border: 1px solid #333;
    color: white;
    padding: 12px 16px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-dark:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
    background: #161616;
}

.btn-accent {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 24px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.2s;
    letter-spacing: 1px;
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
    /* Cyberpunk Shape */
}

.btn-accent:hover {
    background: #ff2266;
    box-shadow: 0 0 20px var(--accent);
    transform: translateY(-2px);
}

/* Modal Styles Refactored */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: none;
    /* Flex when active */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-content {
    background: var(--bg-dark);
    width: 90%;
    max-width: 800px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.1);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active {
    opacity: 1;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

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

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal-btn:hover {
    color: var(--accent);
}

main {
    padding: 1.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Radius Control */
.radius-control {
    text-align: center;
    padding: 1rem;
    color: var(--primary);
    font-family: 'Orbitron', monospace;
}

input[type=range] {
    width: 200px;
    accent-color: var(--primary);
}

/* Rank Badges */
.rank-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.rank-A-plus,
.rank-A {
    background: var(--score-high);
    color: black;
    box-shadow: 0 0 10px var(--score-high);
}

.rank-B {
    background: var(--score-mid);
    color: black;
}

.rank-C {
    background: orange;
    color: black;
}

.rank-D {
    background: var(--score-low);
    color: white;
}

/* Intel Grid */
.intel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Alerts Panel */
.alerts-panel {
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 0 30px rgba(255, 0, 85, 0.1);
    backdrop-filter: var(--glass);
    height: 300px;
    /* Fixed height for consistency */
    display: flex;
    flex-direction: column;
}

.sniper-panel {
    border-color: var(--score-high);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.1);
}

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

.alerts-header h3 {
    color: var(--accent);
    margin: 0;
}

.channel-status {
    display: flex;
    gap: 1rem;
}

.channel {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #333;
    color: #555;
    background: rgba(0, 0, 0, 0.3);
}

.channel.telegram {
    color: #0088cc;
    border-color: #0088cc;
    background: rgba(0, 136, 204, 0.1);
}

.channel.discord {
    color: #5865F2;
}

.channel.inactive {
    opacity: 0.5;
}

.btn-warning {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 16px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-warning:hover {
    box-shadow: 0 0 15px var(--accent);
    transform: translateY(-2px);
}

.alerts-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.alert-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem;
    border-radius: 6px;
    border-left: 3px solid var(--text-dim);
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
}

.alert-item.score-high {
    border-left-color: var(--score-high);
    background: rgba(0, 255, 136, 0.05);
}

.alert-item.score-mid {
    border-left-color: var(--score-mid);
}

.alert-item.score-low {
    border-left-color: var(--score-low);
}

.alert-empty {
    text-align: center;
    color: var(--text-dim);
    font-style: italic;
    padding: 1rem;
}

/* Table Wrapper */
.table-wrapper {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: var(--glass);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: rgba(255, 255, 255, 0.05);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Diamond Cells */
.diamond-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.diamond-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.diamond-img:hover {
    transform: scale(1.5);
    z-index: 10;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary);
}

.title-text {
    font-weight: 700;
    color: #fff;
    display: block;
    margin-bottom: 4px;
}

.subtitle-text {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Scores */
.score-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    min-width: 50px;
    text-align: center;
}

.score-high {
    background: rgba(0, 255, 136, 0.15);
    color: var(--score-high);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.score-mid {
    background: rgba(255, 204, 0, 0.15);
    color: var(--score-mid);
    border: 1px solid rgba(255, 204, 0, 0.3);
}

.score-low {
    background: rgba(255, 34, 68, 0.15);
    color: var(--score-low);
    border: 1px solid rgba(255, 34, 68, 0.3);
}

/* Pricing */
.price-current {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.price-fair {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.time-badge {
    font-family: 'Orbitron', sans-serif;
    color: var(--text-dim);
}

.time-urgent {
    color: var(--accent);
    animation: pulse 1s infinite;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-top: 4rem;
}

/* Valuation Styles */
.valuation-panel {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: none;
    /* Hidden by default */
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.valuation-panel.active {
    display: grid;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.val-col h4 {
    margin-bottom: 0.8rem;
    color: var(--primary);
    font-size: 0.85rem;
}

.progress-item {
    margin-bottom: 12px;
}

.p-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 4px;
    color: #ccc;
}

.p-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.p-bar-fill {
    height: 100%;
    border-radius: 3px;
    width: 0%;
    transition: width 1s ease-out;
}

.val-good {
    background: var(--score-high);
}

.val-mid {
    background: var(--score-mid);
}

.val-bad {
    background: var(--score-low);
}

.ai-explanation {
    grid-column: 1 / -1;
    font-style: italic;
    color: var(--text-dim);
    font-size: 0.9rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}

.expand-btn {
    background: none;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    margin-left: 10px;
}

.expand-btn:hover {
    background: var(--primary);
    color: #000;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }

    main {
        padding: 1rem;
    }

    th,
    td {
        padding: 1rem;
    }

    .status-bar {
        display: none;
    }
}

.close-btn:hover {
    color: var(--accent) !important;
    transform: scale(1.1);
}

/* Mission Control (Compact) */
.mission-control {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.feature-card {
    background: rgba(20, 20, 30, 0.4);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 4px;
    padding: 1rem;
    text-align: left;
    backdrop-filter: blur(5px);
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature-card:hover {
    border-color: var(--primary);
    background: rgba(20, 20, 30, 0.6);
}

.glowing-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-bottom: 0;
    filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.3));
}

.feature-card div {
    flex: 1;
}

.feature-card h3 {
    color: var(--primary);
    margin: 0 0 2px 0;
    font-size: 0.9rem;
}

.feature-card p {
    color: var(--text-dim);
    font-size: 0.75rem;
    line-height: 1.2;
    margin: 0;
}

/* Compact Table */
th,
td {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    vertical-align: middle;
}

.diamond-img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: contain;
    /* Prevent cropping of Pokemon/Jewelry */
    background: rgba(255, 255, 255, 0.05);
    /* Subtle bg for transparent pngs */
}

.score-badge {
    padding: 2px 8px;
    font-size: 0.8rem;
    min-width: 40px;
}

.price-current {
    font-size: 0.95rem;
}