:root {
    --deep-blue: #0A1128;
    --gold: #D4AF37;
    --cream: #F4F1DE;
    --earth: #4B3621;
    --cyber-purple: #1a0b2e;
    --neon-cyan: #00f2ff;
    --neon-pink: #bc13fe;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--deep-blue);
    cursor: crosshair;
}

.font-serif {
    font-family: 'Playfair Display', serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    height: 4px;
    width: 4px;
}
::-webkit-scrollbar-track {
    background: var(--deep-blue);
}
::-webkit-scrollbar-thumb {
    background: var(--gold);
}

/* Panel Layout */
.panel {
    will-change: transform;
}

/* Clan Hover Effects */
.clan-card {
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(212, 175, 55, 0.1);
    background: rgba(10, 17, 40, 0.6);
    backdrop-filter: blur(10px);
}

.clan-card:hover {
    border-color: var(--gold);
    transform: translateY(-10px);
    background: rgba(10, 17, 40, 0.8);
}

/* Parallax Backgrounds */
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 120%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
    opacity: 0.4;
}

/* Timeline Styles */
#timeline-section {
    position: relative;
    overflow: hidden;
    background-color: #1a1a1a;
    transition: background-color 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.era-container {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(50px);
}

.era-bridge-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

.bridge-arrow {
    width: 1px;
    height: 100px;
    background: currentColor;
    margin-top: 1rem;
    position: relative;
}

.bridge-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -2px;
    border-left: 2px solid transparent;
    border-right: 2px solid transparent;
    border-top: 4px solid currentColor;
}

/* Observatory Specific Styles */
.observatory-section {
    background: radial-gradient(circle at center, #240b36 0%, #1a0b2e 100%);
    position: relative;
    overflow: hidden;
}

#observatory-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.6;
}

.cyber-card {
    position: relative;
    background: rgba(26, 11, 46, 0.4);
    border: 1px solid rgba(0, 242, 255, 0.1);
    transition: all 0.4s ease;
    overflow: hidden;
}

.cyber-card::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 15px rgba(188, 19, 254, 0);
    transition: box-shadow 0.4s ease;
}

.cyber-card:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
    transform: scale(1.02);
}

.cyber-card:hover::after {
    box-shadow: inset 0 0 15px rgba(188, 19, 254, 0.3);
}

/* Glitch Effect */
.glitch-hover:hover h4 {
    animation: glitch-text 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

@keyframes glitch-text {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); color: var(--neon-cyan); }
    40% { transform: translate(-2px, -2px); color: var(--neon-pink); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.neon-text {
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.8);
}

/* Academy List Styling */
.academy-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Typography Enhancements */
.text-gold {
    color: var(--gold);
}

.bg-gold {
    background-color: var(--gold);
}

/* Dialog Reset */
dialog::backdrop {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

/* Horizontal Scroll Adjustments */
#main-scroll {
    overflow-x: hidden;
    width: fit-content;
    display: flex;
}

/* Pioneer Section */
.pioneer-section {
    background: linear-gradient(135deg, #1a0b2e 0%, #0A1128 50%, #4B3621 100%);
}

.pioneer-section h1 {
    text-shadow: 0 0 80px rgba(212, 175, 55, 0.3);
}

/* Mobile Support */
@media (max-width: 768px) {
    #main-scroll {
        flex-direction: column;
        width: 100vw;
        height: auto;
    }
    .panel {
        width: 100vw !important;
        height: 100vh;
    }
    .era-container {
        height: auto;
        padding: 4rem 1rem;
    }
}
