/* ==========================================================
   frontend/style.css
   Luxury Futuristic Dark Charcoal Glassmorphism Redesign
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Tokens */
    --bg-base: #060608;
    --bg-surface: #0f0f13;
    --card-bg: rgba(10, 10, 15, 0.25);
    --card-bg-hover: rgba(15, 15, 22, 0.35);
    --border-color: rgba(255, 255, 255, 0.28);
    --border-color-hover: rgba(0, 229, 255, 0.5);
    
    /* Neon Accents */
    --primary: #ff8c00;
    --primary-alt: #ff007f;
    --secondary: #00f5a0;
    --secondary-alt: #00e5ff;
    
    --accent-cyan: #00e5ff;
    --accent-green: #00f5a0;
    --accent-rose: #ff416c;
    --accent-orange: #ff7b00;
    --accent-purple: #8a2be2;

    /* Text Colors */
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --text-dark: #060608;

    /* Gradients */
    --grad-primary: linear-gradient(135deg, #ff8c00 0%, #ff007f 50%, #8a2be2 100%); /* Aurora Sunset: Orange -> Pink -> Purple */
    --grad-secondary: linear-gradient(135deg, #00f5a0 0%, #00e5ff 100%); /* Cyber Ocean: Mint -> Cyan */
    --grad-accent: linear-gradient(135deg, #00f5a0 0%, #ffb300 100%); /* Gold Mint */
    --grad-danger: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    --grad-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);

    /* Depth, Shadows & Glows */
    --shadow-3d: 
        0 15px 35px rgba(0, 0, 0, 0.5), 
        inset 0 1px 0 rgba(255, 255, 255, 0.12), 
        inset 0 -1px 0 rgba(0, 0, 0, 0.4),
        0 0 15px rgba(0, 229, 255, 0.03);
    
    --shadow-3d-hover: 
        0 25px 50px rgba(0, 0, 0, 0.65), 
        inset 0 1px 0 rgba(255, 255, 255, 0.2), 
        inset 0 -1px 0 rgba(0, 0, 0, 0.4),
        0 0 25px rgba(0, 229, 255, 0.12);

    --shadow-neon-blue: 0 0 25px rgba(0, 229, 255, 0.35);
    --shadow-neon-pink: 0 0 25px rgba(255, 0, 127, 0.35);
    --shadow-neon-green: 0 0 25px rgba(0, 245, 160, 0.35);
    
    /* Layout Rules */
    --radius-lg: 24px;
    --radius-xl: 28px;
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Plus Jakarta Sans', 'Outfit', sans-serif;
}

/* Light / Frosted Silver Glass Theme Override */
body.light-theme {
    --bg-base: #f1f5f9;
    --bg-surface: #e2e8f0;
    --card-bg: rgba(255, 255, 255, 0.5);
    --card-bg-hover: rgba(255, 255, 255, 0.7);
    --border-color: rgba(0, 0, 0, 0.06);
    --border-color-hover: rgba(0, 0, 0, 0.12);
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-dark: #f8fafc;

    --grad-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.3) 100%);
    
    --shadow-3d: 
        0 12px 30px rgba(0, 0, 0, 0.04), 
        inset 0 1px 0 rgba(255, 255, 255, 0.95), 
        inset 0 -1px 0 rgba(0, 0, 0, 0.02),
        0 0 15px rgba(0, 229, 255, 0.02);
    
    --shadow-3d-hover: 
        0 20px 40px rgba(0, 0, 0, 0.08), 
        inset 0 1px 0 rgba(255, 255, 255, 0.98), 
        inset 0 -1px 0 rgba(0, 0, 0, 0.02),
        0 0 25px rgba(0, 229, 255, 0.06);
}

body.light-theme .orb {
    mix-blend-mode: multiply;
    opacity: 0.1;
}

body.light-theme input, 
body.light-theme select, 
body.light-theme textarea {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.08);
    color: #0f172a;
}

body.light-theme input:focus, 
body.light-theme select:focus, 
body.light-theme textarea:focus {
    background: #fff;
    border-color: var(--primary);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-ar);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Background Particle Matrix System */
.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.65;
}

.glass-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0.1) 80%);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.45;
    mix-blend-mode: screen;
    animation: orbFloat 25s infinite alternate ease-in-out;
}

.orb-1 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.3) 0%, transparent 70%);
    top: -15%;
    right: 5%;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 0, 127, 0.25) 0%, transparent 70%);
    bottom: -15%;
    left: 5%;
    animation-delay: -5s;
}

.orb-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(0, 245, 160, 0.25) 0%, transparent 70%);
    top: 30%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 90px) scale(1.2); }
}

/* Master App Container layout */
.app-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    width: 96vw;
    height: 94vh;
    max-width: 1760px;
    background: rgba(10, 10, 15, 0.25) !important;
    backdrop-filter: blur(35px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(180%) !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: var(--radius-xl);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    position: relative;
    z-index: 10;
}

/* Sidebar styling */
.sidebar {
    background: rgba(10, 10, 15, 0.25) !important;
    backdrop-filter: blur(25px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(150%) !important;
    border-left: 1.5px solid var(--border-color) !important;
    padding: 40px 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 50px;
    padding-right: 10px;
}

.brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--grad-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    color: #fff;
    box-shadow: var(--shadow-neon-blue);
    position: relative;
    overflow: hidden;
}

.brand-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shine 4s infinite;
}

@keyframes shine {
    0% { transform: translate(-100%, -100%) rotate(45deg); }
    100% { transform: translate(100%, 100%) rotate(45deg); }
}

.brand h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(to left, #ffffff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex-grow: 1;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 18px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 16px 22px;
    border-radius: 18px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: right;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-btn i {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 70%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.2),
        inset 0 -1.5px 2px rgba(0, 0, 0, 0.4),
        0 4px 10px rgba(0, 0, 0, 0.3);
    color: var(--text-muted);
}

.nav-btn:hover i {
    transform: scale(1.1) rotate(6deg);
}

