/**
 * Necropolis Modding Hub - Shared Styles
 * Common CSS used across all pages
 */

/* ========================================
   CSS Reset & Base
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: clip;
}

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --primary-cyan: #7FFFD4;
    --primary-rgb: 127, 255, 212;
    --dark-bg: #0a0a0a;
    --darker-bg: #050505;
    --card-bg: #1a1a1a;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent-red: #8B2635;
}

/* ========================================
   Body & Background
   ======================================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
    max-width: 100%;
    overflow-x: clip;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(var(--primary-rgb), 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(139, 38, 53, 0.03) 0%, transparent 50%);
    z-index: -1;
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3 {
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--primary-cyan);
    text-shadow: 0 0 20px rgba(var(--primary-rgb), 0.5);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--primary-cyan);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-cyan), transparent);
}

/* ========================================
   Skip to Content (Accessibility)
   ======================================== */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-cyan);
    color: var(--dark-bg);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 10px;
}

/* ========================================
   Navigation
   ======================================== */
nav {
    background: rgba(5, 5, 5, 0.5);
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.3);
    position: sticky;
    top: 0;
    width: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-logo {
    position: absolute;
    left: 0;
    top: 60%;
    transform: translateY(-50%);
    pointer-events: none;
    user-select: none;
    width: 50px;
    height: 50px;
}

.nav-logo-icon {
    width: 100%;
    height: 100%;
    background-color: var(--primary-cyan);
    mask-image: url('https://i.imgur.com/aGQGNWt.png');
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url('https://i.imgur.com/aGQGNWt.png');
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.nav-brand {
    color: var(--primary-cyan);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.5s ease;
    margin-left: 60px;
    text-shadow: 0 0 15px rgba(var(--primary-rgb), 0.6);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    transition: all 0.5s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-cyan);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-cyan);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary-cyan);
}

.nav-link.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: 2px solid var(--primary-cyan);
    color: var(--primary-cyan);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.5s ease;
}

.menu-toggle:hover {
    background: rgba(127, 255, 212, 0.1);
}

@media (max-width: 768px) {
    nav {
        padding: 1rem 0;
        width: 100%;
    }

    .nav-content {
        padding: 0 1rem;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--darker-bg);
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(127, 255, 212, 0.2);
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-link {
        width: 100%;
        padding: 1rem 2rem;
        text-align: center;
    }

    .menu-toggle {
        display: block;
    }
}

/* ========================================
   Container
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* ========================================
   Cards
   ======================================== */
.mod-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: all 0.5s ease;
    height: 100%;
}

.mod-card:hover {
    border-color: var(--primary-cyan);
    box-shadow: 0 3px 15px rgba(var(--primary-rgb), 0.2);
    transform: translateY(-3px);
}

.mod-card-link {
    text-decoration: none;
    display: block;
    color: inherit;
    height: 100%;
}

.mod-card-link:hover {
    color: inherit;
}

.mod-card h3 {
    color: var(--primary-cyan);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.mod-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.mod-card code {
    background: var(--darker-bg);
    color: var(--primary-cyan);
}

/* ========================================
   Tags
   ======================================== */
.mod-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: color-mix(in srgb, var(--primary-cyan) 10%, transparent);
    color: var(--primary-cyan);
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-top: 0.5rem;
}

.mod-tag2 {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: color-mix(in srgb, var(--primary-cyan) 10%, transparent);
    color: var(--primary-cyan);
    border-radius: 1px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-top: 0.5rem;
}

/* ========================================
   Buttons
   ======================================== */
.cta-button,
.view-all-button {
    display: inline-block;
    padding: 1rem 3rem;
    background: transparent;
    border: 2px solid var(--primary-cyan);
    color: var(--primary-cyan);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
    font-weight: 500;
}

.cta-button::before,
.view-all-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-cyan);
    transition: left 0.3s ease;
    z-index: 0;
}

.cta-button span,
.view-all-button span {
    position: relative;
    z-index: 1;
}

.cta-button:hover::before,
.view-all-button:hover::before {
    left: 0;
}

.cta-button:hover,
.view-all-button:hover {
    color: var(--dark-bg);
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.5);
}

/* ========================================
   Community Links
   ======================================== */
.community-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}

.community-link {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--card-bg);
    color: var(--primary-cyan);
    text-decoration: none;
    border: 2px solid var(--primary-cyan);
    border-radius: 4px;
    transition: all 0.5s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.community-link:hover {
    background: var(--primary-cyan);
    color: var(--dark-bg);
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.4);
}

.mod-repo-disabled {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: var(--text-primary);
    cursor: not-allowed;
    position: relative;
}

.mod-repo-disabled:hover {
    background: var(--accent-red);
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(139, 38, 53, 0.6);
}

.mod-repo-disabled::after {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg);
    color: var(--primary-cyan);
    padding: 0.8rem 1.2rem;
    border-radius: 4px;
    border: 1px solid var(--primary-cyan);
    white-space: nowrap;
    font-size: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.mod-repo-disabled:hover::after {
    opacity: 1;
}

/* ========================================
   Footer
   ======================================== */
footer {
    background: var(--darker-bg);
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(127, 255, 212, 0.1);
}

footer p {
    color: var(--primary-cyan);
    font-size: 0.9rem;
}

.footer-link,
footer a {
    color: var(--primary-cyan);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.footer-link::after,
footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-cyan);
    transition: width 0.3s ease;
}

.footer-link:hover::after,
footer a:hover::after {
    width: 100%;
}

footer a:hover {
    text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.6);
}

/* ========================================
   Links
   ======================================== */
a:not(.cta-button):not(.community-link):not(.mod-card-link):not(.view-all-button):not(.nav-brand):not(.nav-link):not(.footer-link) {
    color: var(--primary-cyan);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

a:not(.cta-button):not(.community-link):not(.mod-card-link):not(.view-all-button):not(.nav-brand):not(.nav-link):not(.footer-link):hover {
    border-bottom-color: var(--primary-cyan);
}

/* ========================================
   Code Blocks
   ======================================== */
code {
    background: var(--darker-bg);
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    color: var(--primary-cyan);
    font-family: 'Courier New', monospace;
}

/* ========================================
   Status Banner
   ======================================== */
.status-banner {
    background: linear-gradient(135deg, #2d3748, #1a202c);
    border-color: var(--primary-cyan);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.5);
    padding: 1.5rem;
    border-left: 4px solid var(--primary-cyan);
    margin-bottom: 3rem;
    border-radius: 4px;
}

.status-banner h3 {
    color: var(--primary-cyan);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.status-banner p {
    color: var(--text-primary);
    font-size: 1rem;
}

/* ========================================
   FAQ
   ======================================== */
.faq-item {
    background: var(--card-bg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    border-left: 3px solid var(--primary-cyan);
}

.faq-item h3 {
    color: var(--primary-cyan);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.faq-item p {
    color: var(--text-secondary);
}

.faq-item code {
    background: var(--darker-bg);
    color: var(--primary-cyan);
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* ========================================
   Section Styling
   ======================================== */
section {
    margin-bottom: 6rem;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }

    h2::after {
        width: 50%;
    }
}
