:root {
    --bg-dark: #0a0a0c;
    --card-bg: rgba(25, 25, 30, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #f0f0f5;
    --text-muted: #8b8b99;
    --accent: #4361ee;
    --accent-glow: rgba(67, 97, 238, 0.3);
    --profit: #00e676;
    --loss: #ff4d4d;
}

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

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

/* Background Ambient Glow */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, var(--accent-glow) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glassmorphism Utility */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 8px;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--profit);
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 10px var(--profit);
    animation: pulse 2s infinite;
}

.header-status {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 15px var(--profit); }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.metric-card {
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

.metric-card h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric-card h2 {
    font-size: 2.2rem;
    font-weight: 700;
}

.text-gradient {
    background: linear-gradient(90deg, #4361ee, #4cc9f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Sections */
.chart-section, .reports-section {
    padding: 2rem;
    margin-bottom: 2.5rem;
}

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

.section-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
}

.section-header .subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.chart-container {
    height: 400px;
    width: 100%;
}

/* Table */
.table-container {
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
}

/* Custom Scrollbar for table */
.table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.table-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}
.table-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}
.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    position: sticky;
    top: 0;
    background: rgba(15, 15, 18, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.95rem;
}

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

.profit {
    color: var(--profit);
    font-weight: 600;
}

.loss {
    color: var(--loss);
    font-weight: 600;
}

