@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0a0a12;
    --accent-color: #d4af37;
    --accent-glow: #ffdc5a88;
    --text-color: #f8e7b5;
    --grid-color: rgba(212, 175, 55, 0.2);
    --symbol-color: rgba(255, 215, 0, 0.15);
    --blue-glow: rgba(255, 215, 0, 0.8);
    --glow-radius: 10px;
    --hologram-color: rgba(212, 175, 55, 0.4);
    --data-stream-color: rgba(255, 215, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--primary-color);
    color: var(--text-color);
    font-family: 'Rajdhani', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    perspective: 1000px;
}

.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-glow), var(--accent-color));
    transition: width 0.1s;
    box-shadow: 0 0 10px var(--accent-glow);
}

main {
    min-height: 100vh;
}

section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.hero {
    position: relative;
    text-align: center;
    padding-top: 30vh;
    overflow: hidden;
}

#hypercube-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.symbols-layer, .geometric-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    pointer-events: none;
    z-index: 2;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 0.5rem;
    color: var(--accent-color);
    text-shadow: 0 0 15px var(--accent-glow);
    position: relative;
    z-index: 10;
    opacity: 0;
    animation: fadeIn 1.5s ease-out forwards 0.5s;
    margin-bottom: 0.5rem;
}

.subtitle-h1 {
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.5rem;
    letter-spacing: 0.2rem;
    margin-top: 0.5rem;
    color: var(--accent-color);
    text-shadow: 0 0 5px var(--accent-glow);
    position: relative;
    z-index: 10;
    opacity: 0;
    animation: fadeIn 1.5s ease-out forwards 1s;
}

.trailer-section {
    background: linear-gradient(to bottom, var(--primary-color), rgba(10, 10, 18, 0.7));
    z-index: 20;
}

.video-container {
    width: 80%;
    max-width: 1200px;
    aspect-ratio: 16/9;
    position: relative;
    border-radius: 2px;
    overflow: visible;
    box-shadow: 0 0 30px rgba(174, 142, 53, 0.3), inset 0 0 15px rgba(255, 215, 0, 0.2);
    transition: box-shadow 0.3s ease;
}

.video-container:hover {
    box-shadow: 0 0 40px rgba(174, 142, 53, 0.5), inset 0 0 20px rgba(255, 215, 0, 0.3);
}

.video-frame {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--accent-color);
    z-index: 4;
}

