/* =========================================
   FreshStream - Style Guide & Base Theme
   ========================================= */

:root {
    --bg-dark: #07090F;
    --bg-card: rgba(22, 27, 44, 0.6);
    --bg-card-hover: rgba(30, 36, 56, 0.8);
    --text-main: #E2E8F0;
    --text-muted: #94A3B8;
    
    --accent-green: #00E676;
    --accent-green-glow: rgba(0, 230, 118, 0.4);
    
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --blur: blur(12px);

    /* Fruit Node Colors */
    --c-apple: #FF3B30;
    --c-grape: #AF52DE;
    --c-blueberry: #007AFF;
    --c-cloudberry: #FF9500;
    --c-lemon: #FFCC00;
    --c-strawberry: #FF2D55;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Blobs */
.bg-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-green) 0%, transparent 70%);
    top: -10%;
    left: -10%;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #2563EB 0%, transparent 70%);
    bottom: -20%;
    right: -10%;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #8B5CF6 0%, transparent 70%);
    top: 40%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 5%) scale(1.1); }
    100% { transform: translate(-5%, 10%) scale(0.9); }
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

.highlight {
    color: var(--accent-green);
}

.gradient-text {
    background: linear-gradient(90deg, var(--accent-green), #00B0FF, var(--accent-green));
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
}

.animate-gradient {
    animation: shine 5s linear infinite;
}

@keyframes shine {
    to { background-position: 200% center; }
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-center { text-align: center; }

/* Utilities */
.glass {
    background: var(--bg-card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
}

.box-hover {
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.box-hover:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255, 0.2);
    background: var(--bg-card-hover);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-body);
    border-radius: 12px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--accent-green);
    color: #000;
}

.btn-primary:hover {
    background: #00C853;
    transform: scale(1.05);
}

.glow-effect {
    box-shadow: 0 0 20px var(--accent-green-glow);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--blur);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 100;
    transition: background 0.3s ease, padding 0.3s ease;
}

.header.scrolled {
    background: rgba(7, 9, 15, 0.85);
    backdrop-filter: var(--blur);
    padding: 15px 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a:not(.btn) {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:not(.btn):hover {
    color: var(--accent-green);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.pulse-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--accent-green);
    border-radius: 50%;
    margin-left: 10px;
    box-shadow: 0 0 0 rgba(0, 230, 118, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 230, 118, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

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

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.about-stats .stat-card:first-child {
    grid-column: span 2;
}

.stat-card {
    padding: 30px;
    text-align: center;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-green);
    line-height: 1;
}

.stat-value .small-text {
    font-size: 1.2rem;
    opacity: 0.8;
}

.stat-label {
    margin-top: 10px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Network Section */
.network-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.network-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

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

/* Node Card defined in CSS, populated via JS */
.node-card {
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.node-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: var(--node-color, var(--accent-green));
    box-shadow: 0 0 15px var(--node-color, var(--accent-green));
}

.node-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.node-title {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

.node-info {
    min-width: 0;
}

.fruit-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

.node-info h3 {
    font-size: 1.25rem;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.node-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    white-space: nowrap;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(0, 230, 118, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(0, 230, 118, 0.2);
    flex-shrink: 0;
}

.status-indicator {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

.node-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 25px;
    border-top: 1px solid var(--glass-border);
    padding-top: 25px;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric-val {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
}

/* Load Bar */
.load-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.load-bar-fill {
    height: 100%;
    background: var(--node-color, var(--accent-green));
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Tech Section */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.tech-card {
    padding: 40px 30px;
}

.tech-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.tech-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

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

/* Contact Section */
.contact-container {
    padding: 60px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
}

.benefit-list {
    list-style: none;
    margin-top: 30px;
}

.benefit-list li {
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 500;
}

.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .half {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-muted);
}

input, select, textarea {
    width: 100%;
    padding: 16px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-green);
    background: rgba(0,0,0,0.4);
}

select option {
    background: var(--bg-dark);
    color: #fff;
}

.btn-block {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
}

.form-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    display: none;
}

.form-result.success {
    display: block;
    background: rgba(0, 230, 118, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(0, 230, 118, 0.2);
}

/* Footer */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 80px 0 30px;
    background: rgba(0,0,0,0.3);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-desc {
    color: var(--text-muted);
    margin-top: 20px;
    max-width: 300px;
}

.footer h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s;
}

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

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

/* Scroll Animations */
.scroll-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-fade.is-visible, .scroll-fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.d-delay-1 { transition-delay: 0.1s; }
.d-delay-2 { transition-delay: 0.2s; }
.d-delay-3 { transition-delay: 0.3s; }

/* Responsive */
@media (max-width: 992px) {
    .about-grid, .contact-container {
        grid-template-columns: 1fr;
    }
    .hero-title { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-title { font-size: 2.8rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .form-row { flex-direction: column; }
    .nodes-grid { grid-template-columns: 1fr; }
}