/* Unique color themes per service/icon */
.icon-technical {
    color: var(--accent-cyan) !important;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
    background: radial-gradient(circle at 30% 30%, rgba(0, 229, 255, 0.18) 0%, rgba(0, 229, 255, 0.02) 70%) !important;
    border-color: rgba(0, 229, 255, 0.25) !important;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.15), inset 0 1.5px 2px rgba(255, 255, 255, 0.2), inset 0 -1.5px 2px rgba(0, 0, 0, 0.4) !important;
}
.icon-binary {
    color: var(--secondary) !important;
    text-shadow: 0 0 10px rgba(255, 0, 127, 0.6);
    background: radial-gradient(circle at 30% 30%, rgba(255, 0, 127, 0.18) 0%, rgba(255, 0, 127, 0.02) 70%) !important;
    border-color: rgba(255, 0, 127, 0.25) !important;
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.15), inset 0 1.5px 2px rgba(255, 255, 255, 0.2), inset 0 -1.5px 2px rgba(0, 0, 0, 0.4) !important;
}
.icon-psychology {
    color: var(--accent-purple) !important;
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.6);
    background: radial-gradient(circle at 30% 30%, rgba(138, 43, 226, 0.18) 0%, rgba(138, 43, 226, 0.02) 70%) !important;
    border-color: rgba(138, 43, 226, 0.25) !important;
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.15), inset 0 1.5px 2px rgba(255, 255, 255, 0.2), inset 0 -1.5px 2px rgba(0, 0, 0, 0.4) !important;
}
.icon-journal {
    color: var(--accent-green) !important;
    text-shadow: 0 0 10px rgba(0, 245, 160, 0.6);
    background: radial-gradient(circle at 30% 30%, rgba(0, 245, 160, 0.18) 0%, rgba(0, 245, 160, 0.02) 70%) !important;
    border-color: rgba(0, 245, 160, 0.25) !important;
    box-shadow: 0 0 15px rgba(0, 245, 160, 0.15), inset 0 1.5px 2px rgba(255, 255, 255, 0.2), inset 0 -1.5px 2px rgba(0, 0, 0, 0.4) !important;
}
.icon-settings {
    color: var(--accent-orange) !important;
    text-shadow: 0 0 10px rgba(255, 123, 0, 0.6);
    background: radial-gradient(circle at 30% 30%, rgba(255, 123, 0, 0.18) 0%, rgba(255, 123, 0, 0.02) 70%) !important;
    border-color: rgba(255, 123, 0, 0.25) !important;
    box-shadow: 0 0 15px rgba(255, 123, 0, 0.15), inset 0 1.5px 2px rgba(255, 255, 255, 0.2), inset 0 -1.5px 2px rgba(0, 0, 0, 0.4) !important;
}

/* Hover effects inside navbar */
.nav-btn:hover .icon-technical {
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.4), inset 0 1.5px 2px rgba(255, 255, 255, 0.25) !important;
}
.nav-btn:hover .icon-binary {
    box-shadow: 0 0 25px rgba(255, 0, 127, 0.4), inset 0 1.5px 2px rgba(255, 255, 255, 0.25) !important;
}
.nav-btn:hover .icon-psychology {
    box-shadow: 0 0 25px rgba(138, 43, 226, 0.4), inset 0 1.5px 2px rgba(255, 255, 255, 0.25) !important;
}
.nav-btn:hover .icon-journal {
    box-shadow: 0 0 25px rgba(0, 245, 160, 0.4), inset 0 1.5px 2px rgba(255, 255, 255, 0.25) !important;
}
.nav-btn:hover .icon-settings {
    box-shadow: 0 0 25px rgba(255, 123, 0, 0.4), inset 0 1.5px 2px rgba(255, 255, 255, 0.25) !important;
}

/* Active links custom indicators styling */
.nav-btn.active .icon-technical {
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.65), inset 0 1.5px 2px rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(0, 229, 255, 0.6) !important;
}
.nav-btn.active .icon-binary {
    box-shadow: 0 0 30px rgba(255, 0, 127, 0.65), inset 0 1.5px 2px rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 0, 127, 0.6) !important;
}
.nav-btn.active .icon-psychology {
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.65), inset 0 1.5px 2px rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(138, 43, 226, 0.6) !important;
}
.nav-btn.active .icon-journal {
    box-shadow: 0 0 30px rgba(0, 245, 160, 0.65), inset 0 1.5px 2px rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(0, 245, 160, 0.6) !important;
}
.nav-btn.active .icon-settings {
    box-shadow: 0 0 30px rgba(255, 123, 0, 0.65), inset 0 1.5px 2px rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 123, 0, 0.6) !important;
}

.sidebar-footer {
    padding: 20px 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.theme-toggle-wrapper {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-3d);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.theme-toggle-btn:hover {
    transform: scale(1.1) rotate(15deg);
    border-color: var(--primary);
    box-shadow: var(--shadow-neon-blue);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: relative;
}

.pulse-dot.green {
    background-color: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
}

.pulse-dot.green::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--accent-green);
    animation: pulse 1.8s infinite;
    top: 0;
    left: 0;
}

.pulse-dot.red {
    background-color: var(--accent-rose);
    box-shadow: 0 0 10px var(--accent-rose);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.8); opacity: 0; }
}

/* Main Content Area */
.main-content {
    padding: 50px;
    overflow-y: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tab-panel {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    flex-direction: column;
    flex-grow: 1;
}

.tab-panel.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Panel Header & Custom Hero Redesign */
.panel-header {
    margin-bottom: 40px;
}

.panel-header h1 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 40%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.panel-header p {
    color: var(--text-muted);
    font-size: 15px;
}

/* Custom 3D Hero Redesign header */
.hero-header {
    position: relative;
    padding: 50px;
    background: linear-gradient(135deg, rgba(15, 15, 20, 0.6) 0%, rgba(8, 8, 12, 0.4) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-3d);
    margin-bottom: 45px;
}

.hero-glow {
    position: absolute;
    top: -50%;
    left: -20%;
    width: 250px;
    height: 250px;
    background: var(--primary);
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
}

.hero-content {
    max-width: 60%;
    z-index: 5;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.2);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-content h1 {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content h1 .gradient-text {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 229, 255, 0.2);
}

.hero-content p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 30px;
}

.hero-decor {
    position: relative;
    width: 30%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

/* Floating Glass 3D objects */
.float-glass-object {
    position: absolute;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(15px);
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.2),
        0 15px 35px rgba(0, 0, 0, 0.5);
    animation: floatObj 8s infinite alternate ease-in-out;
}

.float-glass-object.obj-1 {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    top: 10px;
    left: 20px;
    transform: rotate(15deg);
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.12) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.float-glass-object.obj-2 {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    bottom: 10px;
    right: 30px;
    background: linear-gradient(135deg, rgba(255, 0, 127, 0.08) 0%, rgba(255, 255, 255, 0.01) 100%);
    animation-delay: -3s;
}

@keyframes floatObj {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-18px) rotate(15deg); }
}

/* Master 3D Glass Card Design */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-3d);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%);
    pointer-events: none;
}

/* Card hover animation with reflection sweep */
.glass-card:hover {
    background: var(--card-bg-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-3d-hover);
}

/* Grid Layouts */
.panel-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 40px;
    flex-grow: 1;
    min-height: 0;
}

.control-card {
    padding: 35px;
    height: fit-content;
}

.control-card h3 {
    margin-bottom: 30px;
    font-size: 19px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Typography styles inside titles & components */
.panel-header h1 i,
.control-card h3 i,
.output-header h3 i,
.smc-signals-container h4 i,
.orderflow-container h4 i,
.institutional-container h4 i,
.chat-avatar i,
.journal-grid h3 i {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
    font-size: 14px;
    margin-left: 10px;
    transition: all 0.4s ease;
}

.glass-card:hover h3 i,
.glass-card:hover h4 i {
    transform: scale(1.1) rotate(8deg);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.35);
}

/* Form inputs styling */
.form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 15px;
    transition: all 0.3s;
}

.input-wrapper input {
    padding-right: 48px !important;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    color: var(--text-main);
    font-size: 14.5px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: var(--font-en);
}