.gallifreyan-frame {
    position: absolute;
    top: -40px;
    left: -40px;
    width: calc(100% + 80px);
    height: calc(100% + 80px);
    pointer-events: none;
    z-index: 5;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.coordinate-display {
    position: absolute;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    color: var(--accent-color);
    text-shadow: 0 0 5px var(--accent-glow);
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    background: rgba(10, 10, 18, 0.7);
    padding: 2px 4px;
    border-radius: 3px;
    border: 1px solid var(--accent-color);
    text-shadow: 0 0 8px var(--accent-glow);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.coordinate-display:hover {
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
}

.coordinate-top-left {
    top: -20px;
    left: 5px;
}

.coordinate-top-right {
    top: -20px;
    right: 5px;
}

.coordinate-bottom-left {
    bottom: -20px;
    left: 5px;
}

.coordinate-bottom-right {
    bottom: -20px;
    right: 5px;
}

.placeholder-video {
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 18, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.placeholder-video:hover {
    background-color: rgba(10, 10, 18, 0.7);
}

.play-button {
    color: var(--accent-color);
    opacity: 0.9;
    transition: all 0.3s ease;
}

.placeholder-video:hover .play-button {
    transform: scale(1.1);
    color: var(--text-color);
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

.placeholder-video p {
    margin-top: 1rem;
    font-size: 1.2rem;
    letter-spacing: 0.1rem;
}

.matrix-section {
    background: linear-gradient(to top, var(--primary-color), rgba(10, 10, 18, 0.7));
    position: relative;
}

#matrix-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: grab;
}

#matrix-container:active {
    cursor: grabbing;
}

.content {
    max-width: 800px;
    text-align: center;
    position: relative;
    z-index: 10;
    padding: 2rem;
}

h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

footer {
    background-color: rgba(10, 10, 18, 0.9);
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 20;
}

.gallifreyan-symbol {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
}

.hover-glow {
    color: #fff;
    text-shadow: 0 0 5px var(--blue-glow), 
                 0 0 10px var(--blue-glow), 
                 0 0 15px var(--blue-glow);
    transform: scale(1.02);
}

.pulse-symbol {
    animation: pulse-animation 0.8s ease-out;
}

.glitch-effect {
    animation: glitch 0.3s step-end infinite;
}

.electric-pathways {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.electric-wire {
    opacity: 0.8;
}

@keyframes pulse-wire {
    0%, 100% { 
        stroke-opacity: 0.7;
        stroke-width: 2px;
    }
    50% { 
        stroke-opacity: 1;
        stroke-width: 3px;
    }
}

@keyframes pulse-animation {
    0% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.2);
    }
    100% { 
        opacity: 1; 
        transform: scale(1);
    }
}

@keyframes glitch {
    0% {
        filter: hue-rotate(0deg) brightness(1);
        transform: translate(0);
    }
    20% {
        filter: hue-rotate(45deg) brightness(1.2);
        transform: translate(-2px, 2px);
    }
    40% {
        filter: hue-rotate(-45deg) brightness(0.9);
        transform: translate(2px, -2px);
    }
    60% {
        filter: hue-rotate(90deg) brightness(1.1);
        transform: translate(1px, 1px);
    }
    80% {
        filter: hue-rotate(0deg) brightness(1);
        transform: translate(0);
    }
    100% {
        filter: hue-rotate(-90deg) brightness(0.8);
        transform: translate(-1px, -1px);
    }
}

@keyframes spin-ring {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes dimensional-pulse {
    0% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0.6; transform: scale(1); }
}

@keyframes quantum-electron {
    0% { transform: rotate(0deg) translateX(1.5px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(1.5px) rotate(-360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.central-mechanism {
    transform-origin: center;
    transition: transform 0.5s ease;
}

.central-ring {
    transform-origin: center;
    transition: r 0.3s ease, stroke-dasharray 0.3s ease;
}

.orbital-dot {
    transition: cx 0.3s ease, cy 0.3s ease;
}

.central-spiral {
    transform-origin: center;
    transition: d 0.5s ease, transform 0.5s ease;
}

.resonance-circle, .resonance-aura {
    transform-origin: center;
    transition: r 0.3s ease, stroke-width 0.3s ease, stroke-opacity 0.3s ease;
}

.res-pattern {
    transform-origin: center;
    transition: transform 0.3s ease;
}

.quantum-node {
    transition: r 0.2s ease;
    animation: dimensional-pulse 4s infinite;
    animation-delay: calc(var(--index, 0) * 0.5s);
}

.quantum-electron {
    animation: quantum-electron 4s linear infinite;
}

.entanglement-line {
    transition: stroke-dashoffset 0.3s ease, opacity 0.3s ease, stroke-width 0.3s ease;
}

.time-pulse {
    transition: cx 0.3s ease, opacity 0.3s ease;
}

.time-marker, .time-circle {
    transform-origin: center;
    transition: transform 0.3s ease;
}

.dimension-portal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vh;
    max-width: 800px;
    max-height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(10, 10, 18, 0) 30%, var(--hologram-color) 70%, rgba(10, 10, 18, 0) 100%);
    z-index: 5;
    box-shadow: 0 0 50px var(--accent-glow);
    opacity: 0.7;
    pointer-events: none;
    animation: portal-pulse 8s infinite alternate;
}

.data-stream {
    position: absolute;
    overflow: hidden;
    z-index: 3;
    pointer-events: none;
}

.data-stream-horizontal {
    height: 1px;
    width: 100%;
    left: 0;
}

.data-stream-vertical {
    width: 1px;
    height: 100%;
    top: 0;
}

.data-stream-content {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--data-stream-color), transparent);
    height: 100%;
    width: 100%;
    animation: data-flow 3s infinite linear;
}

.vertical-data-content {
    background: linear-gradient(180deg, transparent, var(--data-stream-color), transparent);
    animation: vertical-data-flow 3s infinite linear;
}

.holographic-panel {
    position: absolute;
    background-color: rgba(10, 10, 18, 0.4);
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    padding: 10px;
    color: var(--accent-color);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    box-shadow: 0 0 10px var(--accent-glow);
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
    max-width: 200px;
}

.holographic-panel.active {
    opacity: 1;
    transform: translateY(0);
}

.dimensional-badge {
    position: absolute;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dimensional-badge:hover {
    transform: scale(1.2);
}

.badge-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s ease;
    animation: badge-rotate 10s infinite linear;
}

.badge-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-color);
    background-color: rgba(10, 10, 18, 0.6);
    box-shadow: 0 0 10px var(--accent-glow);
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-color);
    font-size: 0.7rem;
    text-align: center;
}

