:root {
    --pink-primary: #ED1159;
    --black: #000000;
    --purple: #5E58C4;
    --pink-medium: #E87AC1;
    --pink-light: #F4BBF1;
    --mint: #BBF5ED;
    --teal: #86B5B2;
    --olive: #CED184;
    --cream: #F9DC9C;
    --gold: #F5B622;
    --off-white: #EFE7DE;
    --dark-bg: #1a1a1f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--dark-bg);
    background-image: url('assets/Celestial_DigiBG.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--off-white);
    font-family: 'automate', sans-serif;
    min-height: 100vh;
    padding: 30px 40px;
    position: relative;
}

/* Dark overlay for better text readability */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(26, 26, 31, 0.3) 0%, 
        rgba(26, 26, 31, 0.5) 50%, 
        rgba(26, 26, 31, 0.4) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Main Layout */
.main-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
}

/* Social Links */
.social-links {
    flex: 0 0 auto;
    min-width: 250px;
    display: flex;
    gap: 15px;
    margin-bottom: 0px;
    justify-content: center;
    align-items: center; /* Align icons to the start of the container */
}

.social-links a {
    color: var(--pink-primary);
    font-size: 28px;
    transition: all 0.3s ease;
    text-decoration: none;
}

@media (hover: hover) {
    .social-links a:hover {
        transform: scale(1.2);
        text-shadow: 0 0 20px rgba(237, 17, 89, 0.8);
    }
}

/* Header Section */
.header-section {
    display: flex;
    gap: 60px;
    align-items: center;
    margin-bottom: 20px;
}

/* Header Content */
.header-content {
    flex: 0 0 auto;
    text-align: center; /* Shift text alignment back to left */
    min-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center; /* Aligns all items (logo, text, links) to the left */
}

.header-text {
    font-family: 'automate', monospace;
    font-size: 20px;
    font-weight: 400;
    color: var(--pink-primary);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(237, 17, 89, 0.8);
    text-align: center;
    margin-left: 0px;
    width: 100%;
}

.logo {
    font-family: 'p22-spooky', serif;
    font-size: 140px;
    font-weight: 900;
    color: var(--pink-primary);
    letter-spacing: 6px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
    text-align: center;
    line-height: 0.8;
    margin-bottom: 20px;
    position: relative;
    margin-left: 0px;
    padding-left: 12px; /* ADDED: Offsets the 12px letter-spacing for perfect centering */
    margin-bottom: 20px;
}

/* Terminal cursor styles */
.cursor {
    display: inline-block;
    width: 12px;
    height: 20px;
    background-color: var(--pink-primary);
    margin-left: 4px;
    animation: blink 1s infinite;
    vertical-align: text-bottom;
    box-shadow: 0 0 10px rgba(237, 17, 89, 0.8);
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* Narrative Section */
.narrative-section {
    flex: 1;
    padding: 25px 20px;
    background: transparent;
    border: 2px solid var(--pink-primary);
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(237, 17, 89, 0.3);
    display: flex;
    align-items: center;
}

.narrative-text {
    font-family: 'automate', monospace;
    font-size: 20px;
    font-weight: 400;
    color: var(--pink-primary);
    line-height: 1.4;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 0 0 5px rgba(237, 17, 89, 0.5);
    text-align: left;
}

.narrative-text p {
    margin-bottom: 15px;
}

.narrative-text p:last-child {
    margin-bottom: 0;
    color: var(--pink-primary);
}

/* Cards Grid Section */
.cards-section {
    width: 100%;
    margin-top: 5px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(94, 88, 196, 0.2);
    isolation: isolate;
}

@media (hover: hover) {
    .card:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 20px 40px rgba(237, 17, 89, 0.4),
                    0 0 60px rgba(94, 88, 196, 0.2);
        border-color: rgba(237, 17, 89, 0.5);
    }
}

.card img {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
}

/* Base hover overlay for cards with data-hover-text */
.card[data-hover-text]::after {
    content: attr(data-hover-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(237, 17, 89, 0.95);
    color: #EFE7DE;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'automate', sans-serif;
    font-size: 26px;
    letter-spacing: 3px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 20;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    text-transform: uppercase;
}

@media (hover: hover) {
    .card[data-hover-text]:hover::after {
        opacity: 1;
    }
}

/* About DOI card overlay */
.card-link {
    text-decoration: none;
    display: block;
}

.card-link .card::after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(237, 17, 89, 0.95);
    color: #EFE7DE;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'automate', sans-serif;
    font-size: 26px;
    letter-spacing: 3px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 20;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    text-transform: uppercase;
}

.about-card-link .card::after {
    content: 'ABOUT DOI';
}

.fortune-card-link .card::after {
    content: 'Cookie of Fortune';
    text-align: center;
    font-size: 22px;
}

@media (hover: hover) {
    .card-link:hover .card::after {
        opacity: 1;
    }
}

.card-back {
    background-color: var(--black);
    background-image: 
        repeating-linear-gradient(
            60deg,
            transparent,
            transparent 8px,
            var(--purple) 8px,
            var(--purple) 10px
        ),
        repeating-linear-gradient(
            -60deg,
            transparent,
            transparent 8px,
            var(--purple) 8px,
            var(--purple) 10px
        );
}