/* Target Arabic layout inside inputs */
input::placeholder,
textarea::placeholder {
    font-family: var(--font-ar);
    color: #64748b;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
    background: rgba(0, 0, 0, 0.5);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    cursor: pointer;
}

.form-group-checkbox input[type="checkbox"] {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
    border-radius: 6px;
    cursor: pointer;
}

/* High-End Glass buttons with 3D Tactile shapes */
.btn-primary {
    width: 100%;
    padding: 16px 24px;
    background: var(--grad-primary);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 3px solid rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    color: #fff; /* High contrast white text for the multi-colored gradient */
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(255, 0, 127, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 15px 35px rgba(255, 0, 127, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    filter: brightness(1.15);
}

.btn-primary:active {
    transform: translateY(1px) scale(0.99);
    box-shadow: 0 5px 15px rgba(255, 0, 127, 0.15);
}

.btn-secondary {
    width: 100%;
    padding: 16px 24px;
    background: var(--grad-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 2px solid rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    color: #060608; /* Dark text for contrast on Cyber Ocean mint/cyan */
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0, 245, 160, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 245, 160, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    filter: brightness(1.15);
}

.btn-secondary:active {
    transform: translateY(1px) scale(0.99);
}

.btn-secondary:active {
    transform: translateY(1px) scale(0.99);
}

/* Output Card styling */
.output-card {
    padding: 35px;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 450px;
}

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

.output-header h3 {
    font-size: 19px;
    font-weight: 700;
}

.badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 16px;
    border-radius: 10px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 700;
}

.badge.active {
    background: rgba(0, 245, 160, 0.1);
    border-color: var(--accent-green);
    color: var(--accent-green);
    box-shadow: 0 0 15px rgba(0, 245, 160, 0.15);
}

.output-content {
    flex-grow: 1;
    overflow-y: auto;
    line-height: 1.9;
    font-size: 15px;
}

.output-content h2, 
.output-content h3 {
    margin-top: 25px;
    margin-bottom: 12px;
    color: var(--primary);
    font-weight: 700;
}

.output-content p {
    margin-bottom: 18px;
    color: #e2e8f0;
}

.output-content ul, 
.output-content ol {
    margin-right: 25px;
    margin-bottom: 20px;
}

.output-content li {
    margin-bottom: 10px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
    gap: 20px;
    padding: 50px;
}

.empty-state i {
    font-size: 56px;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(0, 229, 255, 0.3));
}

/* Loading Overlay & spinner */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 6, 8, 0.9);
    backdrop-filter: blur(12px);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    z-index: 100;
    border-radius: var(--radius-lg);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 229, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
    box-shadow: var(--shadow-neon-blue);
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* Signal Gauge Styles */
.signal-gauge-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 25px;
    margin-bottom: 30px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.signal-gauge-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.signal-lbl {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.signal-value {
    font-size: 24px;
    font-weight: 800;
    padding: 8px 28px;
    border-radius: 14px;
    text-shadow: 0 0 12px currentColor;
    transition: all 0.3s ease;
}

/* Signal states glow overrides */
.signal-value.buy {
    color: var(--accent-green);
    background: rgba(0, 245, 160, 0.12);
    border: 1px solid var(--accent-green);
    box-shadow: 0 0 20px rgba(0, 245, 160, 0.2);
}

.signal-value.strong_buy {
    color: var(--accent-green);
    background: rgba(0, 245, 160, 0.2);
    border: 1px solid var(--accent-green);
    box-shadow: 0 0 30px rgba(0, 245, 160, 0.4);
    animation: pulseGlowGreen 2.5s infinite alternate;
}

.signal-value.sell {
    color: var(--accent-rose);
    background: rgba(255, 65, 108, 0.12);
    border: 1px solid var(--accent-rose);
    box-shadow: 0 0 20px rgba(255, 65, 108, 0.2);
}

.signal-value.strong_sell {
    color: var(--accent-rose);
    background: rgba(255, 65, 108, 0.2);
    border: 1px solid var(--accent-rose);
    box-shadow: 0 0 30px rgba(255, 65, 108, 0.4);
    animation: pulseGlowRed 2.5s infinite alternate;
}

.signal-value.neutral {
    color: var(--accent-orange);
    background: rgba(255, 123, 0, 0.12);
    border: 1px solid var(--accent-orange);
    box-shadow: 0 0 20px rgba(255, 123, 0, 0.2);
}

@keyframes pulseGlowGreen {
    0% { box-shadow: 0 0 15px rgba(0, 245, 160, 0.25); }
    100% { box-shadow: 0 0 35px rgba(0, 245, 160, 0.55); }
}

@keyframes pulseGlowRed {
    0% { box-shadow: 0 0 15px rgba(255, 65, 108, 0.25); }
    100% { box-shadow: 0 0 35px rgba(255, 65, 108, 0.55); }
}

.confidence-gauge-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.confidence-bar-wrapper {
    position: relative;
    height: 40px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

.confidence-bar-fill {
    height: 100%;
    background: var(--grad-primary);
    box-shadow: var(--shadow-neon-blue);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.confidence-percent {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-family: var(--font-en);
}

/* Institutional prediction Framework v2 Panel */
.institutional-container {
    background: rgba(15, 15, 20, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.setup-rating-badge {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 900;
    color: #fff;
    display: inline-block;
}

.setup-rating-badge.A-plus {
    background: var(--grad-accent);
    box-shadow: var(--shadow-neon-green);
}

.setup-rating-badge.A {
    background: var(--grad-primary);
    box-shadow: var(--shadow-neon-blue);
}

.setup-rating-badge.B {
    background: linear-gradient(135deg, var(--accent-orange) 0%, #ffa500 100%);
    box-shadow: 0 0 15px rgba(255, 123, 0, 0.35);
}

.setup-rating-badge.C {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.setup-rating-badge.Avoid {
    background: var(--grad-danger);
    box-shadow: 0 0 15px rgba(255, 65, 108, 0.35);
}

.heatmap-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.heatmap-stars {
    color: #ffae00;
    font-size: 12px;
    letter-spacing: 1px;
    text-shadow: 0 0 6px rgba(255, 174, 0, 0.4);
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.checklist-item.pass {
    color: var(--accent-green);
    border-color: rgba(0, 245, 160, 0.12);
}

.checklist-item.fail {
    color: var(--accent-rose);
    border-color: rgba(255, 65, 108, 0.08);
    opacity: 0.6;
}

/* Smart Money Concepts Widget */
.smc-signals-container {
    background: rgba(15, 15, 20, 0.5) !important;
}

.smc-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1.2fr;
    gap: 20px;
    width: 100%;
}

.smc-stat-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 16px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.smc-lbl {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
}

.smc-val {
    font-size: 15px;
    font-weight: 800;
}

.smc-val.green {
    color: var(--accent-green);
    text-shadow: 0 0 10px rgba(0, 245, 160, 0.2);
}

.smc-val.red {
    color: var(--accent-rose);
    text-shadow: 0 0 10px rgba(255, 65, 108, 0.2);
}

.smc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 95px;
    overflow-y: auto;
}

.smc-item {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.02);
    padding: 6px 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.smc-item.bullish {
    border-right: 3px solid var(--accent-green);
    color: var(--accent-green);
}

.smc-item.bearish {
    border-right: 3px solid var(--accent-rose);
    color: var(--accent-rose);
}

/* Level II Market Depth & tape */
.orderflow-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

.ob-header, 
.tape-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 8px;
    margin-bottom: 10px;
    text-align: center;
}

.ob-rows, 
.tape-rows {
    height: 190px;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: var(--font-en);
    font-size: 12px;
}

.ob-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    text-align: center;
    position: relative;
    padding: 3px 0;
    align-items: center;
}

.ob-row .ob-price {
    font-weight: 700;
    color: #fff;
    z-index: 5;
}

.ob-depth-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 1;
    opacity: 0.15;
    transition: width 0.4s ease;
}

.ob-depth-bar.bid {
    right: 50%;
    background: var(--accent-green);
}

.ob-depth-bar.ask {
    left: 50%;
    background: var(--accent-rose);
}

.tape-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    text-align: center;
    padding: 4px 0;
    border-radius: 6px;
    transition: background 0.3s ease;
    animation: fadeTape 0.4s ease-out;
}

@keyframes fadeTape {
    0% { opacity: 0; transform: translateY(-3px); }
    100% { opacity: 1; transform: translateY(0); }
}

.tape-row.buy {
    color: var(--accent-green);
    background: rgba(0, 245, 160, 0.02);
}

.tape-row.sell {
    color: var(--accent-rose);
    background: rgba(255, 65, 108, 0.02);
}

/* Binary Options Gauge styling */
.binary-gauge-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 25px;
    margin-bottom: 30px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.binary-signal-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.binary-signal-val {
    font-size: 24px;
    font-weight: 800;
    padding: 8px 28px;
    border-radius: 14px;
    text-shadow: 0 0 12px currentColor;
    transition: all 0.3s ease;
}

.binary-signal-val.call {
    color: var(--accent-green);
    background: rgba(0, 245, 160, 0.2);
    border: 1px solid var(--accent-green);
    box-shadow: 0 0 25px rgba(0, 245, 160, 0.35);
    animation: pulseGlowGreen 2.5s infinite alternate;
}

.binary-signal-val.put {
    color: var(--accent-rose);
    background: rgba(255, 65, 108, 0.2);
    border: 1px solid var(--accent-rose);
    box-shadow: 0 0 25px rgba(255, 65, 108, 0.35);
    animation: pulseGlowRed 2.5s infinite alternate;
}

.binary-signal-val.neutral {
    color: var(--accent-orange);
    background: rgba(255, 123, 0, 0.12);
    border: 1px solid var(--accent-orange);
    box-shadow: 0 0 20px rgba(255, 123, 0, 0.2);
}

.binary-prob-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.binary-prob-wrapper {
    position: relative;
    height: 40px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

.binary-prob-fill {
    height: 100%;
    background: var(--grad-primary);
    box-shadow: var(--shadow-neon-blue);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.binary-prob-val {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-family: var(--font-en);
}

/* Call / Put Action Buttons */
.binary-action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.trade-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 80px;
    border-radius: 18px;
    font-size: 15px;
    font-weight: 800;
    cursor: default;
    background: rgba(255, 255, 255, 0.01);
    border: 2px solid rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    opacity: 0.2;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.trade-btn i {
    font-size: 22px;
    transition: transform 0.4s ease;
}

.trade-btn.call-btn.active {
    opacity: 1;
    color: #fff;
    background: rgba(0, 245, 160, 0.15);
    border-color: var(--accent-green);
    box-shadow: 0 0 30px rgba(0, 245, 160, 0.4), inset 0 0 15px rgba(0, 245, 160, 0.1);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    animation: callPulse 2s infinite alternate;
}

.trade-btn.call-btn.active i {
    animation: bounceUp 0.8s infinite alternate;
}

.trade-btn.put-btn.active {
    opacity: 1;
    color: #fff;
    background: rgba(255, 65, 108, 0.15);
    border-color: var(--accent-rose);
    box-shadow: 0 0 30px rgba(255, 65, 108, 0.4), inset 0 0 15px rgba(255, 65, 108, 0.1);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    animation: putPulse 2s infinite alternate;
}

.trade-btn.put-btn.active i {
    animation: bounceDown 0.8s infinite alternate;
}

@keyframes callPulse {
    0% { box-shadow: 0 0 15px rgba(0, 245, 160, 0.2); }
    100% { box-shadow: 0 0 30px rgba(0, 245, 160, 0.5); }
}

@keyframes putPulse {
    0% { box-shadow: 0 0 15px rgba(255, 65, 108, 0.2); }
    100% { box-shadow: 0 0 30px rgba(255, 65, 108, 0.5); }
}

@keyframes bounceUp {
    0% { transform: translateY(2px); }
    100% { transform: translateY(-5px); }
}

@keyframes bounceDown {
    0% { transform: translateY(-2px); }
    100% { transform: translateY(5px); }
}

/* Chat View (Psychology Coach) */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 220px);
    min-height: 520px;
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 16px;
}

.chat-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--grad-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    color: var(--text-dark);
    box-shadow: var(--shadow-neon-blue);
}

.chat-title {
    flex-grow: 1;
}

.chat-title h3 {
    font-size: 16px;
    font-weight: 700;
}

.chat-title span {
    font-size: 12px;
    color: var(--text-muted);
}

.btn-clear-chat {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s;
}

.btn-clear-chat:hover {
    background: rgba(255, 65, 108, 0.12);
    color: var(--accent-rose);
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.chat-message {
    max-width: 75%;
    padding: 16px 22px;
    border-radius: 20px;
    font-size: 14.5px;
    line-height: 1.8;
    position: relative;
    box-shadow: var(--shadow-3d);
}

.chat-message.assistant {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top-right-radius: 4px;
}

.chat-message.user {
    align-self: flex-end;
    background: var(--grad-primary);
    color: var(--text-dark);
    border-top-left-radius: 4px;
    font-weight: 600;
    box-shadow: var(--shadow-neon-blue);
}

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 24px;
}

.suggestion-tag {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.suggestion-tag:hover {
    background: rgba(0, 229, 255, 0.08);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-neon-blue);
}

.chat-input-wrapper {
    display: flex;
    padding: 24px;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-input-wrapper textarea {
    resize: none;
    border-radius: 16px;
    padding: 14px;
    flex-grow: 1;
    font-size: 14.5px;
    height: 52px;
}

.btn-send {
    background: var(--grad-primary);
    color: var(--text-dark);
    border: none;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 19px;
    cursor: pointer;
    box-shadow: var(--shadow-neon-blue);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-send:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.5);
}

/* Journal view layout */
.journal-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 40px;
    flex-grow: 1;
    min-height: 0;
}

