@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    --bg-deep: #06080e;
    --panel-bg: rgba(13, 17, 27, 0.7);
    --panel-border: rgba(254, 203, 0, 0.15);
    --panel-border-hover: rgba(254, 203, 0, 0.35);
    --accent-yellow: #fecb00; /* Hipower Yellow */
    --accent-yellow-glow: rgba(254, 203, 0, 0.4);
    --accent-blue: #00d2ff;
    --accent-blue-glow: rgba(0, 210, 255, 0.3);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-dark: #0a0b0d;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --grid-color: rgba(254, 203, 0, 0.03);
}

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

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-heading);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

/* Background Cyber Grid & Scanlines */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
    pointer-events: none;
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0) 0%,
        rgba(254, 203, 0, 0.015) 10%,
        rgba(255,255,255,0) 20%
    );
    background-size: 100% 30px;
    animation: scanlineAnim 12s linear infinite;
    pointer-events: none;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    pointer-events: none;
}

/* Main Container Layout */
.app-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    flex-grow: 1;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1.5rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(254, 203, 0, 0.2));
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(254, 203, 0, 0.06);
    border: 1px solid rgba(254, 203, 0, 0.25);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-yellow);
    box-shadow: 0 0 12px rgba(254, 203, 0, 0.05);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-yellow);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-yellow);
    animation: pulse 1.8s infinite;
}

/* Dashboard Content Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
    align-items: center;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Left Panel - Info & Call to Action */
.info-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.title-tagline {
    font-family: var(--font-mono);
    color: var(--accent-blue);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    display: block;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.title-tagline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 1.5px;
    background-color: var(--accent-blue);
}

.info-panel h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 40%, var(--accent-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.info-panel p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 580px;
}

/* Notification Form */
.notify-box {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2rem;
    border-radius: 16px;
    max-width: 500px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.notify-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-yellow);
}

.notify-box:hover, .notify-box:focus-within {
    border-color: var(--panel-border-hover);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(254, 203, 0, 0.05);
}

.notify-box h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.notify-box p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.input-group {
    display: flex;
    gap: 0.75rem;
    position: relative;
}

@media (max-width: 480px) {
    .input-group {
        flex-direction: column;
    }
}

.email-input {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.85rem 1.2rem;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.email-input:focus {
    border-color: var(--accent-yellow);
    box-shadow: 0 0 10px rgba(254, 203, 0, 0.15);
    background: rgba(0, 0, 0, 0.6);
}

.submit-btn {
    background: var(--accent-yellow);
    color: var(--text-dark);
    border: none;
    padding: 0.85rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.submit-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: 0.5s;
}

.submit-btn:hover::after {
    left: 100%;
}

.submit-btn:hover {
    background: #e5b600;
    box-shadow: 0 0 15px rgba(254, 203, 0, 0.4);
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(1px);
}

/* Success / Error Notification Messages */
.form-feedback {
    margin-top: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-feedback.success {
    color: #10b981;
    display: block;
    opacity: 1;
}

.form-feedback.error {
    color: #ef4444;
    display: block;
    opacity: 1;
}

/* Right Panel - Telemetry Widgets */
.telemetry-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.widget {
    background: var(--panel-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.widget:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    transform: translateY(-2px);
}

.widget::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 30px;
    background: linear-gradient(45deg, transparent 45%, rgba(255, 255, 255, 0.03) 50%, transparent 55%);
}

.widget-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.widget-title i {
    width: 6px;
    height: 6px;
    background-color: var(--accent-blue);
    border-radius: 50%;
}

/* Widget Specifics: 1. System Load / Wave Widget */
.wave-container {
    height: 90px;
    position: relative;
    margin-top: 0.5rem;
}

#wave-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.wave-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.wave-stats span strong {
    color: var(--accent-blue);
}

/* Widget Specifics: 2. Calibration Circle Widget */
.widget-calibration {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.progress-circle-wrap {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0.5rem 0;
}

.progress-circle-svg {
    transform: rotate(-90deg);
    width: 100px;
    height: 100px;
}

.progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 6px;
}

.progress-bar {
    fill: none;
    stroke: var(--accent-yellow);
    stroke-width: 6px;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-val {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.progress-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-yellow);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* Widget Specifics: 3. Tech Specs Widget */
.specs-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 0.3rem;
}

.spec-item span:first-child {
    color: var(--text-secondary);
}

.spec-item span:last-child {
    color: var(--text-primary);
    font-weight: 500;
}

.text-yellow {
    color: var(--accent-yellow) !important;
}

/* Widget Specifics: 4. Console Log Widget */
.widget-console {
    min-height: 130px;
}

.console-terminal {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.75rem;
    height: 100px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #4ade80; /* matrix green */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.console-terminal::-webkit-scrollbar {
    width: 4px;
}

.console-terminal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.console-line {
    line-height: 1.4;
    margin-bottom: 0.25rem;
    opacity: 0;
    transform: translateY(4px);
    animation: lineFadeIn 0.3s forwards;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.console-line::before {
    content: '> ';
    color: var(--accent-yellow);
}

/* Footer Section */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
    margin-top: 2rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.footer-links a:hover {
    color: var(--accent-yellow);
}

@media (max-width: 600px) {
    footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Keyframe Animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(254, 203, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(254, 203, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(254, 203, 0, 0);
    }
}

@keyframes scanlineAnim {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

@keyframes lineFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cyber Decors */
.cyber-decor-1 {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--accent-yellow);
    border-right: 2px solid var(--accent-yellow);
    pointer-events: none;
    opacity: 0.3;
}

.cyber-decor-2 {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--accent-yellow);
    border-left: 2px solid var(--accent-yellow);
    pointer-events: none;
    opacity: 0.3;
}