.dir-ce {
    background: rgba(0, 230, 118, 0.1);
    color: var(--profit);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

.dir-pe {
    background: rgba(255, 77, 77, 0.1);
    color: var(--loss);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

.header-status { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; font-size: 0.85rem; }
.status-item { display: flex; align-items: center; gap: 8px; color: #8b8b99; }
#bot-status { color: #a1a1b5; }

/* Login Page 3D Aesthetics */
.login-body { display: flex; justify-content: center; align-items: center; min-height: 100vh; overflow: hidden; background: radial-gradient(circle at center, #1a1a2e 0%, #0f0f12 100%); perspective: 1000px; }
.card-3d-wrap { perspective: 1000px; width: 100%; max-width: 400px; }
.login-card { padding: 40px; transform-style: preserve-3d; box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.1); display: flex; flex-direction: column; gap: 24px; position: relative; z-index: 10; }
.login-card::before { content: ""; position: absolute; inset: -2px; background: linear-gradient(45deg, #00e676, transparent, #4361ee); z-index: -1; filter: blur(10px); opacity: 0.5; border-radius: 16px; }
.login-header { text-align: center; transform: translateZ(50px); }
.login-form { display: flex; flex-direction: column; gap: 20px; transform: translateZ(30px); }
.input-group label { font-size: 0.85rem; color: #8b8b99; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; display: block; }
.input-group input { width: 100%; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); padding: 12px 16px; border-radius: 8px; color: #fff; font-size: 1rem; transition: border-color 0.3s, box-shadow 0.3s; }
.input-group input:focus { outline: none; border-color: #4361ee; box-shadow: 0 0 15px rgba(67,97,238,0.3); }
.login-btn { position: relative; background: #4361ee; color: white; border: none; padding: 14px; border-radius: 8px; font-weight: 600; font-size: 0.95rem; cursor: pointer; overflow: hidden; transition: transform 0.2s; transform: translateZ(40px); }
.login-btn:hover { transform: translateZ(40px) scale(1.02); }
.btn-glow { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transform: translateX(-100%); transition: transform 0.5s; }
.login-btn:hover .btn-glow { transform: translateX(100%); }
.login-error { background: rgba(255, 51, 102, 0.1); color: #ff3366; border: 1px solid rgba(255, 51, 102, 0.3); padding: 10px; border-radius: 6px; text-align: center; font-size: 0.9rem; transform: translateZ(20px); }

/* Full Motion Video Background */
.video-bg-container { position: absolute; top: 0; left: 0; width: 100vw; height: 100vh; overflow: hidden; z-index: 1; }
.video-bg-container iframe { width: 100vw; height: 56.25vw; min-height: 100vh; min-width: 177.77vh; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; filter: brightness(0.3) contrast(1.2); }
.login-wrapper { position: relative; z-index: 10; width: 100%; display: flex; justify-content: center; }

/* V2 Login Layout matching Mockup */
.login-layout { margin: 0; padding: 0; min-height: 100vh; display: flex; font-family: Inter, sans-serif; background-color: #050510; color: #fff; overflow: hidden; position: relative; }
.login-bg { position: absolute; inset: 0; background: url(geometric_bull_bg.jpg) no-repeat center center; background-size: cover; z-index: 0; filter: brightness(0.7) contrast(1.1); }
.login-left { width: 50%; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; z-index: 10; position: relative; }
.login-right { width: 50%; display: flex; justify-content: center; align-items: center; z-index: 10; padding: 40px; }
.floating-widgets { display: flex; flex-direction: column; gap: 20px; }
.market-widget { background: rgba(15,15,25,0.7); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 15px 20px; width: fit-content; min-width: 180px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.widget-top { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.icon { width: 30px; height: 30px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 14px; color: #fff; }
.icon.gold { background: linear-gradient(135deg, #f6d365, #fda085); }
.icon.btc { background: linear-gradient(135deg, #f6d365, #ff9000); }
.symbol { font-weight: 600; font-size: 0.9rem; letter-spacing: 0.5px; }
.market-widget .price { font-size: 1.2rem; font-weight: 700; margin-bottom: 5px; }
.change.positive { color: #00e676; font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.hero-text { margin-bottom: 20px; }
.hero-text h1 { font-size: 2.2rem; font-weight: 700; margin-bottom: 10px; line-height: 1.2; text-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.hero-text p { color: #a1a1b5; font-size: 0.95rem; line-height: 1.5; }
.blue-text { color: #3a86ff; }
.login-card-v2 { background: rgba(15,15,25,0.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; padding: 50px 40px; width: 100%; max-width: 450px; box-shadow: 0 20px 60px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(255,255,255,0.05); position: relative; }
.login-card-v2::after { content: ""; position: absolute; inset: -1px; border-radius: 20px; background: linear-gradient(180deg, rgba(58,134,255,0.5), transparent, transparent); z-index: -1; }
.card-header { text-align: center; margin-bottom: 30px; }
.logo-circle { width: 70px; height: 70px; border-radius: 50%; background: linear-gradient(135deg, #2b2b3c, #151520); display: flex; justify-content: center; align-items: center; margin: 0 auto 15px; border: 1px solid rgba(255,215,0,0.3); box-shadow: 0 0 20px rgba(255,215,0,0.1); }
.logo-icon { font-size: 32px; color: #ffd700; }
.brand-title { font-size: 1.5rem; font-weight: 700; letter-spacing: 1px; margin-bottom: 5px; }
.brand-sub { font-size: 0.65rem; color: #8b8b99; letter-spacing: 2px; text-transform: uppercase; }
.welcome-text { text-align: center; margin-bottom: 30px; }
.welcome-text h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 5px; }
.welcome-text p { color: #8b8b99; font-size: 0.85rem; }
.v2-form { display: flex; flex-direction: column; gap: 20px; }
.form-group label { font-size: 0.75rem; color: #fff; font-weight: 600; letter-spacing: 1px; margin-bottom: 8px; display: block; }
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 15px; color: #8b8b99; font-size: 14px; }
.input-wrapper input { width: 100%; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 14px 15px 14px 45px; color: #fff; font-size: 0.95rem; font-family: Inter, sans-serif; transition: all 0.3s; }
.input-wrapper input:focus { outline: none; border-color: #3a86ff; box-shadow: 0 0 15px rgba(58,134,255,0.2); }
.show-pass { position: absolute; right: 15px; color: #8b8b99; font-size: 14px; cursor: pointer; transition: color 0.3s; }
.show-pass:hover { color: #fff; }
.form-options { display: flex; justify-content: space-between; align-items: center; margin-top: -5px; }
.remember { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: #8b8b99; cursor: pointer; }
.forgot { color: #3a86ff; font-size: 0.8rem; text-decoration: none; transition: color 0.3s; }
.forgot:hover { color: #fff; }
.btn-primary { background: linear-gradient(90deg, #1e90ff, #3a86ff); color: #fff; border: none; padding: 15px; border-radius: 8px; font-weight: 700; font-size: 0.95rem; letter-spacing: 1px; cursor: pointer; transition: all 0.3s; margin-top: 10px; box-shadow: 0 10px 20px rgba(58,134,255,0.3); }
.btn-primary:hover { box-shadow: 0 10px 30px rgba(58,134,255,0.5); transform: translateY(-2px); }
.card-footer { text-align: center; margin-top: 30px; font-size: 0.75rem; color: #5a5a6a; display: flex; justify-content: center; align-items: center; gap: 8px; }
.error-banner { background: rgba(255, 51, 102, 0.1); color: #ff3366; border: 1px solid rgba(255, 51, 102, 0.3); padding: 12px; border-radius: 8px; text-align: center; font-size: 0.85rem; margin-bottom: 20px; }