.badge-face:nth-child(1) { transform: translateZ(20px); }
.badge-face:nth-child(2) { transform: rotateY(90deg) translateZ(20px); }
.badge-face:nth-child(3) { transform: rotateY(180deg) translateZ(20px); }
.badge-face:nth-child(4) { transform: rotateY(-90deg) translateZ(20px); }
.badge-face:nth-child(5) { transform: rotateX(90deg) translateZ(20px); }
.badge-face:nth-child(6) { transform: rotateX(-90deg) translateZ(20px); }

.time-distortion {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
    background: radial-gradient(
        circle at center,
        transparent 30%,
        rgba(212, 175, 55, 0.05) 50%,
        transparent 70%
    );
    animation: time-distort 8s infinite alternate;
}

.active-distortion {
    opacity: 0.8;
}

.floating-equations {
    position: absolute;
    font-family: 'Rajdhani', sans-serif;
    color: var(--accent-color);
    opacity: 0.6;
    font-size: 1rem;
    pointer-events: none;
    text-shadow: 0 0 5px var(--accent-glow);
    white-space: nowrap;
    z-index: 4;
    animation: float-equation 15s infinite linear;
}

.dimensional-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    gap: 10px;
    transform: translateZ(0);
}

.dimension-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(10, 10, 18, 0.8);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-glow);
    transition: all 0.3s ease;
}

.dimension-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--accent-glow);
}

.quantum-separator {
    position: relative;
    height: 2px;
    width: 80%;
    margin: 20px auto;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    overflow: visible;
}

.quantum-node {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 8px var(--accent-glow);
    animation: quantum-pulse 3s infinite alternate;
}

.data-block {
    font-family: 'Rajdhani', monospace;
    font-size: 0.7rem;
    color: var(--accent-color);
    text-align: left;
    line-height: 1.2;
    margin: 5px 0;
    opacity: 0.8;
}

.corner-circle, .inner-circle {
    filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.5));
    transition: filter 0.3s ease, r 0.3s ease;
}

.frame-symbol {
    filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.4));
    transition: transform 0.5s ease, filter 0.3s ease;
}

.corner-dot {
    filter: drop-shadow(0 0 1px rgba(255, 215, 0, 0.8));
}

.resonance-aura {
    filter: blur(2px) drop-shadow(0 0 5px rgba(255, 215, 0, 0.3));
}

.connector-line {
    filter: drop-shadow(0 0 1px rgba(255, 215, 0, 0.3));
}

@keyframes portal-pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
}

@keyframes data-flow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes vertical-data-flow {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

@keyframes badge-rotate {
    0% { transform: rotateX(0) rotateY(0); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

@keyframes time-distort {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes float-equation {
    0% { transform: translateX(100%) translateY(0); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateX(-200%) translateY(20px); opacity: 0; }
}

@keyframes quantum-pulse {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.5); }
    100% { transform: translateY(-50%) scale(1); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .video-container {
        width: 95%;
    }
    
    h2 {
        font-size: 2rem;
    }
}