/* ===========================
   GLOBAL RESETS & DEFAULTS
=========================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
}

body {
    font-family: Verdana, sans-serif;
    color: #fff;
    background-color: #000;
    line-height: 1.6;
}

/* ===========================
   SAFE OVERLAY
=========================== */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: transparent;
    pointer-events: none;
    animation: bgFadeIn 1.5s ease forwards;
}

/* ===========================
   BACKGROUND SECTIONS
=========================== */
.home-bg, .world-bg, .about-bg, .music-bg, .gallery-bg, .contact-bg,
.mythology-bg, .merch-bg, .history-bg {
    min-height: 100vh;
    width: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    animation: bgFadeIn 1.5s ease forwards;
}

.home-bg      { background-image: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('https://i.imgur.com/DvE7RQV.png'); }
.world-bg     { background-image: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('https://i.imgur.com/kiIqDp2.png'); }
.about-bg     { background-image: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('https://i.imgur.com/awySCK4.png'); }
.music-bg     { background-image: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('https://i.imgur.com/1fpCXEN.png'); }
.gallery-bg   { background-image: url('https://i.imgur.com/eVcCh9U.png'); }
.contact-bg   { background-image: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('https://i.imgur.com/hM5H2cJ.png'); }
.merch-bg     { background-image: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('https://i.imgur.com/dxT8OGs.png'); }
.mythology-bg { background-image: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('https://i.imgur.com/M6FKg5S.png'); }
.history-bg   { background-image: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('https://i.imgur.com/7NFnyMU.png'); }

/* ===========================
   CONTENT STACKING
=========================== */
.section,
.hero-world,
.hero-text,
.about-wrapper,
.about-section,
.gallery-section,
.mythology-section,
.history-section,
.merch-section,
.music-section,
.contact-section {
    position: relative;
    z-index: 2;
}

.gallery-section {
    z-index: 3;
    background: transparent;
}

/* ===========================
   NAVIGATION
=========================== */
.world-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    z-index: 1000;
    background: rgba(0,0,0,0.65);
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.world-nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    transition: 0.25s ease;
    white-space: nowrap;
}

.world-nav a:hover,
.world-nav a.active {
    background: rgba(255,255,255,0.9);
    color: #000;
}

/* ===========================
   HERO / SECTION BOXES
=========================== */
.hero-world,
.hero-text,
.ancestor-intro,
.about-wrapper,
.family-section,
.outro-text,
.section {
    max-width: 1100px;
    margin: 90px auto 40px;
    padding: 2rem 1.5rem;
    background: rgba(0,0,0,0.55);
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

.hero-world {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 70vh;
}

/* ===========================
   FADE-IN ANIMATION
=========================== */
.fade-in { 
    opacity: 0; 
    transform: translateY(20px); 
    transition: all 0.9s ease-out; 
}
.fade-in.show { 
    opacity: 1; 
    transform: translateY(0); 
}

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

@keyframes bgFadeIn {
    to { opacity: 1; }
}

/* ===========================
   ANCESTOR CARDS
=========================== */
.ancestor-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(0,0,0,0.65);
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.ancestor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}

.ancestor-image img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
    border: 3px solid #fff;
}

.ancestor-text h2 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: #ffe680;
}

/* ===========================
   GALLERY GRID
=========================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
}

.gallery-grid img {
    width: 100%;
    object-fit: cover;
    border-radius: 14px;
    cursor: pointer;
    z-index: 3;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.gallery-grid img:hover {
    transform: scale(1.12) translateY(-8px);
    box-shadow: 0 18px 35px rgba(0,0,0,0.6);
}

/* ===========================
   LIGHTBOX
=========================== */
#lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.4s ease;
}
#lightbox-overlay.show {
    display: flex;
    opacity: 1;
}
#lightbox-overlay img {
    max-width: 96%;
    max-height: 92%;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

/* ===========================
   MUSIC IFRAME / MEDIA
=========================== */
.music-container {
    width: 90%;
    max-width: 900px;
    margin: 1.75rem auto;
}

.music-container iframe {
    width: 100%;
    height: 400px;
    display: block;
    border: none;
    border-radius: 12px;
}

.track-title {
    color: #c1eaff;
    margin-top: 0.5rem;
    font-weight: 600;
}

/* ===========================
   AUDIO INDICATOR BUTTON
=========================== */
#audioIndicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    font-size: 22px;
    z-index: 1000;
    background: rgba(255,255,255,0.8);
    color: #000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: background 0.3s, color 0.3s;
}
#audioIndicator.playing {
    background: rgba(0,200,0,0.8);
    color: #fff;
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 8px rgba(0,200,0,0.6); }
    50% { transform: scale(1.1); box-shadow: 0 0 20px rgba(0,200,0,0.9); }
    100% { transform: scale(1); box-shadow: 0 0 8px rgba(0,200,0,0.6); }
}

/* ===========================
   BUTTONS
=========================== */
.btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 10px 26px;
    border: 2px solid #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 28px;
    text-transform: uppercase;
    transition: all 0.25s ease;
}
.btn:hover {
    background: rgba(255,255,255,0.9);
    color: #000;
    transform: translateY(-3px);
}

/* ===========================
   RESPONSIVE / MOBILE
=========================== */
@media (max-width: 980px) {
    .hero-world { min-height: 55vh; margin-top: 70px; }
    .gallery-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
    .music-container iframe { height: 260px; }
    .ancestor-card { flex-direction: column; text-align: center; }
}

@media (max-width: 520px) {
    .hero-world { min-height: 48vh; }
    .section { margin: 90px 12px; padding: 1rem; }
    .gallery-grid { gap: 12px; }
}