.journal-sidebar-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.add-trade-card {
    padding: 30px;
}

.add-trade-card h3 {
    margin-bottom: 25px;
    font-size: 17px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.mini-stats-card {
    padding: 24px;
}

.mini-stats-card h3 {
    margin-bottom: 20px;
    font-size: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 12px;
    border-radius: 14px;
    text-align: center;
}

.stat-lbl {
    font-size: 10px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.stat-val {
    font-size: 15px;
    font-weight: 800;
    font-family: var(--font-en);
}

.journal-main-layout {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.chart-card {
    padding: 30px;
}

.chart-card h3 {
    margin-bottom: 20px;
}

.chart-container-el {
    height: 270px;
    position: relative;
}

.behavior-analysis-card {
    padding: 30px;
}

.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.analysis-header h3 {
    font-size: 17px;
}

.analysis-header button {
    width: auto;
    padding: 10px 22px;
    font-size: 13.5px;
}

.analysis-output {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 20px;
    border-radius: 16px;
    min-height: 100px;
    line-height: 1.9;
}

/* Trades table styling */
.trades-table-card {
    padding: 30px;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    font-size: 14px;
}

th, td {
    padding: 15px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

th {
    color: var(--text-muted);
    font-weight: 700;
}

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

.badge-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
}

.badge-tag.calm { background: rgba(0, 245, 160, 0.12); color: var(--accent-green); }
.badge-tag.fomo { background: rgba(255, 123, 0, 0.12); color: var(--accent-orange); }
.badge-tag.revenge { background: rgba(255, 65, 108, 0.12); color: var(--accent-rose); }
.badge-tag.fearful { background: rgba(255, 0, 127, 0.12); color: var(--secondary); }
.badge-tag.confident { background: rgba(0, 229, 255, 0.12); color: var(--primary); }

.badge-tag.direction-long { background: rgba(0, 245, 160, 0.08); color: var(--accent-green); }
.badge-tag.direction-short { background: rgba(255, 65, 108, 0.08); color: var(--accent-rose); }

.badge-tag.plan-followed { background: rgba(0, 245, 160, 0.08); color: var(--accent-green); }
.badge-tag.plan-broken { background: rgba(255, 65, 108, 0.08); color: var(--accent-rose); }

.btn-delete-trade {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 15px;
    transition: color 0.3s;
}

.btn-delete-trade:hover {
    color: var(--accent-rose);
}

/* Settings styling */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.settings-card {
    padding: 35px;
}

.settings-card h3 {
    margin-bottom: 12px;
}

.settings-card .desc {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.keys-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 30px;
}

.key-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
}

.key-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.key-info .name {
    font-size: 14px;
    font-weight: 700;
}

.key-info .desc {
    font-size: 11.5px;
    color: var(--text-muted);
    margin: 0;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 800;
}

.status-badge.green {
    background: rgba(0, 245, 160, 0.12);
    color: var(--accent-green);
    border: 1px solid rgba(0, 245, 160, 0.2);
}

.status-badge.red {
    background: rgba(255, 65, 108, 0.08);
    color: var(--accent-rose);
    border: 1px solid rgba(255, 65, 108, 0.15);
}

/* Custom design scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    border: 2px solid transparent;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 229, 255, 0.2);
}

/* Responsive adjustments */
.inst-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
}

@media (max-width: 1280px) {
    .app-container {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
        width: 100%;
        border-radius: 0;
        border: none;
    }
    
    .sidebar {
        border-left: none;
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
        margin-bottom: 0;
    }

    .nav-links {
        flex-direction: row;
        gap: 10px;
        flex-grow: 0;
    }

    .nav-btn {
        padding: 12px 18px;
    }

    .nav-btn span {
        display: none;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        padding: 30px 20px;
    }

    .panel-grid, 
    .journal-grid, 
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-decor {
        display: none;
    }
}

@media (max-width: 1024px) {
    .panel-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .journal-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .panel-grid,
    .journal-grid,
    .settings-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 20px !important;
    }
    
    .glass-card,
    .settings-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 20px !important;
    }

    .sidebar {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        text-align: center;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 12px;
    }

    .nav-btn {
        padding: 12px 18px;
        font-size: 13.5px;
        gap: 10px;
    }

    .nav-btn i {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .hero-header {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        gap: 20px;
    }

    .hero-content {
        max-width: 100%;
    }

    .float-glass-object {
        display: none !important;
    }

    .inst-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .smc-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .binary-gauge-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 16px;
    }

    .signal-gauge-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 16px;
    }

    .chat-container {
        height: calc(100vh - 280px);
        min-height: 400px;
    }
}

