:root {
    --bg-dark: #0a0e14;
    --leaf-glow: #00f3ff;
    --circuit-gold: #ffcc33;
    --text-primary: #e0e6ed;
    --text-accent: #00f3ff;
    --golden-base: #ffcc33;
    --golden-glow: rgba(255, 204, 51, 0.6);
    --glass-bg: rgba(20, 30, 45, 0.4);
    --glass-border: rgba(0, 243, 255, 0.2);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    overflow: hidden;
    height: 100vh;
}

/* Background Atmosphere */
.background-circuitry {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('bg.png') no-repeat center center fixed;
    background-size: cover;
    z-index: -1;
    filter: brightness(0.6);
}

/* Tree Container */
.tree-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#techno-tree {
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.9;
}

/* Circuit Roots Animation */
.circuit-paths path {
    stroke: var(--circuit-gold);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: trace-circuit 5s cubic-bezier(0.4, 0, 0.2, 1) forwards infinite alternate;
    opacity: 0.6;
}

@keyframes trace-circuit {
    0% { stroke-dashoffset: 1000; opacity: 0.2; }
    50% { opacity: 0.6; }
    100% { stroke-dashoffset: 0; opacity: 1; }
}

/* Branch Animations */
#branches path {
    stroke: #2a2e35;
    stroke-width: 10;
    stroke-linecap: round;
    transition: all 0.5s ease;
}

/* Fruit Styles */
.fruit {
    position: absolute;
    width: 120px;
    height: 120px;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.1);
    z-index: 10;
}

.fruit:hover {
    transform: scale(1.1) translateY(-10px);
    box-shadow: 0 0 30px var(--leaf-glow);
    border-color: var(--leaf-glow);
}

.fruit .fruit-content {
    font-size: 0.7rem;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.8);
    padding: 2px 6px;
    border: 1px solid var(--leaf-glow);
    text-shadow: 0 0 5px var(--leaf-glow);
    border-radius: 4px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.fruit:hover .fruit-content {
    transform: uppercase;
}

/* Golden Fruit Variants */
.fruit.golden .fruit-content {
    border-color: var(--golden-base);
    color: var(--golden-base);
    text-shadow: 0 0 8px var(--golden-base);
    box-shadow: 0 0 15px rgba(255, 204, 51, 0.2);
}

.fruit.golden:hover .fruit-content {
    box-shadow: 0 0 25px var(--golden-base);
    background: rgba(255, 204, 51, 0.1);
}

.fruit.golden::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: var(--golden-base);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px var(--golden-base);
    animation: goldenPulse 2s infinite ease-in-out;
}

@keyframes goldenPulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.2; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
}

/* Fruit Pulse Animation */
.fruit::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--leaf-glow);
    animation: pulse-ring 2s infinite;
    opacity: 0;
}

@keyframes pulse-ring {
    0% { transform: scale(0.9); opacity: 0; }
    50% { opacity: 0.5; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* HUD Display Zone (Tactical Look) */
.hud-zone {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-top: 4px solid var(--text-accent);
    padding: 20px;
    z-index: 50;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#hud-header {
    font-size: 0.7rem;
    color: var(--text-accent);
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(0, 243, 255, 0.1);
    padding-bottom: 5px;
    opacity: 0.8;
}

#hud-title {
    font-size: 1.4rem;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

#hud-description {
    font-size: 0.9rem;
    color: #a0b1c0;
    line-height: 1.4;
    min-height: 40px;
}

#hud-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 5px;
}

#hud-link {
    background: transparent;
    border: 1px solid var(--leaf-glow);
    color: var(--leaf-glow);
    padding: 6px 15px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

#hud-link:hover {
    background: var(--leaf-glow);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--leaf-glow);
}

#hud-link.hidden {
    display: none;
}

/* Footer & Status */
footer {
    position: fixed;
    bottom: 20px;
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    color: #5a6e7d;
}

.status-indicator {
    color: var(--leaf-glow);
    font-weight: bold;
    text-transform: uppercase;
    animation: flicker 1s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
