/* 
 * KiroCloud Premium Design System (Frost & Obsidian)
 * Version: 2.0.0
 * Author: Antigravity
 */

:root {
    /* Color Palette - Obsidian Base */
    --bg-base: #02040a;
    --bg-obsidian: #0a0c10;
    --bg-card: rgba(13, 17, 23, 0.7);

    /* Frost Accents */
    --frost-blue: #3fb1ff;
    --frost-purple: #9d56ff;
    --frost-cyan: #00f2fe;

    /* Semantic Colors */
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #484f58;

    /* Borders & Glass */
    --glass-border: rgba(240, 246, 252, 0.1);
    --glass-shine: rgba(255, 255, 255, 0.05);
    --frost-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);

    /* Layout Dimensions */
    --header-height: 80px;

    /* Animation Tokens */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

[data-theme="light"] {
    --bg-base: #f6f8fa;
    --bg-obsidian: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.8);
    --text-primary: #1f2328;
    --text-secondary: #636c76;
    --glass-border: rgba(31, 35, 40, 0.12);
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Hide scrollbar but allow scrolling */
::-webkit-scrollbar {
    display: none;
}

* {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

*::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

/* --- Layout Components --- */

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 120px 0;
}

/* --- Premium Typography --- */

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.frost-gradient {
    background: linear-gradient(135deg, var(--frost-blue) 0%, var(--frost-purple) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Glassmorphism Components --- */

.glass-card {
    background: var(--bg-card);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--frost-shadow);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: var(--frost-blue);
    transform: translateY(-5px);
    background: rgba(13, 17, 23, 0.85);
}

/* --- Buttons --- */

.btn-frost {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 600;
    font-family: var(--font-heading);
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
}

.btn-frost-primary {
    background: #ffffff;
    color: var(--bg-obsidian);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.btn-frost-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
    background: #f0f6fc;
}

.btn-frost-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-frost-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--text-primary);
}

/* --- Utilities --- */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.badge-frost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(63, 177, 255, 0.1);
    border: 1px solid rgba(63, 177, 255, 0.2);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--frost-blue);
    margin-bottom: 20px;
}

/* --- Background Effects --- */

/* The pixelated noise effect was removed based on user request */

.ambient-glow {
    position: fixed;
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(200, 200, 200, 0.03) 40%, transparent 70%);
    top: -500px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 80px 80px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 80%);
    mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 80%);
    pointer-events: none;
}

#noris-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.85;
}

.mouse-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(63, 177, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    mix-blend-mode: screen;
    filter: blur(80px);
    transition: width 0.3s ease, height 0.3s ease;
    animation: glow-pulse 4s ease-in-out infinite alternate, aura-shift 8s linear infinite;
}

@keyframes glow-pulse {
    from {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    to {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.4;
    }
}

@keyframes aura-shift {
    0% { filter: blur(80px) hue-rotate(0deg); }
    100% { filter: blur(80px) hue-rotate(45deg); }
}

/* --- Cookie Banner (Modal Style) --- */

.cookie-banner {
    background: rgba(10, 14, 23, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

.cookie-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Terminal Components --- */

.term-input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    outline: none;
    flex: 1;
    max-width: 100%;
    caret-color: transparent; /* Hide browser cursor */
    padding: 0;
    margin-left: 0;
}

.blinking-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2rem;
    background: var(--frost-blue);
    animation: terminal-blink 1s step-end infinite;
    vertical-align: middle;
}

@keyframes terminal-blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

#cmd-history div {
    margin-bottom: 8px;
    line-height: 1.5;
}

.terminal-block {
    background: rgba(255,255,255,0.03);
    border-left: 3px solid var(--frost-blue);
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
}

/* Tab System */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block !important;
}