@media (max-width: 600px) {
    .brand {
        margin-bottom: 5px;
    }

    .brand h2 {
        font-size: 18px;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        gap: 8px;
        width: 100%;
        padding: 6px 4px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none; /* Hide scrollbar for Firefox */
    }
    .nav-links::-webkit-scrollbar {
        display: none; /* Hide scrollbar for Chrome/Safari */
    }

    .nav-btn {
        flex: 0 0 auto;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 10px 16px;
        border-radius: 12px;
        font-size: 11px;
        text-align: center;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.05);
        scroll-snap-align: start;
    }

    .nav-btn span {
        display: inline !important; /* Keep tab label visible on mobile */
    }

    .nav-btn i {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .hero-header h1 {
        font-size: 26px;
    }

    .hero-header p {
        font-size: 12px;
    }

    .btn-primary, .btn-secondary {
        padding: 12px 20px;
        font-size: 13px;
        border-radius: 14px;
    }

    .glass-card {
        border-radius: 18px;
        padding: 20px !important;
    }

    .add-trade-card, .settings-card, .mini-stats-card {
        padding: 20px !important;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .chat-messages {
        padding: 15px;
        gap: 15px;
    }

    .chat-message {
        max-width: 90%;
        padding: 12px 16px;
        font-size: 13px;
    }

    .chat-input-wrapper {
        padding: 15px;
        gap: 10px;
    }

    .chat-input-wrapper textarea {
        border-radius: 12px;
        font-size: 13px;
        padding: 10px;
    }

    .btn-send {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 15px;
    }
}

/* ==========================================================
   Smoothness & Security Upgrades CSS Layouts
   ========================================================== */

/* Shimmer Loader Skeletons */
.skeleton-loader {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    padding: 10px 5px;
}

.skeleton-block {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 25%, rgba(255, 255, 255, 0.06) 37%, rgba(255, 255, 255, 0.02) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.8s ease-in-out infinite;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.skeleton-text {
    height: 15px;
    width: 100%;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 85%;
}

.skeleton-title {
    height: 24px;
    width: 35%;
    margin-bottom: 12px;
}

.skeleton-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.skeleton-card {
    height: 110px;
    width: 100%;
    border-radius: 18px;
}

@keyframes shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* GPU acceleration for extremely smooth transitions (will-change & translate3d) */
.glass-card,
.nav-btn,
.nav-btn i,
.sidebar,
.panel-header h1,
.btn-primary,
.btn-secondary,
.theme-toggle-btn,
.empty-state i {
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
}

/* Smooth Tab Switching Transitions */
.tab-panel {
    display: none;
    opacity: 0;
    transform: translate3d(0, 15px, 0);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.tab-panel.active {
    display: flex;
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Typewriter Fading Cursor & streaming text elements */
.streaming-text {
    line-height: 1.95;
    will-change: height, opacity;
}

.streaming-word {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
    animation: wordFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    display: inline-block;
    margin-right: 4px;
}

@keyframes wordFadeIn {
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Typing indicator for AI psychology coach */
.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 18px;
    width: fit-content;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; background-color: var(--accent-cyan); }
.typing-dot:nth-child(2) { animation-delay: -0.16s; background-color: var(--accent-purple); }
.typing-dot:nth-child(3) { background-color: var(--secondary); }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.4); opacity: 0.3; }
    40% { transform: scale(1.1); opacity: 1; }
}

/* ==========================================================
   LIVE REAL-TIME NOTIFICATION ENGINE (iOS GLASSMORPHISM)
   ========================================================== */
#live-notification-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99999;
    display: flex;
    flex-direction: column-reverse; /* New alerts stack on top */
    gap: 12px;
    width: 350px;
    pointer-events: none;
}

