/* ===== VARIABLES ===== */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #0b1220;
    --bg-tertiary: #111827;
    --bg-card: rgba(30, 41, 59, 0.55);
    --bg-glass: rgba(17, 24, 39, 0.55);
    --bg-input: rgba(15, 23, 42, 0.7);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-highlight: rgba(255, 255, 255, 0.08);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-cyan: #00d4ff;
    --accent-blue: #3b82f6;
    --gradient-cyan-blue: linear-gradient(90deg, #00d4ff, #3b82f6);
    --gradient-cyan-light: linear-gradient(90deg, #00d4ff, #38bdf8);
    --shadow-cyan: rgba(0, 212, 255, 0.3);
    --shadow-cyan-subtle: rgba(0, 212, 255, 0.08);
    --success: #22c55e;
    --warning: orange;
    --danger: #ef4444;
    --critical: red;
}

/* ===== RESET & GLOBAL ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top left, var(--bg-primary), var(--bg-secondary) 60%);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* ===== GLASS EFFECT ===== */
.glass {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-highlight);
    border-radius: 12px;
}

/* ===== APP LAYOUT ===== */
.app-layout {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 240px;
    min-width: 240px;
    padding: 30px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--border-color);
}

.sidebar .brand {
    font-size: 1.5rem;
    margin-bottom: 40px;
    color: var(--accent-cyan);
    font-weight: bold;
}

.sidebar nav a {
    display: block;
    padding: 12px 0;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    color: var(--accent-cyan);
}

/* ===== MAIN AREA ===== */
.main-area {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.page-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.system-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    padding: 20px;
    text-align: center;
}

.metric-card h4 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.metric-card p {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-cyan);
}

/* ===== ANALYSIS PANEL ===== */
.analysis-panel {
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.panel-header {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--accent-cyan);
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
}

/* ===== FORM ELEMENTS ===== */
input, select, textarea {
    width: 100%;
    margin-bottom: 20px;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    font-family: inherit;
}

textarea {
    height: 120px;
    resize: none;
}

/* ===== FILE UPLOAD ZONE ===== */
.file-upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload-zone:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.05);
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.file-preview {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--accent-cyan);
}

/* ===== BUTTONS ===== */
.primary-btn {
    width: 100%;
    padding: 14px;
    background: var(--gradient-cyan-blue);
    border: none;
    border-radius: 8px;
    font-weight: bold;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.3s;
}

.primary-btn:hover {
    box-shadow: 0 0 20px var(--shadow-cyan);
    transform: translateY(-2px);
}

/* ===== LOADERS ===== */
.analysis-loader {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loader {
    width: 20px;
    height: 20px;
    border: 2px solid #000;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== OUTPUT SECTION ===== */
.output-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 20px;
    min-height: 400px;
    border: 1px solid var(--border-color);
}

.output-placeholder {
    color: var(--text-muted);
    text-align: center;
    margin-top: 100px;
}

.result-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-cyan);
}

.result-card h3 {
    font-size: 0.9rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.confidence-meter {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 10px;
}

.confidence-fill {
    height: 100%;
    background: var(--gradient-cyan-blue);
    border-radius: 3px;
}

/* ===== LANDING PAGE (INDEX.HTML) ===== */
.entry-body {
    background: #020617;
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.tech-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 50%, #1e293b 0%, #020617 70%);
    z-index: 1;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(0, 212, 255, 0.2);
    z-index: 2;
    animation: scan 4s linear infinite;
}

@keyframes scan {
    0% { top: -2%; }
    100% { top: 100%; }
}

.entry-container {
    position: relative;
    z-index: 10;
    display: flex;
    width: 80%;
    max-width: 1200px;
    align-items: center;
    justify-content: space-between;
}

.entry-left {
    flex: 1;
}

.entry-left h1 {
    font-size: 4rem;
    font-weight: 800;
    background: var(--gradient-cyan-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.entry-left h2 {
    font-size: 2rem;
    color: #f8fafc;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.tagline {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 400px;
}

.entry-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.entry-buttons .primary-btn, 
.entry-buttons .secondary-btn {
    width: auto;
    padding: 12px 30px;
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 6px;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-cyan);
}

.entry-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.server-visual {
    position: relative;
    width: 200px;
    height: 300px;
}

.server-svg {
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.3));
}

.led {
    fill: #00d4ff;
    animation: blink 2s infinite;
}

.led:nth-child(even) {
    animation-delay: 1s;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.grid-animation {
    width: 400px;
    height: 400px;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    transform: perspective(500px) rotateX(60deg);
    animation: grid-move 5s linear infinite;
    position: absolute;
    right: -100px;
    bottom: -100px;
    z-index: -1;
}

@keyframes grid-move {
    0% { background-position: 0 0; }
    100% { background-position: 0 40px; }
}

