/* ================================
   SUNER — Wear the Universe
   Adventure Shop Styles
   ================================ */

html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #030712;
}
::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 158, 11, 0.5);
}

::selection {
    background: rgba(245, 158, 11, 0.3);
    color: #fff;
}

/* ================================
   Preloader
   ================================ */
#preloader.loaded {
    opacity: 0;
    pointer-events: none;
}

/* ================================
   Floating Orbs (Hero BG)
   ================================ */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: orbFloat 25s infinite ease-in-out;
}
.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245,158,11,0.4), rgba(234,88,12,0.2));
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}
.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(234,88,12,0.3), rgba(220,38,38,0.15));
    top: 30%;
    right: -10%;
    animation-delay: -8s;
}
.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(251,191,36,0.3), rgba(245,158,11,0.1));
    bottom: 5%;
    left: 25%;
    animation-delay: -16s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -60px) scale(1.1); }
    50% { transform: translate(-30px, 30px) scale(0.9); }
    75% { transform: translate(50px, 40px) scale(1.05); }
}

/* ================================
   Particles
   ================================ */
.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(245, 158, 11, 0.6);
    border-radius: 50%;
    animation: particleDrift linear infinite;
}

@keyframes particleDrift {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* ================================
   Animations
   ================================ */
.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.animate-fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-up-delay {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

.animate-fade-in-up-delay-2 {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.5s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-spin-slow {
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-bounce-slow {
    animation: bounceSlow 3s ease-in-out infinite;
}

@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ================================
   Scroll Reveal Animations
   ================================ */
.chapter-header {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.chapter-header.visible {
    opacity: 1;
    transform: translateY(0);
}

.origin-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.origin-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.artifact-card {
    opacity: 0;
    transform: translateY(50px) scale(0.97);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out, border-color 0.5s;
}
.artifact-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.journey-step {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.journey-step.visible {
    opacity: 1;
    transform: translateX(0);
}

.journey-step:nth-child(even) {
    transform: translateX(30px);
}
.journey-step:nth-child(even).visible {
    transform: translateX(0);
}

/* ================================
   Navbar
   ================================ */
#navbar {
    background: transparent;
}
#navbar.scrolled {
    background: rgba(3, 7, 18, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(245, 158, 11, 0.05);
}

/* ================================
   Nav Link Hover
   ================================ */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #f59e0b, #ea580c);
    border-radius: 1px;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* ================================
   Mobile Menu
   ================================ */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}
.mobile-menu.open {
    max-height: 400px;
}

/* ================================
   Back to Top
   ================================ */
#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ================================
   Form Focus
   ================================ */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

/* ================================
   Hero Text Cycling Glow
   ================================ */
#hero-cycling-text {
    animation: textGlow 4s ease-in-out infinite alternate;
}

@keyframes textGlow {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
    100% { filter: brightness(1); }
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 768px) {
    .orb {
        opacity: 0.15;
    }
    .orb-1 { width: 250px; height: 250px; }
    .orb-2 { width: 200px; height: 200px; }
    .orb-3 { width: 150px; height: 150px; }
}

/* ================================
   Prefers Reduced Motion
   ================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

/* ================================
   Quest Progress Bar
   ================================ */
#quest-progress {
    backdrop-filter: blur(4px);
}
#quest-progress-fill {
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

/* ================================
   Realm Gateway Dividers
   ================================ */
.realm-gateway {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}
.realm-gateway.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================
   Quest Tracker (floating side)
   ================================ */
.quest-dot {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.quest-dot:hover {
    transform: scale(1.6);
}
.quest-dot-label {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    white-space: nowrap;
    background: rgba(3, 7, 18, 0.95);
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 10px;
    color: #fbbf24;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.quest-dot:hover .quest-dot-label {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}
.quest-dot.active div {
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

/* ================================
   Artifact Inspect Modal
   ================================ */
#artifact-modal.active {
    opacity: 1;
    pointer-events: auto;
}
#artifact-modal.active #artifact-modal-content {
    transform: scale(1);
}
#artifact-modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* ================================
   Quest Milestone Notification
   ================================ */
#quest-milestone.show {
    transform: translateX(0) !important;
}

/* ================================
   Artifact Card — Adventure Feel
   ================================ */
.artifact-card {
    cursor: pointer;
}
.artifact-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.05), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}
.artifact-card:hover::before {
    opacity: 1;
}