:root {
    --bg-dark: #050505;
    --bg-card: rgba(20, 20, 25, 0.6);
    --primary: #00ff9d;
    --secondary: #00f3ff;
    --accent: #7000ff;
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --text-dim: #606070;

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(20px);

    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;

    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(112, 0, 255, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 255, 157, 0.05), transparent 25%);
    background-attachment: fixed;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Utilities */
.highlight {
    color: var(--primary);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.2);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 255, 157, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-main);
    transform: translateY(-3px);
}

.btn-outline {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--glass-border);
    background: linear-gradient(90deg, transparent, transparent);
    color: var(--primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(0, 255, 157, 0.05);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.1);
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    background: linear-gradient(to bottom, #fff, #888);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Header - Floating & Glass */
#main-header {
    position: fixed;
    top: 20px;
    left: 0;
    width: 100%;
    z-index: 1000;
    pointer-events: none;
    /* Let clicks pass through area outside container */
}

#main-header .container {
    pointer-events: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 15px 30px;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.4s ease;
}

#main-header.scrolled .container {
    background: rgba(5, 5, 5, 0.9);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    gap: 40px;
    align-items: center;
}

nav a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
    padding: 5px 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

nav a:hover,
nav a.active {
    color: var(--text-main);
}

nav a:hover::after {
    width: 100%;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 15px;
    margin-left: 20px;
    padding-left: 30px;
    border-left: 1px solid var(--glass-border);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.8rem;
    transition: 0.3s;
    font-family: var(--font-body);
}

.lang-btn:hover,
.lang-btn.active {
    color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-main);
    margin: 6px 0;
    transition: all 0.3s ease;
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 100px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Canvas will be injected here */
}

#hero h1 {
    font-size: 5rem;
    margin-bottom: 25px;
    line-height: 1;
    font-weight: 700;
}

#hero p {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 25px;
    justify-content: center;
}

/* Services & Common Sections */
section {
    padding: 100px 0;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}

/* Card Glow Effect */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(0, 255, 157, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.service-card .icon {
    font-size: 3rem;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #fff, #888);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Feature Rows (Redesigned Services) */
.feature-row {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 50px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--ease-out);
}

.feature-row:hover {
    border-color: rgba(0, 255, 157, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-5px);
}

.feature-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.icon-large {
    font-size: 4rem;
    margin-bottom: 20px;
    display: inline-block;
    filter: drop-shadow(0 0 20px rgba(0, 255, 157, 0.3));
}

.feature-row h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.feature-detail {
    color: var(--text-muted);
    margin-top: 15px;
    font-size: 1rem;
    line-height: 1.8;
}

/* FAQ Section */
.faq-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 30px;
    border-radius: 15px;
    border-left: 3px solid var(--primary);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-left-color: var(--secondary);
    transform: translateX(5px);
}

.faq-item h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.faq-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Algorithm Sections */
.algo-section {
    margin-bottom: 50px;
}

.algo-section:last-child {
    margin-bottom: 0;
}

.algo-header {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.algo-header::before {
    content: '⛏️';
    font-size: 1.3rem;
}

.algo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* Miner Cards */
.miner-card {
    background: linear-gradient(160deg, rgba(20, 20, 25, 0.8), rgba(10, 10, 12, 0.95));
}

.miner-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.miner-header h3 {
    font-size: 1.6rem;
    background: linear-gradient(to right, #fff, #ccc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status {
    font-size: 0.7rem;
    padding: 6px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.status.available {
    background: rgba(0, 255, 157, 0.1);
    color: var(--primary);
    border: 1px solid rgba(0, 255, 157, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.1);
}

.status.rented {
    background: rgba(255, 206, 84, 0.1);
    color: #ffce54;
    border: 1px solid rgba(255, 206, 84, 0.2);
    box-shadow: 0 0 10px rgba(255, 206, 84, 0.1);
}

.status.offline {
    background: rgba(255, 100, 100, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(255, 100, 100, 0.2);
    box-shadow: 0 0 10px rgba(255, 100, 100, 0.1);
}

.miner-specs {
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
}

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

.spec:last-child {
    border-bottom: none;
}

.spec span {
    color: var(--text-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 120px;
    flex-shrink: 0;
}

.spec strong {
    color: var(--text-main);
    font-weight: 600;
    white-space: nowrap;
    text-align: right;
}

/* Footer */
footer {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    background: linear-gradient(to bottom, var(--bg-dark), #000);
    margin-top: 100px;
}

footer p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    #hero h1 {
        font-size: 3.5rem;
    }

    #main-header .container {
        padding: 15px 20px;
        width: 90%;
        margin: 0 auto;
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        margin-top: 15px;
        background: rgba(15, 15, 20, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 30px;
        border-radius: 20px;
        border: 1px solid var(--glass-border);
        flex-direction: column;
        align-items: center;
    }

    nav.active {
        display: flex;
    }

    nav ul {
        flex-direction: column;
        gap: 25px;
    }

    .lang-switcher {
        margin: 20px 0 0 0;
        padding: 20px 0 0 0;
        border-left: none;
        border-top: 1px solid var(--glass-border);
        width: 100%;
        justify-content: center;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
        background: var(--primary);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
        background: var(--primary);
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Animations classes */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s var(--ease-out);
}

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

/* --- CRITICAL LAYOUT FIXES --- */

/* Infrastructure Bar */
.infra-bar {
    background: rgba(0, 255, 157, 0.05);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    padding: 20px 0;
    margin-top: -50px;
    margin-bottom: 50px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
}

.infra-bar .container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.infra-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-main);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.infra-item .icon {
    font-size: 1.2rem;
}

/* Services Grid - Forced Layout */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    width: 100%;
}

.premium-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid var(--glass-border);
    background: linear-gradient(145deg, rgba(20, 20, 25, 0.6), rgba(10, 10, 15, 0.8));
    border-radius: 20px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.7rem;
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-badge.primary {
    background: rgba(0, 255, 157, 0.15);
    color: var(--primary);
    border: 1px solid rgba(0, 255, 157, 0.3);
}

.premium-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 255, 157, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.feature-detail {
    color: var(--text-muted);
    margin-top: 20px;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 25px;
}

.btn-sm {
    padding: 10px 30px;
    font-size: 0.8rem;
}

/* Global Features Section (New) */
#global-features {
    padding: 80px 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 255, 157, 0.03) 100%);
}

.global-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.gf-item {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.gf-item h3 {
    margin: 20px 0 10px 0;
    font-size: 1.3rem;
    color: var(--text-main);
}

.gf-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .infra-bar {
        display: none;
        /* Hide top bar on mobile, show global section instead */
    }
}