/* =============== CORE STYLES =============== */
:root {
    --primary: #6e44ff;
    --primary-dark: #4a2dbd;
    --secondary: #ff7e5f;
    --accent: #00e6cc;
    --dark: #121019;
    --light: #f5f5f7;
    --gray: #636173;
    --text-shadow: 0 0 10px rgba(0, 230, 204, 0.5);
    --glow: 0 0 15px rgba(110, 68, 255, 0.6);
    --transition-slow: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    --transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes backgroundPulse {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glowing {
    0% { box-shadow: 0 0 5px var(--accent); }
    50% { box-shadow: 0 0 20px var(--accent), 0 0 30px var(--primary); }
    100% { box-shadow: 0 0 5px var(--accent); }
}

@keyframes revealLetters {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--light);
    background: linear-gradient(135deg, #121019 0%, #1f1c2c 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><defs><radialGradient id="stars"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.8"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><rect width="100%" height="100%" fill="%23000000" opacity="0.03"/><circle cx="25" cy="30" r="0.2" fill="url(%23stars)"/><circle cx="75" cy="60" r="0.2" fill="url(%23stars)"/><circle cx="45" cy="10" r="0.2" fill="url(%23stars)"/><circle cx="10" cy="80" r="0.2" fill="url(%23stars)"/><circle cx="90" cy="20" r="0.2" fill="url(%23stars)"/><circle cx="60" cy="90" r="0.2" fill="url(%23stars)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

main {
    position: relative;
    width: 100%;
    overflow: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Cinzel', serif;
    margin-bottom: 1rem;
    color: var(--light);
    letter-spacing: 1px;
}

h1 {
    font-size: 5rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 10px;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
}

h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
}

section {
    padding: 100px 5%;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title:after {
    left: 50%;
    transform: translateX(-50%);
}

/* =============== MAGIC CURSOR =============== */
.magic-cursor {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    mix-blend-mode: difference;
    z-index: 9999;
    transition: all 0.1s ease;
    opacity: 0;
}

/* =============== NAVIGATION =============== */
.game-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    z-index: 1000;
    transition: var(--transition);
    background: rgba(18, 16, 25, 0.8);
    backdrop-filter: blur(10px);
}

.nav-logo {
    height: 40px;
}

#logo {
    height: 100%;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: var(--transition);
    padding-bottom: 5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link:hover::after {
    width: 100%;
}

/* =============== HERO SECTION =============== */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: linear-gradient(to bottom, rgba(18, 16, 25, 0.7) 0%, rgba(30, 28, 44, 0.9) 100%);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('img/hero-bg-placeholder.jpg') center/cover no-repeat;
    opacity: 0.4;
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    animation: fadeIn 1.2s ease-out;
}

.reveal-text {
    position: relative;
    color: transparent;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    background-clip: text;
    -webkit-background-clip: text;
    text-shadow: var(--text-shadow);
}

.hero-tagline {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.cta-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--primary), var(--primary-dark));
    color: var(--light);
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    min-width: 220px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(110, 68, 255, 0.4);
}

.cta-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
    transform: rotate(45deg);
    transition: var(--transition);
    opacity: 0;
}

.cta-button:hover::after {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}

.discord-button {
    animation: glowing 3s infinite;
}

.discord-icon {
    font-size: 1.2rem;
}

.store-buttons {
    display: flex;
    gap: 10px;
}

.store-button {
    padding: 8px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.store-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.float-element {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(110, 68, 255, 0.3), rgba(0, 230, 204, 0.1));
    filter: blur(20px);
}

.element-1 {
    top: 20%;
    left: 15%;
    animation: float 8s infinite;
}

.element-2 {
    top: 60%;
    right: 10%;
    width: 200px;
    height: 200px;
    animation: float 12s infinite reverse;
}

.element-3 {
    bottom: 10%;
    left: 30%;
    width: 100px;
    height: 100px;
    animation: float 7s infinite 2s;
}

/* =============== NEWS SECTION =============== */
.news-section {
    background: linear-gradient(to bottom, var(--dark) 0%, rgba(30, 28, 44, 0.9) 100%);
    position: relative;
    z-index: 1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.news-filter {
    display: flex;
    gap: 10px;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--light);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 2rem;
}

.news-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    height: 350px;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow);
    border-color: rgba(110, 68, 255, 0.3);
}

.news-img {
    height: 180px;
    width: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), 
                url('img/news-placeholder.jpg') center/cover no-repeat;
    position: relative;
}

.news-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 10px;
    background: var(--secondary);
    color: var(--light);
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.news-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-date {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 8px;
}

.news-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.4;
    font-family: 'Cinzel', serif;
}

.news-excerpt {
    font-size: 0.9rem;
    margin-bottom: 15px;
    opacity: 0.8;
    line-height: 1.6;
    flex: 1;
}

.news-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    align-self: flex-start;
    transition: var(--transition);
}

.news-link:hover {
    color: var(--light);
}

.load-more-btn {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    letter-spacing: 1px;
    display: block;
    margin: 0 auto;
}

