:root {
    --bg-dark: #0f1115;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --accent-color: #4f46e5;
    --accent-hover: #4338ca;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(15, 17, 21, 0.75), var(--bg-dark)), url('./data/images/backgrounds/barrelsmp.png') center/cover no-repeat;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid var(--card-border);
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #9ca3af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* Cards & Layout */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

/* Server Subpage Tags */
.network-tags {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag-link {
    text-decoration: none;
}

.tag {
    background: rgba(79, 70, 229, 0.12);
    border: 1px solid rgba(79, 70, 229, 0.3);
    color: #a5b4fc;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.95rem;
    display: inline-block;
    transition: all 0.2s ease;
}

.tag-link:hover .tag {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Staff Grid */
.section-staff {
    margin-bottom: 40px;
}

.grid-staff {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.staff-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.staff-card h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.staff-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* History Section */
.history-content p {
    margin-bottom: 20px;
    color: #d1d5db;
    text-align: justify;
}

.history-author {
    display: block;
    margin-top: 20px;
    font-style: italic;
    color: #818cf8;
}

/* True Visual Gallery Grid */
.gallery-section {
    margin-bottom: 40px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--card-border);
    transition: transform 0.2s ease, border-color 0.2s ease;
    background: #161920;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 20%, rgba(0,0,0,0.2));
    display: flex;
    align-items: flex-end;
    padding: 15px;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.gallery-overlay span {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}

.gallery-item:hover {
    transform: scale(1.02);
    border-color: var(--accent-color);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(79, 70, 229, 0.8) 10%, rgba(0,0,0,0.3));
}

/* Players List */
.badge {
    background: var(--accent-color);
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
}

#playerSearch {
    width: 100%;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: white;
    margin-bottom: 20px;
}

.players-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.players-list span {
    background: rgba(255,255,255,0.05);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Modal Universals */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #161920;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

/* Lightbox Dynamic Popup */
.lightbox-content {
    max-width: 85%;
    max-height: 85%;
    text-align: center;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 8px;
    border: 2px solid var(--card-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#lightboxCaption {
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.close-btn {
    position: absolute;
    right: 20px; top: 15px;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}

.lightbox-content .close-btn {
    right: -30px;
    top: -30px;
    color: white;
    font-size: 2.5rem;
}

.close-btn:hover {
    color: white;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    background: #0f1115;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    color: white;
}

footer {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    border-top: 1px solid var(--card-border);
}


/* ============================= */
/* Sub-page (server) hero + page */
/* ============================= */

.hero-page {
    height: 42vh;
    background-image: linear-gradient(rgba(15, 17, 21, 0.75), var(--bg-dark)), var(--hero-img);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-page .hero-content {
    max-width: 700px;
    padding: 0 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #a5b4fc;
}

.hero-page h1 {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    background: linear-gradient(to right, #fff, #9ca3af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0;
}

.section-intro p {
    color: #d1d5db;
    text-align: justify;
}

.coming-soon {
    color: var(--text-muted);
    font-style: italic;
    padding: 10px 0 4px;
}