/* SARVIS Iron Man Theme CSS - Part 1: Base Styles */

/* Arc Reactor Colors */
:root {
    --arc-blue: #00d9ff;
    --arc-cyan: #00ffff;
    --arc-gold: #ffd700;
    --dark-bg: #0a0a0a;
    --panel-bg: rgba(0, 20, 40, 0.8);
    --border-glow: #00d9ff;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --success: #00ff00;
    --danger: #ff0000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Circuit Board Background */
.circuit-board {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(0, 217, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    animation: circuitMove 20s linear infinite;
}

@keyframes circuitMove {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* Login Page Styles */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at 50% 50%, #001a33, #000000);
}

.login-container {
    position: relative;
    z-index: 1;
    text-align: center;
}

/* Arc Reactor Animation */
.arc-reactor {
    width: 200px;
    height: 200px;
    margin: 0 auto 40px;
    position: relative;
    animation: reactorPulse 2s ease-in-out infinite;
}

@keyframes reactorPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

.reactor-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, var(--arc-cyan), var(--arc-blue));
    border-radius: 50%;
    box-shadow:
        0 0 20px var(--arc-blue),
        0 0 40px var(--arc-cyan),
        0 0 60px var(--arc-blue),
        inset 0 0 20px rgba(255, 255, 255, 0.5);
    animation: coreGlow 1.5s ease-in-out infinite;
}

@keyframes coreGlow {
    0%, 100% {
        box-shadow:
            0 0 20px var(--arc-blue),
            0 0 40px var(--arc-cyan),
            0 0 60px var(--arc-blue),
            inset 0 0 20px rgba(255, 255, 255, 0.5);
    }
    50% {
        box-shadow:
            0 0 30px var(--arc-blue),
            0 0 60px var(--arc-cyan),
            0 0 90px var(--arc-blue),
            inset 0 0 30px rgba(255, 255, 255, 0.8);
    }
}

.reactor-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--arc-blue);
    border-radius: 50%;
    opacity: 0.6;
}

.reactor-ring-1 {
    width: 100px;
    height: 100px;
    animation: ringRotate 3s linear infinite;
}

.reactor-ring-2 {
    width: 140px;
    height: 140px;
    animation: ringRotate 4s linear infinite reverse;
}

.reactor-ring-3 {
    width: 180px;
    height: 180px;
    animation: ringRotate 5s linear infinite;
}

@keyframes ringRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Login Box */
.login-box {
    background: var(--panel-bg);
    border: 1px solid var(--border-glow);
    border-radius: 10px;
    padding: 40px;
    min-width: 400px;
    box-shadow:
        0 0 20px rgba(0, 217, 255, 0.3),
        inset 0 0 20px rgba(0, 217, 255, 0.1);
}

.title-glow {
    font-size: 36px;
    font-weight: bold;
    background: linear-gradient(90deg, var(--arc-blue), var(--arc-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.error-message {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.login-form .input-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-form label {
    display: block;
    color: var(--arc-cyan);
    font-size: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-form input {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--arc-blue);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--arc-cyan);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(90deg, var(--arc-blue), var(--arc-cyan));
    border: none;
    border-radius: 5px;
    color: var(--dark-bg);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.5);
}

.btn-primary .btn-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: buttonShine 3s infinite;
}

@keyframes buttonShine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.welcome-text {
    margin-top: 20px;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 14px;
}


/* SARVIS Iron Man Theme CSS - Part 2: Dashboard Styles */

/* Append this to ironman.css */

/* Dashboard Body */
.dashboard-body {
    background: var(--dark-bg);
    padding-top: 60px;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(0, 20, 40, 0.95);
    border-bottom: 1px solid var(--border-glow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 217, 255, 0.3);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: bold;
    color: var(--arc-cyan);
}

.reactor-icon {
    font-size: 24px;
    animation: reactorPulse 2s infinite;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
}

.nav-link .nav-icon {
    font-size: 14px;
    opacity: 0.8;
}

.nav-link:hover {
    color: var(--arc-cyan);
    background: rgba(0, 217, 255, 0.1);
    border-color: rgba(0, 217, 255, 0.3);
}

.nav-link.active {
    color: var(--arc-cyan);
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.15), rgba(0, 149, 255, 0.1));
    border: 1px solid var(--arc-blue);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.2);
}

.nav-link.active .nav-icon {
    opacity: 1;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    color: var(--text-primary);
    font-size: 14px;
}

.btn-logout {
    color: var(--danger);
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid var(--danger);
    border-radius: 5px;
    font-size: 12px;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
}

/* Dashboard Container */
.dashboard-container {
    padding: 15px 10px;
    max-width: 98%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Holographic Panel */
.panel {
    background: var(--panel-bg);
    border: 1px solid var(--border-glow);
    border-radius: 10px;
    padding: 20px;
    box-shadow:
        0 4px 20px rgba(0, 217, 255, 0.2),
        inset 0 0 20px rgba(0, 217, 255, 0.05);
    transition: all 0.3s;
}

.panel:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 30px rgba(0, 217, 255, 0.3),
        inset 0 0 30px rgba(0, 217, 255, 0.1);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 217, 255, 0.3);
}

.panel-header h3 {
    color: var(--arc-cyan);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: statusBlink 2s infinite;
}

.status-online {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

@keyframes statusBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.panel-body {
    color: var(--text-primary);
}

.status-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
}

.status-label {
    color: var(--text-secondary);
}

.status-value {
    color: var(--arc-cyan);
    font-weight: bold;
}

/* Live Indicator */
.live-indicator {
    color: var(--success);
    font-size: 12px;
    animation: statusBlink 2s infinite;
}

/* P&L Display */
.pnl-display {
    text-align: center;
    padding: 20px;
}

.pnl-amount {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}

.pnl-positive {
    color: var(--success);
    text-shadow: 0 0 10px var(--success);
}

.pnl-negative {
    color: var(--danger);
    text-shadow: 0 0 10px var(--danger);
}

.pnl-percent {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Position Item */
.position-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
}

/* Market Table */
.market-table {
    width: 100%;
    border-collapse: collapse;
}

.market-table th {
    text-align: left;
    padding: 10px;
    color: var(--arc-cyan);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--arc-blue);
}

.market-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
}

.change-positive {
    color: var(--success);
}

.change-negative {
    color: var(--danger);
}

/* Sentiment Bar */
.sentiment-bar {
    width: 100px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
}

.sentiment-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--arc-blue), var(--success));
    transition: width 0.3s;
}

/* Signal Items */
.signal-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 5px;
    border-left: 3px solid;
    background: rgba(0, 0, 0, 0.3);
}

.signal-entry {
    border-left-color: var(--success);
}

.signal-hold {
    border-left-color: var(--arc-cyan);
}

.signal-exit {
    border-left-color: var(--danger);
}

.signal-strategy {
    font-weight: bold;
    color: var(--text-primary);
}

.signal-action {
    color: var(--arc-cyan);
    font-weight: bold;
    text-transform: uppercase;
}

.signal-votes {
    color: var(--text-secondary);
    font-size: 12px;
}

.market-panel {
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    .signal-item {
        grid-template-columns: 1fr;
    }
}