.card-back img {
    opacity: 1;
}

/* Card Hover Content for Coming Soon with Notify */
.card-hover-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(237, 17, 89, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 20;
}

.coming-soon-card {
    cursor: pointer;
    position: relative;
}

@media (hover: hover) {
    .coming-soon-card:hover .card-hover-content {
        opacity: 1;
        pointer-events: all;
    }
}

.hover-title {
    color: var(--off-white);
    font-family: 'automate', sans-serif;
    font-size: 26px;
    letter-spacing: 3px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    text-transform: uppercase;
}

.notify-button {
    color: var(--off-white);
    font-family: 'automate', sans-serif;
    font-size: 14px;
    letter-spacing: 2px;
    padding: 10px 20px;
    border: 2px solid var(--off-white);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
}

.notify-button:hover {
    background: var(--off-white);
    color: var(--pink-primary);
    transform: scale(1.05);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: linear-gradient(135deg, rgba(26, 26, 31, 0.98) 0%, rgba(0, 0, 0, 0.98) 100%);
    margin: 10% auto;
    padding: 40px;
    border: 2px solid var(--pink-primary);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 0 50px rgba(237, 17, 89, 0.5),
                inset 0 0 30px rgba(94, 88, 196, 0.1);
    text-align: center;
}

.close {
    color: var(--pink-primary);
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover,
.close:focus {
    color: var(--pink-light);
    transform: rotate(90deg);
}

.modal-content h2 {
    color: var(--pink-primary);
    font-family: 'automate', serif;
    font-size: 36px;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(237, 17, 89, 0.6);
    letter-spacing: 3px;
}

.modal-content p {
    color: var(--pink-light);
    font-size: 16px;
    margin-bottom: 25px;
    line-height: 1.6;
    font-style: italic;
}

#signupForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.name-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

#signupForm input[type="text"],
#signupForm input[type="email"] {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--purple);
    color: var(--off-white);
    padding: 15px;
    font-size: 16px;
    border-radius: 6px;
    font-family: 'automate', monospace;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    width: 100%;    
    min-width: 0; 
}

#signupForm input[type="text"]:focus,
#signupForm input[type="email"]:focus {
    outline: none;
    border-color: var(--pink-primary);
    box-shadow: 0 0 20px rgba(237, 17, 89, 0.3);
}

#signupForm input[type="text"]::placeholder,
#signupForm input[type="email"]::placeholder {
    color: var(--purple);
    opacity: 0.7;
    text-transform: uppercase;
}

#signupForm button {
    background: var(--pink-primary);
    color: var(--off-white);
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'automate', sans-serif;
    text-transform: uppercase;
}

#signupForm button:hover {
    background: var(--pink-light);
    box-shadow: 0 5px 25px rgba(237, 17, 89, 0.5);
    transform: translateY(-2px);
}

.modal-disclaimer {
    color: var(--purple) !important;
    font-size: 13px !important;
    margin-top: 20px;
    opacity: 0.8;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(237, 17, 89, 0.3); }
    50% { box-shadow: 0 0 40px rgba(237, 17, 89, 0.6); }
}

.card:nth-child(1) { animation: float 4s ease-in-out infinite; animation-delay: 0s; }
.card:nth-child(2) { animation: float 4s ease-in-out infinite; animation-delay: 0.5s; }
.card:nth-child(3) { animation: float 4s ease-in-out infinite; animation-delay: 1s; }
.card:nth-child(4) { animation: float 4s ease-in-out infinite; animation-delay: 1.5s; }
.card:nth-child(5) { animation: float 4s ease-in-out infinite; animation-delay: 2s; }

