:root {
    --bg-dark: #020205;
    --neon-cyan: #00f3ff;
    --neon-purple: #bc13fe;
    --glass-border: rgba(0, 243, 255, 0.3);
    --text-main: #e0f8ff;
    --text-dim: #7da5b3;
    --font-heading: 'Rajdhani', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-heading);
    min-height: 100vh;
    /* Ensure no unwanted scrollbars */
    overflow-x: hidden;
    overflow-y: auto;
    
    /* Flex layout to manage responsive centering */
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* AI Interactive Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    background: radial-gradient(circle at center, #0a0a1a 0%, #000000 100%);
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    z-index: 1;
    pointer-events: none;
}

/* Wrapper */
.content-wrapper {
    position: relative;
    z-index: 10;
    width: 95%;
    max-width: 650px;
    margin: 2rem auto;
    /* Important for 3D tilt effect */
    perspective: 1500px; 
}

/* Glass Panel - The interactive 3D card */
.glass-panel {
    width: 100%;
    position: relative;
    
    /* Highly responsive padding using clamp */
    padding: clamp(1.5rem, 5vw, 3rem);
    
    background: rgba(10, 15, 30, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 24px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.8), 
                inset 0 0 0 1px rgba(255,255,255,0.05);
    
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    
    /* 3D and Transitions */
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out; /* Super snappy and smooth */
    overflow: hidden; /* Contains the dynamic glow */
}

/* Dynamic glowing orb that tracks mouse cursor */
.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at var(--mouse-x, -1000px) var(--mouse-y, -1000px), 
        rgba(0, 243, 255, 0.2) 0%,
        transparent 50%
    );
    z-index: -1;
    pointer-events: none;
    transition: background 0.1s ease;
}

/* Floating content within the 3D card for depth */
.ai-core-container, .status-container, .terminal-box, .progress-section {
    transform: translateZ(30px); /* Pushes elements out towards the user during tilt */
}

/* AI Core Logo Section */
.ai-core-container {
    position: relative;
    width: clamp(150px, 40vw, 220px);
    height: clamp(150px, 40vw, 220px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.core-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.outer-ring {
    width: 100%;
    height: 100%;
    border: 2px solid rgba(0, 243, 255, 0.2);
    border-top: 2px solid var(--neon-cyan);
    border-bottom: 2px solid var(--neon-purple);
    animation: spin 8s linear infinite;
}

.inner-ring {
    width: 85%;
    height: 85%;
    border: 1px solid rgba(188, 19, 254, 0.3);
    border-left: 2px solid var(--neon-purple);
    border-right: 2px solid var(--neon-cyan);
    animation: spinReverse 6s linear infinite;
}

.dashed-ring {
    width: 115%;
    height: 115%;
    border: 2px dashed rgba(0, 243, 255, 0.4);
    animation: spin 12s linear infinite;
    opacity: 0.5;
}

.core-logo {
    max-width: 55%;
    max-height: 55%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px var(--neon-cyan)) drop-shadow(0 0 20px rgba(188, 19, 254, 0.8));
    animation: corePulse 2s infinite alternate;
    z-index: 5;
}

@keyframes spin { 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes spinReverse { 100% { transform: translate(-50%, -50%) rotate(-360deg); } }
@keyframes corePulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 10px var(--neon-cyan)); }
    100% { transform: scale(1.05); filter: drop-shadow(0 0 25px var(--neon-purple)); }
}

/* Status Text */
.status-container {
    text-align: center;
    width: 100%;
}

.status-label {
    font-family: var(--font-mono);
    font-size: clamp(0.8rem, 3vw, 1.1rem);
    color: var(--neon-cyan);
    letter-spacing: clamp(3px, 1vw, 6px);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.glitch-text {
    font-size: clamp(1.8rem, 6vw, 3rem);
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    text-shadow: 0 0 15px var(--neon-cyan);
    letter-spacing: 2px;
}

/* Terminal Box */
.terminal-box {
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(188, 19, 254, 0.4);
    border-radius: 8px;
    font-family: var(--font-mono);
    box-shadow: inset 0 0 15px rgba(0,0,0,0.8), 0 0 15px rgba(188, 19, 254, 0.1);
}

.terminal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(188, 19, 254, 0.3);
}

.dot {
    width: clamp(8px, 2vw, 12px);
    height: clamp(8px, 2vw, 12px);
    border-radius: 50%;
}
.dot.red { background: #ff5f56; box-shadow: 0 0 5px #ff5f56; }
.dot.yellow { background: #ffbd2e; box-shadow: 0 0 5px #ffbd2e; }
.dot.green { background: #27c93f; box-shadow: 0 0 5px #27c93f; }

.terminal-title {
    font-size: clamp(0.7rem, 2vw, 0.8rem);
    color: var(--text-dim);
    margin-left: 0.5rem;
}

.terminal-body {
    padding: clamp(1rem, 4vw, 1.5rem);
    font-size: clamp(0.75rem, 3vw, 0.9rem);
    color: var(--neon-cyan);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.log-line {
    opacity: 0;
    animation: fadeIn 0.2s forwards;
    text-shadow: 0 0 5px var(--neon-cyan);
}

@keyframes fadeIn { to { opacity: 1; } }

/* Progress Bar */
.progress-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    color: var(--text-main);
    letter-spacing: 1px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    position: relative;
    border: 1px solid rgba(0, 243, 255, 0.3);
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-cyan));
    border-radius: 4px;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 10px var(--neon-cyan);
}
