/* ========================================
   DUOMAPS WIKI STYLES
   ======================================== */

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

:root {
    --primary-blue: #00d4ff;
    --dark-blue: #0a1628;
    --darker-blue: #050b14;
    --white: #ffffff;
    --light-gray: #f0f0f0;
    --green-accent: #00ff88;
    --shadow: rgba(0, 212, 255, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--darker-blue);
    color: var(--white);
    overflow-x: hidden;
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

::selection {
    background: var(--primary-blue);
    color: var(--white);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--darker-blue);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--green-accent);
}

/* ========================================
   PARTICLES BACKGROUND
   ======================================== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: var(--primary-blue);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 20s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-100px) translateX(50px);
    }
    50% {
        transform: translateY(-50px) translateX(100px);
    }
    75% {
        transform: translateY(-150px) translateX(50px);
    }
}

/* ========================================
   PAGE LOADER
   ======================================== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hide {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    margin: 2rem auto;
    border: 4px solid rgba(0, 212, 255, 0.1);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    color: var(--primary-blue);
    font-size: 1.2rem;
    animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(5, 11, 20, 0.8);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(5, 11, 20, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    padding: 0.6rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.nav-logo {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

.nav-title {
    color: var(--primary-blue);
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-back {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-back:hover {
    background: var(--primary-blue);
    color: var(--darker-blue);
    transform: translateX(-3px);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 8rem 2rem 4rem;
    background: linear-gradient(135deg, var(--darker-blue) 0%, var(--dark-blue) 100%);
}

.hero-content {
    text-align: center;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

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

.glitch {
    font-size: 4rem;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    color: var(--white);
    text-shadow: 0 0 10px var(--primary-blue);
    margin-bottom: 1rem;
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
    }
    92% {
        transform: translate(-2px, 2px);
    }
    94% {
        transform: translate(2px, -2px);
    }
    96% {
        transform: translate(-2px, -2px);
    }
    98% {
        transform: translate(2px, 2px);
    }
}

.subtitle {
    font-size: 1.5rem;
    color: var(--light-gray);
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* ========================================
   WIKI SEARCH
   ======================================== */
.wiki-search-wrapper {
    max-width: 700px;
    margin: 0 auto;
    margin-top: 2rem;
}

.wiki-search-box {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 50px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.wiki-search-box:focus-within {
    border-color: var(--primary-blue);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.search-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 0 5px var(--primary-blue));
}

.wiki-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.1rem;
    outline: none;
}

.wiki-search-box input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.clear-search {
    background: rgba(255, 51, 51, 0.2);
    border: 1px solid rgba(255, 51, 51, 0.4);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ff3333;
    font-size: 1rem;
    font-weight: bold;
}

.clear-search:hover {
    background: rgba(255, 51, 51, 0.4);
    border-color: #ff3333;
    transform: scale(1.1) rotate(90deg);
}

.no-results {
    padding: 3rem 0;
    display: none;
}

.no-results-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    padding: 3rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.no-results-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.no-results-content p {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.no-results-content small {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
}

.command-section.hidden {
    display: none;
}

.command-card.hidden {
    display: none;
}

/* ========================================
   CONTAINER
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* ========================================
   SECTION
   ======================================== */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--green-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--light-gray);
    margin-bottom: 3rem;
    opacity: 0.8;
}

/* ========================================
   COMMAND CARDS
   ======================================== */
.command-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.command-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

.command-card:nth-child(1) { animation-delay: 0.1s; }
.command-card:nth-child(2) { animation-delay: 0.2s; }
.command-card:nth-child(3) { animation-delay: 0.3s; }
.command-card:nth-child(4) { animation-delay: 0.4s; }
.command-card:nth-child(5) { animation-delay: 0.5s; }
.command-card:nth-child(6) { animation-delay: 0.6s; }
.command-card:nth-child(7) { animation-delay: 0.7s; }
.command-card:nth-child(8) { animation-delay: 0.8s; }

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

.command-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-blue);
    box-shadow: 0 10px 40px var(--shadow);
}

.command-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.command-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px var(--primary-blue));
}

.command-codes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.command-code {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--primary-blue);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: var(--primary-blue);
    font-weight: bold;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.command-code:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: scale(1.05);
}

.command-title {
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.command-description {
    color: var(--light-gray);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.info-box {
    background: rgba(0, 255, 136, 0.1);
    border-left: 4px solid var(--green-accent);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
}

.info-box strong {
    color: var(--green-accent);
}

.info-box p {
    color: var(--light-gray);
    margin: 0;
}

.image-container {
    margin-top: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(0, 255, 136, 0.05));
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.image-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-blue), var(--green-accent), var(--primary-blue));
    background-size: 400% 400%;
    border-radius: 12px;
    opacity: 0;
    z-index: -1;
    animation: gradient-rotate 3s ease infinite;
    transition: opacity 0.3s ease;
}

.image-container:hover::before {
    opacity: 0.3;
}

@keyframes gradient-rotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.command-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 5px 15px rgba(0, 212, 255, 0.4));
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}

.command-image:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 8px 25px rgba(0, 212, 255, 0.6));
}

/* ========================================
   FOOTER CTA
   ======================================== */
.footer-cta {
    background: linear-gradient(135deg, var(--dark-blue), var(--darker-blue));
    padding: 4rem 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.cta-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    padding: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.cta-content p {
    color: var(--light-gray);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-discord {
    background: linear-gradient(135deg, #5865F2, #404eed);
    color: var(--white);
}

.btn-discord:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(88, 101, 242, 0.4);
}

/* ========================================
   SCROLL TO TOP BUTTON
   ======================================== */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue), var(--green-accent));
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 5px 20px var(--shadow);
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow);
}

/* ========================================
   TOAST NOTIFICATION
   ======================================== */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary-blue), var(--green-accent));
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: bottom 0.3s ease;
    z-index: 10000;
    font-weight: 600;
}

.toast.show {
    bottom: 2rem;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--darker-blue);
    padding: 2rem 0 1rem;
    border-top: 1px solid rgba(0, 212, 255, 0.2);
    position: relative;
    z-index: 1;
    text-align: center;
}

.footer p {
    color: var(--light-gray);
    margin: 0.5rem 0;
}

.footer a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--green-accent);
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .glitch {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .command-header {
        flex-direction: column;
        text-align: center;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .nav-title {
        display: none;
    }

    .scroll-top-btn {
        bottom: 6rem;
    }

    .nav-back span:last-child {
        display: none;
    }

    .nav-back {
        padding: 0.6rem 1rem;
    }
    
    .wiki-search-wrapper {
        padding: 0 1rem;
        margin-top: 1.5rem;
    }
    
    .wiki-search-box {
        padding: 0.8rem 1rem;
    }
    
    .wiki-search-box input {
        font-size: 16px;
    }
    
    .no-results-content {
        padding: 2rem 1.5rem;
    }
    
    .no-results-icon {
        font-size: 3rem;
    }
}