@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
    --cyan: #00f2fe;
    --dark-cyan: #0891b2;
    --fuchsia: #d946ef;
    --dark-bg: #02050d;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background-color: var(--dark-bg);
}

.font-syncopate { font-family: 'Syncopate', sans-serif; }
.font-mono { font-family: 'Fira Code', monospace; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #02050d; }
::-webkit-scrollbar-thumb { background: #0891b2; border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

.crt-scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.12) 50%, rgba(0,0,0,0.12));
    background-size: 100% 4px;
    opacity: 0.5;
}

.vignette-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 40;
    background: radial-gradient(circle at center, transparent 45%, rgba(2, 5, 13, 0.8) 100%);
}

.cyber-header {
    background: linear-gradient(90deg, #030717 0%, #060e26 50%, #030717 100%);
}

.hex-icon {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.glow-text {
    text-shadow: 0 0 12px rgba(0, 242, 254, 0.6), 0 0 24px rgba(0, 242, 254, 0.4);
}

.cyber-badge {
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.cyber-btn-primary {
    background: var(--cyan);
    color: var(--dark-bg);
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.7);
    position: relative;
    overflow: hidden;
}

.cyber-btn-primary:hover {
    background: #ffffff;
    box-shadow: 0 0 30px var(--cyan), 0 0 50px var(--cyan);
}

.cyber-btn-secondary {
    background: #061129;
    border: 1px solid var(--cyan);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.cyber-btn-secondary:hover {
    background: rgba(0, 242, 254, 0.15);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.cyber-tab-container {
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.mode-tab.active {
    background: linear-gradient(135deg, #0891b2, #0284c7);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(8, 145, 178, 0.6);
}

.cyber-panel {
    background: linear-gradient(135deg, rgba(4, 9, 24, 0.95) 0%, rgba(2, 6, 18, 0.98) 100%);
    border: 1px solid rgba(0, 242, 254, 0.35);
    clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.tool-btn {
    background: #050d24;
    border: 1px solid rgba(0, 242, 254, 0.3);
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
    padding: 0.75rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #38bdf8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    letter-spacing: 0.08em;
}

.tool-btn:hover {
    background: rgba(0, 242, 254, 0.15);
    border-color: var(--cyan);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.tool-btn.active {
    background: linear-gradient(180deg, #0c4a6e 0%, #032d47 100%);
    border-color: var(--cyan);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.5);
}

.cyber-tag {
    clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
}

.cyber-input {
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.domain-tab.active {
    background: rgba(0, 242, 254, 0.18);
    border-bottom: 2px solid var(--cyan);
    color: var(--cyan);
    text-shadow: 0 0 8px var(--cyan);
}

.radial-gradient-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 242, 254, 0.06) 0%, transparent 65%);
    pointer-events: none;
}

.cyber-canvas-wrapper {
    clip-path: polygon(25px 0, 100% 0, 100% calc(100% - 25px), calc(100% - 25px) 100%, 0 100%, 0 25px);
}

.inner-canvas-board {
    clip-path: polygon(23px 0, 100% 0, 100% calc(100% - 23px), calc(100% - 23px) 100%, 0 100%, 0 23px);
}

.hud-frame {
    position: absolute;
    width: 35px;
    height: 35px;
    border-color: var(--cyan);
    z-index: 30;
    pointer-events: none;
}

.hud-frame.top-left { top: 0; left: 0; border-top: 3px solid var(--cyan); border-left: 3px solid var(--cyan); }
.hud-frame.top-right { top: 0; right: 0; border-top: 3px solid var(--cyan); border-right: 3px solid var(--cyan); }
.hud-frame.bottom-left { bottom: 0; left: 0; border-bottom: 3px solid var(--cyan); border-left: 3px solid var(--cyan); }
.hud-frame.bottom-right { bottom: 0; right: 0; border-bottom: 3px solid var(--cyan); border-right: 3px solid var(--cyan); }

.grid-crosshairs {
    background-image: 
        linear-gradient(rgba(0, 242, 254, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 254, 0.18) 1px, transparent 1px);
    background-size: 36px 36px;
    background-position: center center;
}

.holographic-scanner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--cyan);
    box-shadow: 0 0 15px var(--cyan), 0 0 30px var(--cyan);
    animation: scan 2s linear infinite;
    z-index: 20;
    pointer-events: none;
}

@keyframes scan {
    0% { top: -5%; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { top: 105%; opacity: 0; }
}

.cyber-math-box, .cyber-chart-box {
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

#btn-vcvs, #btn-vccs, #btn-ccvs, #btn-cccs {
    background-color: #f8f9fa;
    border: 2px solid #6c757d;
    color: #343a40;
    padding: 8px 12px;
    margin: 4px;
    cursor: pointer;
    border-radius: 6px;
    font-weight: bold;
    transition: all 0.2s ease-in-out;
}

#btn-vcvs:hover, #btn-vccs:hover, #btn-ccvs:hover, #btn-cccs:hover {
    background-color: #e2e6ea;
    border-color: #495057;
}

#btn-vcvs.active, #btn-vccs.active, #btn-ccvs.active, #btn-cccs.active {
    background-color: #cce5ff;
    border-color: #0056b3;
    color: #004085;
    box-shadow: 0 0 5px rgba(0, 86, 179, 0.5);
}

.panel-fullscreen {
    position: fixed !important;
    top: 20px !important;
    left: 20px !important;
    width: calc(100vw - 40px) !important;
    height: calc(100vh - 40px) !important;
    max-height: none !important;
    z-index: 999999 !important;
    background: #020612 !important;
    border: 2px solid #00f2fe !important;
    box-shadow: 0 0 60px rgba(0, 242, 254, 0.4), 0 0 0 9999px rgba(0, 0, 0, 0.8) !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 8px;
    transform: none !important;
}

.panel-fullscreen #mathOutput {
    flex: 1 1 auto !important;
    max-height: none !important;
    height: 100% !important;
    min-height: 0 !important;
    font-size: 1.25rem !important;
}

.panel-fullscreen .cyber-chart-box {
    flex: 1 1 auto !important;
    height: 100% !important;
    min-height: 0 !important;
}
