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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Cinzel', serif;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

img {
    max-width: 100%;
    display: block;
}

/* Header */
header {
    width: 100%;
    height: 80px; /* Fixed height for precise offset */
    background: #000;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed; /* Keep it at the top */
    top: 0;
    left: 0;
    z-index: 1000;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    letter-spacing: 3px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    font-size: 14px;
    font-weight: 600;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a:hover {
    color: #ffd700;
}

.btn-download-nav {
    background: #ffd700;
    color: #000 !important;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
}

.btn-download-nav:hover {
    background: #ffed4a;
}

/* Hero Section */
.hero {
    margin-top: 80px; /* Pushes hero below the 80px fixed header */
    height: calc(100vh - 80px); /* Fill remaining viewport */
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%), url('../assets/img/hero-bg.jpg');
    background-size: cover;
    background-position: top center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    position: relative;
    border-bottom: 2px solid #ffd700;
}

/* Brighter overlay as requested */
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle, rgba(0,0,0,0) 0%, rgba(0,0,0,0.2) 100%);
    pointer-events: none;
}

.hero p {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 40px;
    max-width: 700px;
    text-shadow: 0 2px 10px rgba(0,0,0,1);
    opacity: 0;
    animation: fadeInUp 1s forwards 0.4s;
    z-index: 1;
    font-weight: 600;
}

.btn-cta {
    display: inline-block;
    background: linear-gradient(to bottom, #ffd700, #b8860b);
    color: #000;
    font-size: 1.2rem;
    font-weight: 900;
    padding: 18px 40px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.4);
    border: 1px solid #8a6d3b;
    transition: all 0.2s;
    opacity: 0;
    animation: fadeInUp 1s forwards 0.6s;
    z-index: 1;
}

.btn-cta:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5);
    color: #000;
}

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

/* Sections General */
section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 60px;
    display: block;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #ffd700;
    margin: 20px auto 0;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* About / Intro */
.intro p {
    font-size: 1.3rem;
    max-width: 900px;
    margin: 0 auto;
    color: #ccc;
    font-weight: 300;
    text-align: center;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #333;
    transition: transform 0.3s, border-color 0.3s;
    background: #000;
}

.gallery-item:hover {
    transform: scale(1.02);
    border-color: #ffd700;
}

/* Factions */
.factions-container {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
    text-align: center;
}

.faction-card {
    flex: 1;
    min-width: 300px;
    background: #0f0f0f;
    border: 1px solid #222;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.faction-card:hover {
    transform: translateY(-15px);
    border-color: #ffd700;
}

.faction-img-container {
    height: 380px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}

.faction-img {
    height: 100%;
    width: 100%;
    object-fit: contain;
    transition: transform 0.5s;
    padding: 20px;
}

.flip-horizontal {
    transform: scaleX(-1);
}

.faction-card:hover .faction-img:not(.flip-horizontal) {
    transform: scale(1.1);
}

.faction-card:hover .faction-img.flip-horizontal {
    transform: scaleX(-1) scale(1.1);
}

.faction-content {
    padding: 30px;
    text-align: center;
    border-top: 1px solid #222;
}

/* View Units Overlay */
.view-units-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: #ffd700;
    font-family: 'Cinzel', serif;
    text-align: center;
    padding: 15px 0;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    border-top: 1px solid #ffd700;
    z-index: 10;
}

.faction-card:hover .view-units-overlay {
    transform: translateY(0);
}