.glass-alert {
    pointer-events: auto;
    background: rgba(15, 20, 30, 0.45);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom right;
    animation: alertSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.glass-alert:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 242, 254, 0.3);
    box-shadow: 0 20px 45px rgba(0, 242, 254, 0.15), inset 0 1px 1px rgba(255,255,255,0.1);
}

@keyframes alertSlideIn {
    0% {
        opacity: 0;
        transform: translate3d(80px, 0, 0) scale(0.92);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.glass-alert.slide-out {
    animation: alertSlideOut 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes alertSlideOut {
    to {
        opacity: 0;
        transform: translate3d(120px, 0, 0) scale(0.85);
    }
}

/* Header Alert styling */
.glass-alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 6px;
}

.glass-alert-header .asset-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 800;
    color: #fff;
}

.glass-alert-header .asset-badge i {
    font-size: 13px;
    color: var(--accent-cyan);
}

.glass-alert-header .time-stamp {
    font-size: 9px;
    color: var(--text-muted);
    font-family: var(--font-en);
}

/* Body alert styling */
.glass-alert-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.glass-alert-body .msg {
    font-size: 12px;
    color: #fff;
    line-height: 1.5;
}

.glass-alert-body .sentiment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.glass-alert-body .sentiment-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.glass-alert-body .sentiment-badge.Bullish {
    background: rgba(0, 245, 160, 0.12);
    color: var(--accent-green);
    border: 1px solid rgba(0, 245, 160, 0.2);
}

.glass-alert-body .sentiment-badge.Bearish {
    background: rgba(255, 65, 108, 0.12);
    color: var(--accent-rose);
    border: 1px solid rgba(255, 65, 108, 0.2);
}

.glass-alert-body .sentiment-badge.Neutral {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* High-impact pulsing effects */
.glass-alert.High {
    border-right: 4px solid var(--accent-rose);
}

.glass-alert.High .pulsing-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-rose);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-rose);
    animation: highImpactPulse 1s infinite alternate;
}

@keyframes highImpactPulse {
    0% {
        box-shadow: 0 0 4px var(--accent-rose);
        transform: scale(0.9);
    }
    100% {
        box-shadow: 0 0 12px var(--accent-rose);
        transform: scale(1.2);
    }
}

/* Stacking Deck mechanism styles */
.glass-alert.stacked {
    transform: translate3d(0, 10px, 0) scale(0.95) !important;
    opacity: 0.65 !important;
    z-index: 10 !important;
    pointer-events: none;
    margin-bottom: -45px; /* compact offset */
}

.glass-alert.stacked-second {
    transform: translate3d(0, 20px, 0) scale(0.9) !important;
    opacity: 0.35 !important;
    z-index: 9 !important;
    pointer-events: none;
    margin-bottom: -45px;
}

.glass-alert-stack-badge {
    position: absolute;
    top: -6px;
    left: 12px;
    background: var(--accent-cyan);
    color: #000;
    font-size: 8px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0, 242, 254, 0.4);
    z-index: 20;
}

/* Premium Watchlist Switch & Checkbox Styles (Bespoke Shapes) */
.watchlist-toggle-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(10, 14, 23, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
    user-select: none;
    direction: rtl; /* Align right to left for Arabic text flow */
}

.watchlist-toggle-wrapper:hover {
    border-color: rgba(255, 179, 0, 0.3); /* Amber highlight */
    background: rgba(10, 14, 23, 0.7);
}

.watchlist-toggle-wrapper input[type="checkbox"] {
    display: none; /* Hide default checkbox */
}

.watchlist-indicator {
    width: 14px;
    height: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-left: 8px; /* space in RTL */
    position: relative;
    transition: all 0.3s;
    background: rgba(0,0,0,0.3);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.6);
}

.watchlist-toggle-wrapper input[type="checkbox"]:checked + .watchlist-indicator {
    background: #00f5a0; /* Neon-mint for growth/active */
    border-color: #00f5a0;
    box-shadow: 0 0 8px rgba(0, 245, 160, 0.6);
}

.watchlist-indicator::after {
    content: '';
    position: absolute;
    display: none;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.watchlist-toggle-wrapper input[type="checkbox"]:checked + .watchlist-indicator::after {
    display: block;
}

/* Premium toggle switch for Sound */
.premium-switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10, 14, 23, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
    transition: all 0.3s;
    user-select: none;
}

.premium-switch-container:hover {
    border-color: rgba(255, 179, 0, 0.3);
}

.premium-switch-container input[type="checkbox"] {
    display: none;
}

