/* ==========================================================================
   ASURA NEXUS - UNIFIED CSS FRAMEWORK
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABLES & PALETTE (Decentní RGB Systém)
   -------------------------------------------------------------------------- */
:root {
    /* Base Colors */
    --bg-main: #0a0a0c;
    --bg-card: rgba(20, 22, 25, 0.65);
    --bg-card-hover: rgba(30, 32, 36, 0.9);
    --border-light: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.2);
    --text-main: #e0e0e0;
    --text-muted: #8e9297;

    /* Semantic Colors (RGB hodnoty pro dynamickou průhlednost) */
    --rgb-primary: 52, 152, 219;   /* #3498db Blue */
    --rgb-info: 13, 202, 240;      /* #0dcaf0 Cyan */
    --rgb-success: 46, 204, 113;   /* #2ecc71 Green */
    --rgb-warning: 255, 193, 7;    /* #ffc107 Gold/Yellow */
    --rgb-danger: 231, 76, 60;     /* #e74c3c Red */
    --rgb-purple: 155, 89, 182;    /* #9b59b6 Purple */
    --rgb-muted: 108, 117, 125;    /* #6c757d Gray */

    /* Growth Tiers (Mapováno na sémantické barvy) */
    --tier-hatch: var(--rgb-muted);
    --tier-juvie: var(--rgb-success);
    --tier-sub: var(--rgb-primary);
    --tier-adult: var(--rgb-warning);
    --tier-elder: var(--rgb-danger);
}

/* --------------------------------------------------------------------------
   2. GLOBAL STYLES & TYPOGRAPHY
   -------------------------------------------------------------------------- */
body {
    background-color: var(--bg-main);
    background-image: linear-gradient(rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.92)), url("../src/img/nexus_bg.webp");
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 80px;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

/* Typography Helpers */
.font-impact { font-family: 'Impact', 'Arial Black', sans-serif; letter-spacing: 0.5px; }
.text-muted-custom { color: var(--text-muted) !important; }

/* --------------------------------------------------------------------------
   3. UNIFIED COMPONENTS (Karty)
   -------------------------------------------------------------------------- */