/* Touch device tap-to-reveal */
@media (hover: none) {
    .card[data-hover-text].tapped::after {
        opacity: 1;
    }

    .card-link .card.tapped::after {
        opacity: 1;
    }

    .coming-soon-card.tapped .card-hover-content {
        opacity: 1;
        pointer-events: all;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .header-section {
        flex-direction: column;
        gap: 30px;
    }
    
    .narrative-section {
        max-width: 100%;
    }
}

@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        text-align: center;
        width: 100%;
        min-width: auto;
    }
    
    .header-text {
        font-size: 18px;
        text-align: center;
    }
    
    .logo {
        font-size: 80px;
        text-align: center;
        margin-left: 0;
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .narrative-section {
        padding: 20px;
    }

    .narrative-text {
        font-size: 18px;
        text-align: center;
    }

    .about-card-wrapper {
        padding: 50px 30px;
    }

    .era-title-new {
        font-size: 26px;
    }

    .meeba-egg {
        width: 120px;
    }

    .back-link {
        position: static;
        display: block;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    body {
        padding: 20px;
    }
    
    .narrative-text {
        font-size: 16px;
    }
    
    .card[data-hover-text]::after,
    .card-link .card::after {
        font-size: 18px;
    }

    .hover-title {
        font-size: 18px;
    }

    .notify-button {
        min-height: 44px;
        min-width: 44px;
    }

    .social-links {
        gap: 20px;
        margin-top: 20px;
        justify-content: center;
    }

    .social-links a {
        font-size: 24px;
    }

    .modal-content {
        width: 95%;
        padding: 30px 20px;
    }

    .modal-content h2 {
        font-size: 28px;
    }

    .name-fields {
        grid-template-columns: 1fr;
    }

    .about-card-wrapper {
        padding: 30px 20px;
        border-radius: 24px;
    }

    .era-title-new {
        font-size: 22px;
    }

    .era-text-new {
        font-size: 15px;
    }

    .mythology-main-title {
        font-size: clamp(20px, 5vw, 42px);
    }

    .meeba-egg {
        width: 100px;
    }
}

/* --- About Page Specific Styles --- */

/* 1. Canvas & Layout Overrides */

/* Disable the dark overlay from the main styles.css specifically for this page */
.about-page-body::after {
    content: none !important;
    display: none !important;
}
.about-page-body {
    background-color: var(--pink-primary);
    background-image: none !important;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
.about-page-body {
    /* High-vibrancy Neon Pink background */
    background-color: var(--pink-primary);
    background-image: none !important;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* 2. Central Black Card Container */
.about-card-wrapper {
    background-color: var(--black);
    width: 100%;
    max-width: 900px;
    border-radius: 40px; /* High radius matches DOI_About.jpg */
    padding: 80px 60px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    z-index: 2;
}

/* 3. Typography & Neon Glows */
.mythology-header {
    text-align: center;
    margin-bottom: 50px;
}

.mythology-main-title {
    font-family: 'bc-vajgar', serif; /* Updated font choice */
    font-size: clamp(28px, 5vw, 42px);
    color: var(--pink-primary);
    line-height: 1.1;
    margin-bottom: 20px;
}

.about-logo-glow {
    display: block;
    margin: 0 auto 30px;
    max-width: 350px;
    width: 100%;
    filter: drop-shadow(0 0 15px var(--pink-primary)) brightness(1.2);
}

.infinity-divider {
    color: var(--pink-primary);
    font-size: 40px;
    text-align: center;
    margin: 30px 0;
    text-shadow: 0 0 10px var(--pink-primary);
}

.era-title-new {
    font-family: 'bc-vajgar', serif; /* Updated font choice */
    font-size: 34px;
    color: var(--off-white);
    margin: 50px 0 20px;
}

.era-text-new {
    font-family: 'automate', monospace;
    font-size: 18px;
    line-height: 1.6;
    color: var(--pink-primary);
    margin-bottom: 25px;
    text-shadow: 0 0 5px rgba(237, 17, 89, 0.3);
}

/* 4. Navigation */
.back-link {
    position: absolute;
    top: 40px;
    left: 40px;
    color: var(--pink-primary);
    text-decoration: none;
    font-family: 'automate', sans-serif;
    font-size: 18px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    z-index: 10;
}

.back-link:hover {
    color: var(--pink-light);
    text-shadow: 0 0 10px var(--pink-primary);
}

/* 5. Mascot & Subtle Glitch Animation */
.meeba-egg {
    position: fixed;
    width: 180px;
    pointer-events: none;
    z-index: 1000;
    filter: drop-shadow(0 0 15px rgba(237, 17, 89, 0.7));
    opacity: 0;
    transition: opacity 0.6s ease-in-out, transform 0.4s ease-out;
}

.meeba-visible {
    opacity: 1;
    /* Combined floating and breathing animations */
    animation: meeba-float 4s ease-in-out infinite, 
               meeba-breathe 3s ease-in-out infinite;
}

/* Vertical floating movement */
@keyframes meeba-float {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

/* The breathing pulse: subtle scale and glow */
@keyframes meeba-breathe {
    0%, 100% { 
        scale: 1;
        filter: drop-shadow(0 0 15px rgba(237, 17, 89, 0.7));
    }
    50% { 
        scale: 1.05; 
        filter: drop-shadow(0 0 25px rgba(237, 17, 89, 0.9));
    }
}

/* Redefined subtle glitch trigger */
.meeba-glitch {
    animation: meeba-subtle-glitch 0.2s steps(2) both; 
}

@keyframes meeba-subtle-glitch {
    0%, 100% {
        transform: translate(0);
        filter: hue-rotate(0deg) brightness(1);
    }
    50% {
        transform: translate(-2px, 1px);
        filter: hue-rotate(10deg) brightness(1.2);
        opacity: 0.9;
    }
}

/* --- FOOTER STYLES --- */
.site-footer {
    margin-top: 80px;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(237, 17, 89, 0.2);
    position: relative;
    z-index: 10;
}

.footer-link {
    color: var(--pink-primary);
    text-decoration: none;
    font-family: 'automate', sans-serif;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.footer-link:hover {
    opacity: 1;
    color: var(--off-white);
    text-shadow: 0 0 10px var(--pink-primary);
}

.copyright-text {
    color: var(--pink-primary);
    font-family: 'automate', sans-serif;
    font-size: 11px;
    margin-top: 15px;
    opacity: 0.5;
    letter-spacing: 1px;
}