/* Soul Knight Wiki - Main Stylesheet */

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #1a1a1a;
}

/* ========================================
   SKIP LINK FOR ACCESSIBILITY
   ======================================== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background-color: #4CAF50;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: bold;
    z-index: 10000;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

/* ========================================
   NAVIGATION
   ======================================== */
nav {
    background-color: #2c2c2c;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 1rem;
}

nav ul li {
    margin: 0.5rem 1rem;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: block;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: #4CAF50;
    transform: translateY(-2px);
}

nav ul li a:focus {
    outline: 3px solid #4CAF50;
    outline-offset: 2px;
}

/* ========================================
   MAIN CONTENT CONTAINER
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    background-color: transparent;
    min-height: calc(100vh - 60px);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4 {
    color: #f5f5f5;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

h2 {
    font-size: 2rem;
    margin-top: 2rem;
    border-bottom: 3px solid #4CAF50;
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
}

h4 {
    font-size: 1.2rem;
    margin-top: 1rem;
}

p {
    margin-bottom: 1rem;
    color: #e0e0e0;
}

/* ========================================
   IMAGES
   ======================================== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   HERO SECTION (Homepage)
   ======================================== */
.hero-section {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    max-height: 800px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-wallpaper {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(26, 26, 26, 0.3), rgba(26, 26, 26, 0.8));
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
}

.hero-logo {
    max-width: 500px;
    width: 90%;
    margin: 0 auto 1rem;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.8));
}

.hero-subtitle {
    color: #f5f5f5;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.9);
    margin: 0;
    letter-spacing: 1px;
}

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

/* ========================================
   STORY SECTION
   ======================================== */
.story-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin: 4rem 0;
    padding: 3rem;
    background: #2a2a2a;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid #3a3a3a;
}

.story-content h2 {
    color: #4CAF50;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.story-content p {
    color: #e0e0e0;
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.story-image {
    text-align: center;
}

.story-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.2);
    transition: transform 0.3s ease;
}

.story-image img:hover {
    transform: scale(1.05);
}

/* ========================================
   GALLERY SECTION
   ======================================== */
.gallery-section {
    margin: 4rem 0;
}

.section-title {
    text-align: center;
    color: #4CAF50;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, transparent, #4CAF50, transparent);
    border-radius: 2px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.gallery-item {
    position: relative;
    background: #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #3a3a3a;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
    border-color: #4CAF50;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-caption {
    padding: 1rem;
    background: rgba(42, 42, 42, 0.95);
    color: #e0e0e0;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    border-top: 2px solid #3a3a3a;
    transition: background 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    background: rgba(76, 175, 80, 0.2);
    border-top-color: #4CAF50;
    color: #4CAF50;
}

/* ========================================
   CHARACTER CARDS
   ======================================== */
.character-grid,
.npc-grid,
.enemy-grid,
.buff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.character-card,
.npc-card,
.enemy-card,
.buff-card {
    background: #2a2a2a;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #3a3a3a;
}

.character-card:hover,
.npc-card:hover,
.enemy-card:hover,
.buff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.3);
    border-color: #4CAF50;
}

.character-card img,
.npc-card img,
.enemy-card img,
.buff-card img {
    width: 100%;
    max-width: 150px;
    margin: 0 auto 1rem;
    border-radius: 5px;
}

.character-card h3,
.npc-card h3,
.enemy-card h3,
.buff-card h3 {
    color: #4CAF50;
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.character-stats {
    text-align: left;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.character-stats p {
    margin: 0.3rem 0;
    color: #b0b0b0;
}

/* ========================================
   TABS FOR ENEMIES
   ======================================== */
.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0 1rem;
    flex-wrap: wrap;
}

.tab-button {
    background-color: #3a3a3a;
    color: #e0e0e0;
    border: 1px solid #4a4a4a;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    min-height: 44px;
    min-width: 44px;
}

.tab-button:hover {
    background-color: #4CAF50;
    color: white;
}

.tab-button.active {
    background-color: #4CAF50;
    color: white;
}

.tab-button:focus {
    outline: 3px solid #4CAF50;
    outline-offset: 2px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========================================
   LOBBY SECTIONS
   ======================================== */
.lobby-section {
    background: #2a2a2a;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
    border: 1px solid #3a3a3a;
}

.lobby-section img {
    width: 100%;
    max-width: 600px;
    margin: 1rem auto;
    border-radius: 8px;
}

/* ========================================
   BOSS DROPS
   ======================================== */
.boss-card {
    background: #2a2a2a;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #3a3a3a;
    display: flex;
    flex-direction: column;
    min-height: 450px;
}

.boss-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.3);
    border-color: #4CAF50;
}

.boss-card img {
    width: 100%;
    max-width: 150px;
    margin: 0 auto 1rem;
    border-radius: 5px;
}

.boss-card h3 {
    color: #4CAF50;
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.boss-drops {
    background-color: #3a2f1a;
    border-left: 4px solid #ff9800;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 5px;
    text-align: left;
    flex-grow: 1;
}

.boss-drops h4 {
    color: #ff9800;
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.boss-drops ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.boss-drops ul li {
    color: #e0e0e0;
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

.boss-drops ul li:before {
    content: "• ";
    color: #ff9800;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* ========================================
   INTRO SECTION (Homepage)
   ======================================== */
.intro {
    background: #2a2a2a;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
    border: 1px solid #3a3a3a;
}

.intro h2 {
    color: #4CAF50;
}

.intro h3 {
    color: #66BB6A;
}

.intro p {
    color: #e0e0e0;
}

.intro strong {
    color: #f5f5f5;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media screen and (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 0.3rem 0;
        width: 100%;
        text-align: center;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Hero Section Mobile */
    .hero-section {
        height: 50vh;
        min-height: 400px;
    }

    .hero-logo {
        max-width: 300px;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    /* Story Section Mobile */
    .story-section {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
        gap: 2rem;
    }

    .story-image {
        order: -1;
    }

    /* Gallery Mobile */
    .section-title {
        font-size: 2rem;
    }

    .gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-item img {
        height: 200px;
    }

    .character-grid,
    .npc-grid,
    .enemy-grid,
    .buff-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .container {
        padding: 1rem 0.5rem;
    }

    .tabs {
        flex-direction: column;
        align-items: stretch;
    }

    .tab-button {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    .hero-section {
        height: 45vh;
        min-height: 350px;
    }

    .hero-logo {
        max-width: 250px;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .story-section {
        padding: 1.5rem 1rem;
    }

    .story-content h2 {
        font-size: 1.5rem;
    }

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

    .character-grid,
    .npc-grid,
    .enemy-grid,
    .buff-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

/* ========================================
   FOCUS STYLES FOR ACCESSIBILITY
   ======================================== */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid #4CAF50;
    outline-offset: 2px;
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    nav,
    .skip-link {
        display: none;
    }

    body {
        background-color: white;
        color: black;
    }

    .container {
        background-color: white;
    }

    a {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }
}