/* --- Logo & Navigation Icons --- */
.logo-icon-box {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-icon-box-sm {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --- Header Navigation --- */
.header-nav-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    margin-right: 15px;
}

.lang-btn {
    padding: 6px 12px;
    border-radius: 7px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    color: var(--text-muted);
}

.lang-btn.active {
    background: var(--frost-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(63, 177, 255, 0.2);
}

.lang-btn:hover:not(.active) {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
}

.btn-login {
    margin-right: 10px;
}

/* --- Global Header Navigation --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    background: rgba(2, 4, 10, 0.8);
}

nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    max-width: 100%;
    margin: 0 auto;
}

nav .container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.nav-links-wrap {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Main content offset for fixed header */
main,
.docs-layout,
.status-page,
.about-page,
.hero {
    padding-top: var(--header-height);
}

/* Responsive Header */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    nav {
        padding: 0 1rem;
    }
    
    .nav-links-wrap {
        gap: 1rem;
    }
    
    .nav-link-item {
        font-size: 0.85rem;
    }
    
    .lang-toggle {
        margin-right: 10px;
    }
    
    .btn-login {
        padding: 10px 16px !important;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: 60px;
    }
    
    header {
        padding: 0 0.5rem;
    }
    
    nav {
        padding: 0 0.5rem;
    }
    
    .nav-links-wrap {
        gap: 0.5rem;
    }
    
    .lang-toggle {
        padding: 2px;
        margin-right: 8px;
    }
    
    .lang-btn {
        padding: 4px 8px;
        font-size: 0.65rem;
    }
    
    .nav-link-item {
        display: none; /* Hide nav links on very small screens */
    }
    
    .nav-link-item.active {
        display: inline-block; /* Show active link only */
    }
}

/* --- Hero Section --- */
.hero-buttons {
    display: flex;
    gap: 1rem;
}

.section-center-text {
    text-align: center;
    margin-bottom: 5rem;
}

.section-heading-large {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.section-intro-text {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Feature Cards --- */
.feature-card-title {
    margin-bottom: 1rem;
}

.feature-card-desc {
    color: var(--text-secondary);
    max-width: 300px;
}

/* --- Terminal/Shell Styling --- */
.tab-shell-content {
    padding: 30px;
    font-family: 'Fira Code', monospace;
    color: #ccc;
    height: 350px;
    overflow-y: auto;
}

.shell-welcome {
    color: var(--frost-blue);
    margin-bottom: 15px;
    font-weight: 600;
}

.shell-input-row {
    display: flex;
    align-items: center;
    margin-top: 10px;
    gap: 8px;
    position: relative;
    flex: 1;
}

.shell-prompt {
    color: #fff;
    flex-shrink: 0;
}

.w-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.w-dot.cmd-error {
    background: #ff5f56;
}

.w-dot.cmd-warn {
    background: #ffbd2e;
}

.w-dot.cmd-success {
    background: #27c93f;
}

.help-command {
    color: #27c93f;
}

.cmd-success {
    color: #27c93f;
}

.cmd-warn {
    color: #ffbd2e;
}

.cmd-error {
    color: #ff5f56;
}

/* --- Management Tab Content --- */
.mgmt-tab-content {
    display: none;
    padding: 40px;
    height: 350px;
}

.mgmt-tab-content.active {
    display: block;
}

.mgmt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.node-card {
    padding: 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.node-info-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.node-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.node-status-online {
    font-size: 0.85rem;
    color: #27c93f;
    font-weight: 700;
}

.btn-node-control {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.mgmt-footer-text {
    margin-top: 30px;
    text-align: center;
}

.mgmt-footer-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Stats Tab Content --- */
.stats-tab-content {
    display: none;
    padding: 40px;
    height: 350px;
    text-align: center;
}

.stats-tab-content.active {
    display: block;
}

.stats-heading {
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-card {
    padding: 20px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    min-width: 140px;
}

.stat-value {
    color: var(--frost-blue);
    font-weight: 700;
    font-size: 1.8rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.stats-footer {
    margin-top: 40px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Hardware Section --- */
.hw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.hw-card {
    padding: 2.5rem;
    border-radius: 24px;
}

.hw-card h4 {
    margin-bottom: 1rem;
}

.hw-card p {
    color: var(--text-secondary);
}

/* --- Team Section --- */
.team-section {
    padding: 100px 0;
}

.team-heading {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.team-intro {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.team-btn-view-all {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.team-card {
    padding: 2rem;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    text-align: center;
    transition: var(--transition-smooth);
}

.team-card:hover {
    border-color: var(--frost-blue);
    transform: translateY(-5px);
}

.team-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    border: 2px solid var(--frost-blue);
    object-fit: cover;
}

.team-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.team-role {
    color: var(--frost-blue);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.team-title {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.team-bio {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.team-socials {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.team-social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(63, 177, 255, 0.1);
    color: var(--frost-blue);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.team-social-link:hover {
    background: var(--frost-blue);
    color: white;
    transform: scale(1.1);
}

/* --- CTA Section --- */
.cta-section {
    text-align: center;
    padding: 150px 0;
}

.cta-heading {
    font-size: 4rem;
    margin-bottom: 2rem;
}

.cta-text {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.2rem;
}

.btn-cta {
    padding: 1.5rem 3.5rem;
    font-size: 1.2rem;
}

/* --- Footer --- */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 5rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-col ul li a:hover {
    color: var(--frost-blue);
}

.footer-break {
    margin-top: 5rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-link-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
    font-size: 0.95rem;
}

.nav-link-item:hover {
    color: var(--frost-blue);
}

.nav-link-active {
    color: white;
    font-weight: 700;
}

.footer-logo-wrap {
    margin-bottom: 2rem;
}

.main-with-padding {
    padding-top: 140px;
}

.status-hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.status-loading-message {
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
    width: 100%;
}

.footer-break-status {
    padding: 60px 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.about-footer {
    margin-top: 100px;
    padding: 60px 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.footer-about-content {
    color: var(--text-muted);
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}