.load-more-btn:hover {
    background: var(--accent);
    color: var(--dark);
}

.news-pagination {
    text-align: center;
    margin-top: 2rem;
}

/* =============== CHARACTER SHOWCASE =============== */
.characters-section {
    background: linear-gradient(to bottom, rgba(30, 28, 44, 0.9) 0%, var(--dark) 100%);
    z-index: 2;
}

.character-showcase {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    justify-content: center;
}

.character-info {
    flex: 1;
    min-width: 300px;
    position: relative;
    min-height: 400px;
}

.character-text {
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-slow);
    pointer-events: none;
}

.character-text.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.character-role {
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 15px;
    font-style: italic;
}

.character-story {
    margin-bottom: 25px;
    line-height: 1.8;
}

.character-stats {
    margin-top: 30px;
}

.stat {
    margin-bottom: 15px;
}

.stat-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 0.9rem;
}

.stat-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(to right, var(--accent), var(--primary));
    border-radius: 4px;
    transition: width 1s cubic-bezier(.17,.67,.83,.67);
}

.character-portraits {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.portrait-container {
    position: relative;
    height: 500px;
    width: 100%;
    overflow: hidden;
}

.character-portrait {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(0.9);
    transition: var(--transition-slow);
    pointer-events: none;
}

.character-portrait.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.portrait-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), 
                url('img/character-placeholder.jpg') center/cover no-repeat;
    position: relative;
    overflow: hidden;
}

.portrait-placeholder::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, var(--dark), transparent);
    z-index: 1;
}

.lyra {
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), 
                      url('img/char1-placeholder.jpg');
}

.kaden {
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), 
                      url('img/char2-placeholder.jpg');
}

.orinn {
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), 
                      url('img/char3-placeholder.jpg');
}

.character-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 15px;
}

.char-nav {
    background: transparent;
    color: var(--light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.char-nav:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.char-indicators {
    display: flex;
    gap: 8px;
}

.char-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: var(--transition);
}

.char-dot.active {
    background: var(--accent);
    transform: scale(1.2);
}

/* =============== ABOUT/WORLD SECTION =============== */
.about-section {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    background: var(--dark);
    position: relative;
}

.world-map {
    flex: 1;
    min-width: 300px;
    height: 400px;
    background: url('img/world-map-placeholder.jpg') center/cover no-repeat;
    border-radius: 10px;
    position: relative;
    border: 2px solid rgba(110, 68, 255, 0.2);
}

.map-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--secondary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
}

.map-marker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--secondary);
    animation: pulse 2s infinite;
    opacity: 0.5;
}

.map-marker:hover {
    transform: translate(-50%, -50%) scale(1.2);
}

.location-info {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 16, 25, 0.9);
    padding: 10px 15px;
    border-radius: 8px;
    width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.location-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--accent);
}

.location-info p {
    font-size: 0.85rem;
    line-height: 1.4;
}

.map-marker:hover .location-info {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

[data-location="crystalvale"] {
    top: 30%;
    left: 70%;
}

[data-location="shadowfen"] {
    top: 60%;
    left: 40%;
}

[data-location="emberforge"] {
    top: 50%;
    left: 85%;
}

.world-lore {
    flex: 1;
    min-width: 300px;
}

.world-lore p {
    margin-bottom: 20px;
    line-height: 1.8;
}

/* =============== COMMUNITY SECTION =============== */
.community-section {
    background: linear-gradient(to right, rgba(110, 68, 255, 0.2) 0%, rgba(0, 230, 204, 0.2) 100%);
    padding: 60px 5%;
    text-align: center;
}

.community-container {
    max-width: 700px;
    margin: 0 auto;
}

.community-text {
    margin-bottom: 30px;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto 30px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--light);
    border-radius: 30px 0 0 30px;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
}

.submit-btn {
    background: var(--accent);
    color: var(--dark);
    border: none;
    padding: 0 25px;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    transition: var(--transition);
}

.submit-btn:hover {
    background: var(--primary);
    color: var(--light);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-link {
    color: var(--light);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    font-size: 0.9rem;
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--glow);
}

/* =============== FOOTER =============== */
.game-footer {
    background: linear-gradient(to right, rgba(18, 16, 25, 1) 0%, rgba(30, 28, 44, 1) 100%);
    padding: 60px 5% 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo {
    flex: 1;
    min-width: 200px;
    max-width: 250px;
}

.footer-logo img {
    width: 100%;
    height: auto;
}

.footer-links {
    flex: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-column {
    flex: 1;
    min-width: 120px;
}

.footer-column h4 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent);
}

.footer-column a {
    color: var(--light);
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: var(--transition);
}

.footer-column a:hover {
    opacity: 1;
    transform: translateX(5px);
    color: var(--accent);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* =============== RESPONSIVE =============== */
@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .news-filter {
        overflow-x: auto;
        padding-bottom: 10px;
        width: 100%;
    }
    
    .character-showcase {
        flex-direction: column-reverse;
    }
    
    .portrait-container {
        height: 400px;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
}