/* Master Card Class (Nahradí dino-card, skin-card, game-card atd.) */
.nexus-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.nexus-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.nexus-card-header {
    padding: 12px 15px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nexus-card-body {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.nexus-card-footer {
    padding: 15px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

/* Modifikátory karet pro tier rámečky */
.border-tier-hatch { border-color: rgba(var(--tier-hatch), 0.3); }
.border-tier-hatch:hover { border-color: rgb(var(--tier-hatch)); box-shadow: 0 10px 25px rgba(var(--tier-hatch), 0.2); }
.border-tier-juvie { border-color: rgba(var(--tier-juvie), 0.3); }
.border-tier-juvie:hover { border-color: rgb(var(--tier-juvie)); box-shadow: 0 10px 25px rgba(var(--tier-juvie), 0.2); }
.border-tier-sub { border-color: rgba(var(--tier-sub), 0.3); }
.border-tier-sub:hover { border-color: rgb(var(--tier-sub)); box-shadow: 0 10px 25px rgba(var(--tier-sub), 0.2); }
.border-tier-adult { border-color: rgba(var(--tier-adult), 0.3); }
.border-tier-adult:hover { border-color: rgb(var(--tier-adult)); box-shadow: 0 10px 25px rgba(var(--tier-adult), 0.2); }
.border-tier-elder { border-color: rgba(var(--tier-elder), 0.3); }
.border-tier-elder:hover { border-color: rgb(var(--tier-elder)); box-shadow: 0 10px 25px rgba(var(--tier-elder), 0.2); }

/* Overlays (Zámky) */
.overlay-locked {
    position: absolute; inset: 0;
    background: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(4px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 20;
    text-align: center;
    padding: 20px;
}

/* --------------------------------------------------------------------------
   4. BUTTON SYSTEM (Jemná tlačítka s hover zářením)
   -------------------------------------------------------------------------- */
.btn-nexus {
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 8px 15px;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* Mezera pro ikonku z FontAwesome */
    cursor: pointer;
    background: transparent;
    color: var(--text-main);
}

.btn-nexus:disabled, .btn-nexus.disabled {
    opacity: 0.5; filter: grayscale(1); cursor: not-allowed;
}

.btn-nexus-primary { background: rgba(var(--rgb-primary), 0.15); border-color: rgba(var(--rgb-primary), 0.3); color: rgb(var(--rgb-primary)); }
.btn-nexus-primary:hover:not(:disabled) { background: rgb(var(--rgb-primary)); color: #fff; box-shadow: 0 4px 15px rgba(var(--rgb-primary), 0.4); transform: translateY(-2px); }

.btn-nexus-success { background: rgba(var(--rgb-success), 0.15); border-color: rgba(var(--rgb-success), 0.3); color: rgb(var(--rgb-success)); }
.btn-nexus-success:hover:not(:disabled) { background: rgb(var(--rgb-success)); color: #000; box-shadow: 0 4px 15px rgba(var(--rgb-success), 0.4); transform: translateY(-2px); }

.btn-nexus-warning { background: rgba(var(--rgb-warning), 0.15); border-color: rgba(var(--rgb-warning), 0.3); color: rgb(var(--rgb-warning)); }
.btn-nexus-warning:hover:not(:disabled) { background: rgb(var(--rgb-warning)); color: #000; box-shadow: 0 4px 15px rgba(var(--rgb-warning), 0.4); transform: translateY(-2px); }

.btn-nexus-danger { background: rgba(var(--rgb-danger), 0.15); border-color: rgba(var(--rgb-danger), 0.3); color: rgb(var(--rgb-danger)); }
.btn-nexus-danger:hover:not(:disabled) { background: rgb(var(--rgb-danger)); color: #fff; box-shadow: 0 4px 15px rgba(var(--rgb-danger), 0.4); transform: translateY(-2px); }

.btn-nexus-info { background: rgba(var(--rgb-info), 0.15); border-color: rgba(var(--rgb-info), 0.3); color: rgb(var(--rgb-info)); }
.btn-nexus-info:hover:not(:disabled) { background: rgb(var(--rgb-info)); color: #000; box-shadow: 0 4px 15px rgba(var(--rgb-info), 0.4); transform: translateY(-2px); }

.btn-nexus-purple { background: rgba(var(--rgb-purple), 0.15); border-color: rgba(var(--rgb-purple), 0.3); color: rgb(var(--rgb-purple)); }
.btn-nexus-purple:hover:not(:disabled) { background: rgb(var(--rgb-purple)); color: #fff; box-shadow: 0 4px 15px rgba(var(--rgb-purple), 0.4); transform: translateY(-2px); }

.btn-nexus-dark { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); color: #ccc; }
.btn-nexus-dark:hover:not(:disabled) { background: rgba(255, 255, 255, 0.15); color: #fff; border-color: rgba(255, 255, 255, 0.3); transform: translateY(-2px); }

/* --------------------------------------------------------------------------
   5. NAVIGATION & HEADER
   -------------------------------------------------------------------------- */
.navbar-glass {
    background: rgba(15, 16, 18, 0.8) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.navbar-nav .nav-link, .server-select {
    color: rgba(255, 255, 255, 0.6) !important;
    font-weight: 600; text-transform: uppercase; font-size: 0.85rem;
    transition: all 0.2s ease; border-radius: 6px;
    padding: 8px 16px !important; margin-right: 5px;
}
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active, .server-select:hover {
    color: #fff !important; background: rgba(255, 255, 255, 0.08);
}

.nexus-dropdown-menu {
    background: rgba(20, 22, 25, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

/* Profile / Membership Pill */
.membership-pill {
    display: inline-flex; align-items: center; border-radius: 50px;
    border: 1px solid var(--border-light); background: rgba(0,0,0,0.3);
    padding: 5px 15px; font-weight: 800; font-size: 0.75rem; letter-spacing: 1px;
}
.pill-ruby { color: rgb(var(--rgb-danger)); border-color: rgba(var(--rgb-danger), 0.3); }
.pill-gold { color: rgb(var(--rgb-warning)); border-color: rgba(var(--rgb-warning), 0.3); }
.pill-silver { color: rgb(var(--rgb-muted)); border-color: rgba(var(--rgb-muted), 0.3); }

/* --------------------------------------------------------------------------
   6. MODULE SPECIFIC: IMAGE GALLERIES & AVATARS
   -------------------------------------------------------------------------- */
.img-wrapper {
    aspect-ratio: 4/3; width: 100%; position: relative;
    background: radial-gradient(circle at center, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0) 70%);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.gallery-img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; z-index: 1; transition: opacity 0s linear 1.5s, transform 0.5s ease;
}
.gallery-img.active { opacity: 1; z-index: 2; transition: opacity 1.5s ease-in-out, transform 0.5s ease; }
.nexus-card:hover .gallery-img.active { transform: scale(1.08); }

/* --------------------------------------------------------------------------
   7. UNIFIED MODALS (SweetAlert & Bootstrap)
   -------------------------------------------------------------------------- */
.modal-dark .modal-content, div:where(.swal2-container) .swal2-popup {
    background: rgba(20, 22, 25, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid var(--border-light) !important;
    color: #fff !important;
}
div:where(.swal2-container) .swal2-title { color: #fff !important; }
div:where(.swal2-container) .swal2-html-container { color: #ccc !important; }

/* --------------------------------------------------------------------------
   8. UTILITIES & HELPERS
   -------------------------------------------------------------------------- */
.blur-text { filter: blur(5px); user-select: none; pointer-events: none; }
.ribbon {
    position: absolute; top: 15px; right: -35px; width: 150px; text-align: center;
    font-weight: 800; font-size: 0.7rem; text-transform: uppercase; transform: rotate(45deg); z-index: 10;
    padding: 4px 0; letter-spacing: 1px; box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.ribbon-owned { background: rgb(var(--rgb-warning)); color: #000; }
.content_wrapper { margin-bottom: 2em; }