/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--deep-forest);
    color: var(--fog);
    font-family: var(--font-heading);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    animation: loadIn 0.6s ease-out;
    cursor: url('assets/cursors/skull.cur'), auto;
}

/* Dark Forest Horror Theme */
:root {
    --deep-forest: #0A0A0A;
    --fog: rgba(255, 255, 255, 0.03);
    --text: rgba(255, 255, 255, 0.7);
    --text-dim: rgba(255, 255, 255, 0.4);
    --shadow: rgba(0, 0, 0, 0.95);
    --blur-bg: rgba(0, 0, 0, 0.4);
    --font-title: 'Cinzel', serif;
    --font-heading: 'Philosopher', sans-serif;
    --font-accent: 'Julius Sans One', sans-serif;
}

/* Forest Background */
.forest-background {
    position: fixed;
    top: -10%;
    left: -10%;
    right: -10%;
    bottom: -10%;
    overflow: hidden;
    z-index: -2;
    animation: kenBurns 30s ease-in-out infinite alternate;
    background: 
        linear-gradient(to bottom,
            rgba(0, 0, 0, 0.95) 0%,
            rgba(0, 0, 0, 0.7) 50%,
            rgba(0, 0, 0, 0.95) 100%
        ),
        url('https://images.unsplash.com/photo-1513836279014-a89f7a76ae86?auto=format&fit=crop&w=2000&q=80');
    background-size: cover;
    background-position: center;
    filter: grayscale(100%) contrast(100%) brightness(1);
}

/* Fog Effect */
.forest-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            var(--mist) 0%,
            transparent 50%,
            var(--mist) 100%
        );
    animation: fogMove 60s linear infinite;
    opacity: 0.7;
}

/* Fire Glow Effect */
.fire-glow {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25vh;
    background: 
        radial-gradient(
            ellipse 200% 50% at bottom,
            rgba(255, 30, 0, 0.25) 0%,
            rgba(255, 40, 0, 0.15) 30%,
            rgba(255, 50, 0, 0.05) 60%,
            transparent 100%
        );
    pointer-events: none;
    z-index: -1;
    mix-blend-mode: screen;
}

@keyframes fogMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100%); }
}

/* Remove Metal Texture Overlay */
body::before {
    display: none;
}