.premium-switch-track {
    width: 42px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.premium-switch-handle {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    right: 2px; /* RTL right */
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.premium-switch-container input[type="checkbox"]:checked + .premium-switch-track {
    background: #ffb300; /* Luxury amber color */
    box-shadow: 0 0 10px rgba(255, 179, 0, 0.4);
}

.premium-switch-container input[type="checkbox"]:checked + .premium-switch-track .premium-switch-handle {
    transform: translate3d(-22px, 0, 0); /* slide to left in RTL */
    background: #000;
}

/* Mobile Live Notifications Optimizations */
@media (max-width: 600px) {
    #live-notification-container {
        left: 15px !important;
        right: 15px !important;
        bottom: 15px !important;
        width: calc(100% - 30px) !important;
    }
    .glass-alert {
        transform-origin: bottom center !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    @keyframes alertSlideIn {
        0% {
            opacity: 0;
            transform: translate3d(0, 40px, 0) scale(0.95);
        }
        100% {
            opacity: 1;
            transform: translate3d(0, 0, 0) scale(1);
        }
    }
}

/* Live Ticker Styling (Bloomberg Style) */
.live-ticker-container {
    width: 100%;
    height: 38px;
    background: rgba(10, 10, 15, 0.95);
    border-bottom: 1.5px solid rgba(0, 229, 255, 0.2);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    font-family: var(--font-en);
}

.ticker-label {
    padding: 0 16px;
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: #000;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 1px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    box-shadow: 4px 0 10px rgba(0,0,0,0.5);
    font-family: var(--font-ar);
}

.ticker-wrapper {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.ticker-content {
    display: inline-flex;
    white-space: nowrap;
    animation: scrollTicker 30s linear infinite;
    gap: 50px;
    padding-left: 20px;
}

.ticker-item {
    font-weight: 600;
    font-size: 12.5px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

.ticker-item .rate {
    color: #fff;
    font-weight: 700;
    transition: all 0.3s ease;
}

.ticker-item .change {
    font-size: 11px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.ticker-item.rate-up .rate,
.ticker-item.rate-up .change {
    color: var(--accent-green) !important;
    text-shadow: 0 0 8px rgba(0, 245, 160, 0.4);
}

.ticker-item.rate-down .rate,
.ticker-item.rate-down .change {
    color: var(--accent-rose) !important;
    text-shadow: 0 0 8px rgba(255, 65, 108, 0.4);
}

@keyframes scrollTicker {
    0% { transform: translate3d(100%, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Adjust top elements since we added ticker */
.app-container {
    height: calc(100vh - 38px) !important;
    margin-top: 38px !important;
}

/* Language selector buttons styling */
.lang-btn:hover {
    background: rgba(0, 229, 255, 0.18) !important;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
    transform: scale(1.05);
}

.lang-btn:active {
    transform: scale(0.95);
}

/* ML Panel Badges */
#ta-ml-verdict.BUY, #binary-ml-verdict.BUY {
    background: rgba(0, 245, 160, 0.15) !important;
    color: var(--accent-green) !important;
    border: 1px solid rgba(0, 245, 160, 0.3);
    box-shadow: 0 0 10px rgba(0, 245, 160, 0.2);
}

#ta-ml-verdict.SELL, #binary-ml-verdict.SELL {
    background: rgba(255, 65, 108, 0.15) !important;
    color: var(--accent-rose) !important;
    border: 1px solid rgba(255, 65, 108, 0.3);
    box-shadow: 0 0 10px rgba(255, 65, 108, 0.2);
}

#ta-ml-verdict.NEUTRAL, #binary-ml-verdict.NEUTRAL {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-muted) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Admin Panel Custom Styles */
#admin-users-table-body td,
#admin-subscribers-table-body td {
    padding: 8px 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: #fff;
    font-size: 11.5px;
}

#admin-users-table-body tr:hover,
#admin-subscribers-table-body tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.premium-switch-container {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.premium-switch-container input[type="checkbox"] {
    display: none;
}

.premium-switch-track {
    width: 44px;
    height: 22px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.premium-switch-handle {
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

/* RTL layout switches slide to right when checked */
html[dir="rtl"] .premium-switch-container input[type="checkbox"]:checked + .premium-switch-track .premium-switch-handle {
    transform: translate3d(-22px, 0, 0) !important;
}

/* LTR layout switches slide to left when checked */
html[dir="ltr"] .premium-switch-container input[type="checkbox"]:checked + .premium-switch-track .premium-switch-handle {
    transform: translate3d(22px, 0, 0) !important;
}

.premium-switch-container input[type="checkbox"]:checked + .premium-switch-track {
    background: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* ========================================================
   🔒 GATED GOOGLE AUTH OVERLAY (PRE-LOGIN COVER)
   ======================================================== */
.gated-auth-overlay {
    display: none !important;
}

.gated-auth-overlay.transitioning {
    opacity: 0;
    transform: scale(2.2);
    pointer-events: none;
}

.auth-card {
    padding: 40px;
    width: 90%;
    max-width: 420px;
    border-radius: 24px;
    background: rgba(10, 10, 14, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 229, 255, 0.05);
    text-align: center;
    position: relative;
    z-index: 10;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.5s ease;
}

.auth-brand {
    margin-bottom: 25px;
}

.auth-logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.auth-logo-container::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00e5ff, #00f5a0);
    opacity: 0.25;
    filter: blur(8px);
    z-index: 1;
    animation: logoGlowPulse 2.5s infinite alternate ease-in-out;
}

.auth-logo {
    position: relative;
    z-index: 2;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.45), inset 0 0 10px rgba(0, 229, 255, 0.2);
    object-fit: cover;
    display: block;
}

@keyframes logoGlowPulse {
    0% { transform: scale(0.96); opacity: 0.2; }
    100% { transform: scale(1.04); opacity: 0.55; }
}

.google-btn-wrapper:hover {
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.35), 0 0 15px rgba(0, 245, 160, 0.2), 0 12px 30px rgba(0,0,0,0.6);
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.25) 0%, rgba(0, 245, 160, 0.25) 100%) !important;
    transform: translateY(-2px);
}

.auth-brand h2 {
    font-family: var(--font-en);
    font-weight: 800;
    font-size: 26px;
    background: linear-gradient(135deg, #00e5ff 0%, #00f5a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 8px 0;
}

.auth-brand .tagline {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.auth-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    margin: 20px 0;
}

.auth-cta-container {
    margin-bottom: 15px;
}

.auth-disclaimer {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 12px;
    margin-bottom: 0;
}

.mock-login-dev:hover {
    background: rgba(0, 229, 255, 0.08) !important;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
    transform: scale(1.02);
}

/* ========================================================
   🚀 CINEMATIC REVEAL MATRIX
   ======================================================== */
.app-container {
    opacity: 1 !important;
    transform: scale(1) !important;
}

/* ========================================================
   🎮 3D HUB MAIN MENU MODULES
   ======================================================== */
.module-3d-card {
    background: rgba(10, 10, 14, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.module-3d-card:hover {
    transform: translateZ(25px) scale(1.04) !important;
    border-color: var(--accent-cyan);
    box-shadow: 0 25px 50px rgba(0, 229, 255, 0.15), inset 0 1px 1px rgba(255,255,255,0.1);
}

.module-3d-card:hover .orbit-glow-3d {
    transform: scale(1.1);
}

/* ========================================================
   🌐 DYNAMIC Curved 3D NEWS CAROUSEL
   ======================================================== */
.carousel-3d-perspective {
    background: rgba(0,0,0,0.3);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.03);
}

.carousel-card-3d {
    position: absolute;
    width: 280px;
    height: 240px;
    left: 20px;
    top: 10px;
    border-radius: 16px;
    padding: 20px;
    background: rgba(15, 15, 22, 0.85);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    backface-visibility: hidden;
    transition: opacity 0.5s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    direction: rtl;
}

.carousel-card-3d.active-card {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.2), 0 20px 40px rgba(0,0,0,0.8);
}

.carousel-card-3d.breaking-alert {
    border-color: var(--accent-rose);
    animation: pulseBorder 2s infinite alternate;
}

@keyframes pulseBorder {
    0% { box-shadow: 0 0 10px rgba(255, 65, 108, 0.2); }
    100% { box-shadow: 0 0 25px rgba(255, 65, 108, 0.4); }
}

@keyframes shakeCard {
    0%, 100% { transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1); }
    20%, 60% { transform: perspective(1000px) rotateX(2.5deg) rotateY(-4deg) scale(1.02); }
    40%, 80% { transform: perspective(1000px) rotateX(-2.5deg) rotateY(4deg) scale(1.02); }
}

.shake-element {
    animation: shakeCard 0.45s ease-in-out;
}

.module-3d-card:hover img {
    transform: scale(1.06);
}

@keyframes bounceIndicator {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

/* ========================================================
   📱 COMPLETE MOBILE OPTIMIZATION SYSTEM (UNIFIED RESPONSIVENESS)
   ======================================================== */
@media (max-width: 768px) {
    /* 1. Pre-login Showcase Grid */
    .menu-3d-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .module-3d-card {
        padding: 18px !important;
        border-radius: 16px !important;
    }
    
    .module-3d-card img {
        height: 120px !important;
    }

    /* 2. Top Header Morphing from Sidebar */
    .sidebar {
        position: fixed !important;
        top: 38px !important; /* Below Bloomberg ticker */
        left: 0 !important;
        right: 0 !important;
        height: 60px !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 15px !important;
        background: rgba(8, 8, 12, 0.85) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-left: none !important;
        z-index: 99998 !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .brand {
        margin: 0 !important;
        padding: 0 !important;
        gap: 8px !important;
    }

    .brand h2 {
        display: none !important; /* Hide brand name to save space */
    }

    /* User Profile top integration */
    #user-profile-card-container {
        margin: 0 !important;
        padding: 4px 8px !important;
        flex-direction: row !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    #user-logged-in-box {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        width: auto !important;
    }

    #user-logged-in-box > div:first-child {
        border-bottom: none !important;
        padding-bottom: 0 !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
    }

    #user-avatar {
        width: 30px !important;
        height: 30px !important;
    }

    #user-email-addr {
        display: none !important; /* Hide email on mobile header */
    }

    #user-display-name {
        font-size: 11px !important;
    }

    /* Logout and Sync Quick buttons */
    #user-logged-in-box > div:last-child {
        margin-top: 0 !important;
        gap: 6px !important;
    }

    #btn-sync-cloud-trades, #btn-logout-user {
        height: 24px !important;
        padding: 0 6px !important;
        font-size: 8px !important;
        border-radius: 8px !important;
    }

    /* Hide text inside switcher labels, keep icons inline */
    .sidebar-footer {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
    }

    .lang-toggle-wrapper, .theme-toggle-wrapper {
        margin: 0 !important;
        width: auto !important;
    }

    #lbl-lang-toggle, #lbl-theme-toggle, .status-indicator {
        display: none !important; /* Hide labels */
    }

    #theme-toggle-btn {
        width: 30px !important;
        height: 30px !important;
        font-size: 11px !important;
    }

    #lang-toggle-btn {
        height: 26px !important;
        padding: 0 8px !important;
        font-size: 9.5px !important;
    }

    /* 3. Bottom Navigation Bar */
    .nav-links {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 65px !important;
        background: rgba(8, 8, 12, 0.9) !important;
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
        z-index: 99999 !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around !important;
        align-items: center !important;
        padding: 0 8px !important;
        margin: 0 !important;
        box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.6) !important;
        overflow-x: hidden !important;
    }

    .nav-btn {
        flex: 1 1 0% !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 3px !important;
        padding: 6px 0 !important;
        background: transparent !important;
        border: none !important;
        font-size: 9px !important;
        color: var(--text-muted) !important;
        border-radius: 0 !important;
        transition: all 0.3s ease !important;
        height: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    .nav-btn.active {
        color: var(--accent-cyan) !important;
        background: rgba(0, 229, 255, 0.04) !important;
        border-top: 2px solid var(--accent-cyan) !important;
        text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
    }

    .nav-btn i {
        font-size: 15px !important;
        margin: 0 !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        color: inherit !important;
    }

    .nav-btn span {
        display: inline !important; /* Labels visible */
        font-size: 8.5px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        width: 100% !important;
        text-align: center !important;
    }

    /* 4. Main Panel Adjustments */
    .main-content {
        padding: 15px !important;
        margin-top: 60px !important; /* Make room for header */
        margin-bottom: 65px !important; /* Make room for bottom bar */
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* Panel Headers size */
    .panel-header {
        margin-bottom: 20px !important;
    }

    .panel-header h1 {
        font-size: 20px !important;
    }

    .panel-header p {
        font-size: 11px !important;
    }

    /* 5. Gated Overlay */
    .gated-auth-overlay {
        overflow-y: auto !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        padding-top: 40px !important;
        padding-bottom: 40px !important;
        box-sizing: border-box !important;
    }
    
    .auth-card {
        padding: 25px 20px !important;
        border-radius: 18px !important;
        margin-bottom: 30px !important;
        margin-top: 40px !important;
    }

    /* 6. TradingView charts container resizing */
    .chart-container-wrapper {
        height: 380px !important;
    }
    
    /* 7. Curved News Carousel on Mobile */
    .carousel-3d-perspective {
        transform: perspective(600px) rotateX(0deg) !important;
        padding: 15px 5px !important;
        height: auto !important;
        min-height: 180px !important;
    }
    
    .carousel-container-3d {
        height: 120px !important;
    }
    
    .carousel-card-3d {
        width: 220px !important;
        height: 100px !important;
        padding: 10px !important;
        font-size: 11px !important;
    }

    /* 8. Table Responsive Wrapper (Trading Journal) */
    .tracker-table, .table-wrapper table {
        min-width: 650px !important; /* Forces scroll bar rather than text wrapping */
    }

    /* 9. AI Psychology Coach Chat optimization */
    .chat-container {
        height: calc(100vh - 280px) !important;
        min-height: 320px !important;
        padding: 12px !important;
    }
    
    .chat-message {
        max-width: 90% !important;
        padding: 10px 12px !important;
        font-size: 12px !important;
        line-height: 1.5 !important;
    }

    .chat-input-area {
        padding: 8px !important;
        gap: 8px !important;
    }

    .chat-input-area input {
        padding: 10px 14px !important;
        font-size: 12px !important;
    }

    .chat-input-area button {
        width: 38px !important;
        height: 38px !important;
    }

    /* Floating Telegram mobile override */
    .telegram-float-btn {
        bottom: 80px !important;
        right: 15px !important;
        width: 44px !important;
        height: 44px !important;
        font-size: 20px !important;
    }
}

/* Floating Telegram Button (Desktop) */
.telegram-float-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background: #0088cc;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3), 0 0 15px rgba(0, 136, 204, 0.2);
    z-index: 999999;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: telegramPulse 2.5s infinite alternate ease-in-out;
}

.telegram-float-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.5), 0 0 25px rgba(0, 136, 204, 0.3);
    background: #0099e6;
}

@keyframes telegramPulse {
    0% { box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3), 0 0 0 0 rgba(0, 136, 204, 0.4); }
    100% { box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3), 0 0 0 12px rgba(0, 136, 204, 0); }
}

/* Disable all hover/active translations and scaling to keep buttons and cards static as requested */
.btn-primary:hover,
.btn-primary:active,
.btn-secondary:hover,
.btn-secondary:active,
.glass-card:hover,
.nav-btn:hover,
.backtest-metric-card:hover,
.auth-card:hover,
.lang-btn:hover,
.theme-toggle-btn:hover,
.telegram-float-btn:hover,
.module-3d-card:hover,
.carousel-card-3d:hover,
.module-3d-card:hover img {
    transform: none !important;
    box-shadow: none !important;
}