/* Unit Roster & Tooltip */
.unit-roster {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.unit-container {
    position: relative;
}

.unit-thumb {
    width: 54px;
    height: 54px;
    border: 1px solid #333;
    border-radius: 4px;
    background: #000;
    padding: 2px;
    transition: all 0.2s;
    cursor: pointer;
}

.unit-thumb:hover {
    border-color: #ffd700;
    transform: scale(1.1);
}

.unit-name-tag {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffd700;
    color: #000;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 3px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    text-transform: uppercase;
    z-index: 100;
}

.unit-container:hover .unit-name-tag {
    opacity: 1;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-item {
    background: linear-gradient(145deg, #1a1a1a, #111);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #222;
    transition: all 0.3s;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    filter: sepia(100%) hue-rotate(5deg) saturate(200%) drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

/* Download Section */
.download-section {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('../assets/img/hero-bg.jpg');
    background-size: cover;
    background-attachment: fixed;
    text-align: center;
    padding: 120px 20px;
    max-width: 100%;
    margin-top: 40px;
    border-top: 1px solid #333;
}

.download-section p {
    text-align: center;
    margin-bottom: 30px;
}

.system-req {
    margin-top: 30px;
    color: #fff;
    font-size: 0.9rem;
    background: rgba(0,0,0,0.7);
    display: inline-block;
    padding: 15px 30px;
    border-radius: 50px;
    border: 1px solid #ffd700;
}

/* Footer */
footer {
    background: #050505;
    padding: 60px 20px;
    text-align: center;
    border-top: 1px solid #222;
    color: #555;
}

.social-links {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-link:hover {
    color: #ffd700;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        height: 60px;
        padding: 0 20px;
    }
    .hero {
        margin-top: 60px;
        height: calc(100vh - 60px);
    }
    nav {
        display: none;
    }
    .hero p {
        font-size: 1rem;
    }
    .section-title {
        font-size: 2.2rem;
    }
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #0f0f0f;
    margin: 5% auto;
    padding: 0;
    border: 2px solid #ffd700;
    width: 90%;
    max-width: 1000px;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.2);
    position: relative;
    animation: slideIn 0.3s;
}

.modal-header {
    background: linear-gradient(to right, #1a1a1a, #000);
    padding: 20px 30px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 2rem;
    color: #ffd700;
}

.close-modal {
    color: #aaa;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #ffd700;
}

.modal-body {
    padding: 40px;
    max-height: 70vh;
    overflow-y: auto;
}

.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.unit-card {
    background: #151515;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
}

.unit-card:hover {
    border-color: #ffd700;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.unit-card img {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    border-radius: 4px;
    border: 1px solid #444;
}

.unit-card h4 {
    color: #fff;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.unit-card .unit-role {
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 10px;
    font-style: italic;
}

.unit-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #ccc;
    background: #000;
    padding: 5px;
    border-radius: 4px;
}

.stat-item span {
    color: #ffd700;
    font-weight: bold;
}

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

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Creeps Section */
.creeps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.creep-card {
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.creep-card:hover {
    border-color: #ff4500; /* Orange-red for danger/neutral */
    transform: translateY(-5px);
}

.creep-card img {
    width: 64px;
    height: 64px;
    margin: 0 auto 10px;
    border-radius: 50%;
    border: 2px solid #555;
}

.creep-card h4 {
    color: #e0e0e0;
    font-size: 1rem;
    margin-bottom: 5px;
}

.creep-card p {
    font-size: 0.8rem;
    color: #888;
}

/* Gear Section */
.gear-showcase {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.gear-item {
    width: 120px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
}

.gear-item:hover {
    transform: scale(1.1);
    z-index: 10;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.gear-item.epic { border-color: #a335ee; box-shadow: 0 0 5px rgba(163, 53, 238, 0.2); }
.gear-item.rare { border-color: #0070dd; box-shadow: 0 0 5px rgba(0, 112, 221, 0.2); }
.gear-item.uncommon { border-color: #1eff00; box-shadow: 0 0 5px rgba(30, 255, 0, 0.2); }
.gear-item.common { border-color: #9d9d9d; }

.gear-item img {
    width: 100%;
    height: auto;
    margin-bottom: 5px;
}

.gear-item .gear-name {
    font-size: 0.75rem;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Gear Tooltip (Simple CSS implementation or JS-based) */
.gear-item .tooltip {
    visibility: hidden;
    width: 200px;
    background-color: rgba(0,0,0,0.95);
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    border: 1px solid #ffd700;
    pointer-events: none;
}

.gear-item:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.tooltip h5 {
    color: #ffd700;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.tooltip p {
    font-size: 0.75rem;
    margin-bottom: 5px;
    color: #ccc;
}

.tooltip .stats {
    font-size: 0.7rem;
    color: #aaa;
    border-top: 1px solid #444;
    padding-top: 5px;
}

.subsection-title {
    font-size: 1.8rem;
    color: #ffd700;
    margin: 40px 0 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    display: inline-block;
    padding-bottom: 5px;
}