/* Clean Widget Styling */
.widget {
    background: rgba(0, 0, 0, 0.4);
    padding: 1.5rem 2rem;
    backdrop-filter: blur(15px);
    min-width: 280px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.widget-label {
    font-family: var(--font-accent);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.7rem;
    color: var(--text);
    margin-bottom: 0.5rem;
    opacity: 0.9;
    width: 100%;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Clock Widget */
.clock-widget {
    margin: 0 auto;
}

.clock-widget .time {
    font-family: var(--font-title);
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.15em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.clock-widget .date {
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.clock-widget .date.cursed {
    font-style: italic;
    color: var(--text-dim);
    font-size: 1rem;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    content: "The Hour Draws Near...";
}

/* Weather Widget */
.weather-widget {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.weather-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.weather-widget .widget-label {
    text-align: right;
}

.temperature {
    font-family: var(--font-title);
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.15em;
    text-align: right;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.description {
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    letter-spacing: 1px;
    text-align: right;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Error state */
.error {
    color: var(--text);
    font-style: italic;
}

.error-details {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Section Styling */
.angled-section {
    background: var(--blur-bg);
    backdrop-filter: blur(8px);
    margin: 4rem 0;
    padding: 3rem 2rem;
}

/* Remove section gradient */
.angled-section::after {
    display: none;
}

/* Typography */
h2 {
    font-family: var(--font-accent);
    font-weight: 400;
    letter-spacing: 0.5em;
    font-size: 1.8rem;
    opacity: 0.9;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text);
    text-transform: uppercase;
}

/* Remove heading underline */
h2::after {
    display: none;
}

/* Audio Player */
.audio-player {
    background: var(--blur-bg);
    padding: 2.5rem;
    margin: 1rem auto;
    max-width: 600px;
    backdrop-filter: blur(10px);
}

audio {
    width: 100%;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.track-info {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-dim);
}

.track-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.track-album {
    font-family: var(--font-accent);
    letter-spacing: 0.15em;
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Logo */
.main-logo {
    filter: brightness(1) saturate(0);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    transform-origin: center;
    position: relative;
}

.logo-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 500px;
}

/* Footer */
footer {
    padding: 2.5rem 1rem;
    background: var(--blur-bg);
    backdrop-filter: blur(10px);
    color: var(--text-dim);
    text-align: center;
}

/* Spotify Section */
.spotify-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    margin: 2rem auto;
    width: 100%;
    max-width: 1200px;
}

.spotify-link {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--blur-bg);
    backdrop-filter: blur(10px);
    border-radius: 4px;
    vertical-align: middle;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.spotify-link:hover {
    opacity: 1;
}

.spotify-logo {
    height: 30px;
    width: auto;
}

/* Preloader */
.loading-skull {
    width: 48px;
    height: 48px;
    animation: skullPulse 4s ease-in-out infinite;
}

.skull-icon {
    width: 100%;
    height: 100%;
    filter: 
        drop-shadow(0 0 15px rgba(255, 0, 0, 0.8))
        drop-shadow(0 0 30px rgba(255, 0, 0, 0.5))
        drop-shadow(0 0 3px rgba(0, 0, 0, 1));
}

@keyframes skullPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

/* Enhanced Logo Container */
.logo-container {
    max-width: 800px;
    margin: 2rem auto 4rem;
    text-align: center;
}

/* Enhanced Lens Flare */
.lens-flare {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 200vmax;
    height: 200vmax;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(
        circle at center,
        rgba(255, 217, 0, 0.15) 0%,
        rgba(255, 217, 0, 0.1) 25%,
        rgba(255, 217, 0, 0.05) 50%,
        transparent 70%
    );
    opacity: 0;
    animation: lens-flare 15s ease-in-out infinite;
}

@keyframes lens-flare {
    0%, 100% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        opacity: 0.5; 
        transform: translate(-45%, -45%) scale(1.2);
    }
}

/* Header and Widgets */
header {
    padding: 3rem 1rem;
    background: linear-gradient(180deg, var(--shadow) 0%, transparent 100%);
    position: relative;
    z-index: 1;
}

.header-widgets {
    display: flex;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

/* Main Content */
main {
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Video Section */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 2rem 0;
    animation: slideInFromRight 1s ease-out 0.6s backwards;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-widgets {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        margin-bottom: 2rem;
        width: 100%;
        padding: 0;
    }

    .widget {
        width: 100%;
        max-width: 280px;
    }

    .widget,
    .weather-widget,
    .weather-info {
        align-items: center;
    }

    .widget-label,
    .time,
    .date,
    .temperature,
    .description,
    .weather-widget .widget-label {
        text-align: center;
    }

    h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    main {
        padding: 1rem;
    }

    .audio-player {
        padding: 1.5rem;
    }

    .angled-section {
        margin: 3rem 0;
        padding: 2rem 1rem;
    }
    
    .angled-section .content {
        transform: skewY(1deg);
    }

    .logo-wrapper:hover {
        transform: translateZ(25px) rotateX(5deg);
    }

    .logo-container {
        margin: 2rem auto 3rem;
    }

    .spotify-section {
        padding: 1.5rem 1rem;
        margin: 1.5rem auto;
    }

    .spotify-link {
        padding: 0.75rem 1.5rem;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 1.5rem;
    }

    .main-logo {
        max-width: 95%;
    }

    .angled-section {
        margin: 2rem 0;
        padding: 1.5rem 0.75rem;
    }

    .audio-player {
        padding: 1.5rem;
    }
}

/* Add hardware acceleration for animations */
.stars,
.twinkling,
.lens-flare,
.logo-wrapper,
.logo-glow,
.main-logo {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Page Assembly Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Smooth content transitions */
.content {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Add loading state */
@keyframes loadIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Optimize animations */
.stars,
.twinkling,
.lens-flare,
.logo-wrapper,
.angled-section,
.content {
    will-change: transform, opacity;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--deep-forest);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeOut 1s ease-out 1.5s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Cursed Text Effect */
.cursed {
    position: relative;
}

/* Weather description system */
.weather-info[data-temp-range="freezing"] .description::before {
    content: "";
}

.weather-info[data-temp-range="freezing"] .description::after {
    content: "Quantum Freeze";
    display: block;
    font-size: 0.8rem;
    margin-top: 0.3rem;
    opacity: 0.85;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.weather-info[data-temp-range="cold"] .description::before {
    content: "";
}

.weather-info[data-temp-range="cold"] .description::after {
    content: "Cosmic Frost";
    display: block;
    font-size: 0.8rem;
    margin-top: 0.3rem;
    opacity: 0.85;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.weather-info[data-temp-range="mild"] .description::before {
    content: "";
}

.weather-info[data-temp-range="mild"] .description::after {
    content: "Void Resonance";
    display: block;
    font-size: 0.8rem;
    margin-top: 0.3rem;
    opacity: 0.85;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.weather-info[data-temp-range="warm"] .description::before {
    content: "";
}

.weather-info[data-temp-range="warm"] .description::after {
    content: "Star Forge";
    display: block;
    font-size: 0.8rem;
    margin-top: 0.3rem;
    opacity: 0.85;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.weather-info[data-temp-range="hot"] .description::before {
    content: "";
}

.weather-info[data-temp-range="hot"] .description::after {
    content: "Singularity";
    display: block;
    font-size: 0.8rem;
    margin-top: 0.3rem;
    opacity: 0.85;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Clock Messages */
.date.cursed::after {
    display: block;
    font-size: 0.8rem;
    margin-top: 0.3rem;
    opacity: 0.85;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.date[data-time-range="final"]::after {
    content: "The Veil Thins";
}

.date[data-time-range="near"]::after {
    content: "Time Bleeds";
}

.date[data-time-range="approaching"]::after {
    content: "Reality Bends";
}

.date[data-time-range="descent"]::after {
    content: "Darkness Calls";
}

.date[data-time-range="fading"]::after {
    content: "Shadows Dance";
}

.date[data-time-range="dusk"]::after {
    content: "Night Stirs";
}

.date[data-time-range="dissolving"]::after {
    content: "The Cycle Begins";
}

/* Ember Effect */
.embers {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.ember {
    position: fixed;
    width: 1px;
    height: 1px;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 
        0 0 1px 0px rgba(255, 255, 255, 0.9),
        0 0 2px 1px rgba(255, 30, 0, 0.8),
        0 0 4px 2px rgba(255, 0, 0, 0.4),
        0 0 6px 3px rgba(255, 0, 0, 0.2);
    animation: emberRise var(--duration) cubic-bezier(0.45, 0, 0.55, 1) infinite;
    bottom: -10px;
    opacity: 0;
    filter: blur(0.3px);
}

.ember:nth-child(1) { --delay: 0.7s; --duration: 12s; left: 13%; }
.ember:nth-child(2) { --delay: 2.3s; --duration: 15s; left: 27%; }
.ember:nth-child(3) { --delay: 4.1s; --duration: 13s; left: 42%; }
.ember:nth-child(4) { --delay: 1.2s; --duration: 16s; left: 58%; }
.ember:nth-child(5) { --delay: 3.8s; --duration: 14s; left: 72%; }
.ember:nth-child(6) { --delay: 5.5s; --duration: 11s; left: 88%; }
.ember:nth-child(7) { --delay: 0.3s; --duration: 17s; left: 33%; }
.ember:nth-child(8) { --delay: 4.7s; --duration: 13s; left: 66%; }

@keyframes emberRise {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0);
    }
    10% {
        opacity: 1;
        transform: translateY(-10vh) translateX(5px);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-40vh) translateX(20px) rotate(45deg);
    }
    75% {
        opacity: 0.4;
        transform: translateY(-60vh) translateX(30px) rotate(90deg);
    }
    90% {
        opacity: 0.2;
        transform: translateY(-75vh) translateX(35px) rotate(120deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-80vh) translateX(40px) rotate(135deg);
    }
}

@keyframes kenBurns {
    0% {
        transform: scale(1) translate(0, 0);
    }
    100% {
        transform: scale(1.1) translate(-2%, -1%);
    }
}

a, button, .clickable {
    cursor: url('assets/cursors/skull.cur'), pointer;
}

/* Playlist Section */
.playlist-section {
    background: var(--blur-bg);
    backdrop-filter: blur(10px);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 800px;
}

.playlist-section .audio-player {
    margin: 0.75rem auto;
    padding: 1.5rem;
}

.playlist-section h2 {
    margin-bottom: 2rem;
}

/* Playlist Link */
.playlist-link {
    text-align: center;
    margin: 2rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gothic-link {
    display: inline-block;
    font-family: var(--font-accent);
    font-size: 1.2rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    padding: 1rem 2rem;
    background: var(--blur-bg);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 0, 0, 0.2);
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
    text-align: center;
}

.gothic-link:hover {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 
        0 0 10px rgba(255, 0, 0, 0.8),
        0 0 20px rgba(255, 0, 0, 0.5),
        0 0 30px rgba(255, 0, 0, 0.3);
    border-color: rgba(255, 0, 0, 0.4);
    transform: translateY(-2px);
    box-shadow: 
        0 0 15px rgba(255, 0, 0, 0.2),
        0 0 30px rgba(255, 0, 0, 0.1);
} 