:root {
    --bg-page: #0f1012;
    --bg-card: #151619;
    --bg-input: #1a1c20;
    --border: #23252a;
    --border-light: #2a2c33;
    --accent: #5c7cfa; /* Sleek indigo/blue */
    --accent-hover: #748ffc;
    --text-main: #f8f9fa;
    --text-muted: #868e96;
    --text-dim: #495057;
    
    --font-sans: 'Inter', sans-serif;
    --font-tech: 'JetBrains Mono', monospace;
    --font-display: 'Orbitron', sans-serif;
    
    --radius: 4px; /* Harder edges for tech feel */
}

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

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Typography Helpers */
.tech-label {
    font-family: var(--font-tech);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.dim { color: var(--text-dim); }
.highlight { color: var(--text-main); }
.unit { font-size: 0.6em; margin-left: 2px; color: var(--text-muted); }

/* Navbar */
.navbar {
    width: 100%;
    max-width: 1200px;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-main);
}

.logo-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    animation: pulseHint 2s infinite ease-in-out;
}

.logo-hint a {
    font-family: var(--font-tech);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logo-hint a:hover {
    color: var(--accent);
}

.logo-hint svg {
    color: var(--accent);
    width: 14px;
    height: 14px;
}

@keyframes pulseHint {
    0%, 100% { opacity: 0.6; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(-3px); }
}
.logo span { color: var(--text-muted); font-weight: 400; }
.logo.small { font-size: 1rem; }

.nav-links {
    display: flex;
    gap: 32px;
}
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}
.nav-links a.active {
    border-bottom: 2px solid var(--accent);
    padding-bottom: 4px;
}

.nav-icons {
    display: flex;
    gap: 16px;
    color: var(--text-muted);
}

.container {
    width: 100%;
    max-width: 1000px;
    padding: 20px 20px;
    flex: 1;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 60px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
}
.hero-title span { color: var(--accent); }

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}

.search-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px;
    width: 100%;
    max-width: 600px;
    transition: border-color 0.2s;
}
.search-box:focus-within { border-color: var(--accent); }

.search-icon {
    margin: 0 16px;
    color: var(--text-muted);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    font-family: var(--font-tech);
}
.search-box input::placeholder { color: var(--text-dim); }

.search-box button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 2px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}
.search-box button:hover:not(:disabled) { background: var(--accent-hover); }
.search-box button:disabled { opacity: 0.5; cursor: not-allowed; }

.system-status {
    font-family: var(--font-tech);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.status-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
}
.status-dot.green { background: #40c057; }

.error-message { color: #fa5252; font-size: 0.9rem; margin-top: 10px; min-height: 20px;}
.hidden { display: none !important; }

/* Results Section */
.results-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeIn 0.5s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 8px;
}
.section-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-main);
    margin-top: 2px;
}
.serial-badge {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: var(--radius);
    font-family: var(--font-tech);
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Grid System */
.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.cpu-card { grid-column: span 2; }
.gpu-card { grid-column: span 1; }
.ram-card, .monitor-card, .os-card { grid-column: span 1; }

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.card-bg-icon {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 150px;
    height: 150px;
    color: rgba(255, 255, 255, 0.02);
    pointer-events: none;
}

.component-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.specs-row {
    display: flex;
    gap: 32px;
}

.spec-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spec-label {
    font-family: var(--font-tech);
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.spec-value {
    font-family: var(--font-tech);
    font-size: 1.2rem;
    color: var(--text-main);
}
.spec-value.massive {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 4px;
}

.badge-tech {
    background: #1a1d24;
    border: 1px solid var(--border-light);
    color: var(--text-main);
    font-family: var(--font-tech);
    font-size: 0.75rem;
    padding: 4px 8px;
    display: inline-block;
    border-radius: 2px;
}

/* RAM Progress */
.ram-type {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.progress-track {
    width: 100%;
    height: 4px;
    background: var(--bg-input);
    border-radius: 2px;
    margin-bottom: 8px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--accent);
}
.progress-label {
    font-family: var(--font-tech);
    font-size: 0.6rem;
    color: var(--text-dim);
}

/* OS Icon */
.os-icon {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 20px;
    color: var(--accent);
}
.os-icon svg { width: 40px; height: 40px; }

/* Storage List */
.storage-arrays {
    background: transparent;
    margin-top: 10px;
}
.storage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}
.storage-header div { display: flex; align-items: center; color: var(--text-muted); }

.storage-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom Scrollbar for Storage List */
.storage-list::-webkit-scrollbar { width: 4px; }
.storage-list::-webkit-scrollbar-track { background: var(--bg-card); border-radius: 4px; }
.storage-list::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }

.storage-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: var(--radius);
}
.storage-item:hover { border-color: var(--border); }

.storage-item-icon {
    color: var(--text-dim);
    margin-right: 16px;
}
.storage-item-info {
    flex: 1;
}
.storage-model {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
}
.storage-interface {
    font-family: var(--font-tech);
    font-size: 0.65rem;
    color: var(--text-muted);
}
.storage-size {
    font-family: var(--font-tech);
    font-size: 0.9rem;
    color: var(--accent);
    margin-right: 24px;
}
.storage-badge {
    font-family: var(--font-tech);
    font-size: 0.6rem;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 2px;
}

/* Footer Quote */
.footer-quote {
    margin-top: 40px;
    padding-left: 20px;
    border-left: 2px solid var(--border);
}
.footer-quote h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.footer-quote p { font-size: 0.9rem; font-style: italic; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; max-width: 600px;}
.quote-author {
    font-family: var(--font-tech);
    font-size: 0.65rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.quote-author .line { width: 30px; height: 1px; background: var(--text-dim); }

/* Main Footer */
.app-footer {
    width: 100%;
    max-width: 1200px;
    padding: 16px 32px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    margin-top: auto;
}
.footer-left { display: flex; flex-direction: column; gap: 8px; }
.footer-right { display: flex; gap: 60px; }
/* New Search Trigger */
.search-trigger-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: -20px auto 40px auto;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: fit-content;
}

.search-trigger-icon {
    width: 44px;
    height: 44px;
    background: rgba(74, 144, 226, 0.1);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulseIcon 2s infinite ease-in-out;
}

.search-trigger-container:hover .search-trigger-icon {
    background: var(--accent);
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.4);
}

.search-trigger-container:hover .search-trigger-icon svg {
    stroke: #fff;
}

@keyframes pulseIcon {
    0% { transform: translateY(0); box-shadow: 0 0 0 0 rgba(74, 144, 226, 0); }
    50% { transform: translateY(-5px); box-shadow: 0 0 15px 5px rgba(74, 144, 226, 0.2); }
    100% { transform: translateY(0); box-shadow: 0 0 0 0 rgba(74, 144, 226, 0); }
}

/* Expansion Animation for Search Box */
.search-box.expanding {
    animation: searchBoxExpand 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform-origin: center;
}

@keyframes searchBoxExpand {
    0% { transform: scaleX(0.4); opacity: 0; filter: blur(10px); }
    100% { transform: scaleX(1); opacity: 1; filter: blur(0); }
}

.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; }
.footer-col a:hover { color: var(--text-main); }

/* i18n Lang Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 20px;
    font-family: var(--font-tech);
    font-size: 0.8rem;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: all 0.2s;
    font-weight: 500;
}

.lang-btn:hover {
    color: #fff;
}

.lang-btn.active {
    color: var(--accent);
    font-weight: 700;
}

.lang-separator {
    color: var(--border);
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 900px) {
    .telemetry-grid { grid-template-columns: 1fr 1fr; }
    .cpu-card { grid-column: span 2; }
    .gpu-card, .ram-card, .monitor-card, .os-card { grid-column: span 1; }
}

@media (max-width: 700px) {
    .hero-title { font-size: 2.5rem; }
    .telemetry-grid { grid-template-columns: 1fr; }
    .cpu-card, .gpu-card, .ram-card, .monitor-card, .os-card { grid-column: span 1; }
    .specs-row { flex-direction: column; gap: 16px; }
    .storage-item { flex-wrap: wrap; gap: 16px; }
    .storage-size { margin-right: 0; margin-left: auto; }
    .navbar { flex-direction: column; gap: 20px; }
    .nav-links { display: none; }
    .app-footer { flex-direction: column; gap: 32px; }
}
