/* --- RESET & VARIABLES --- */
:root {
    --primary: #2ecc71;
    --primary-dark: #27ae60;
    --secondary: #3498db;
    --dark-bg: #1a1a1a;
    --darker-bg: #121212;
    --card-bg: #252525;
    --text-light: #ecf0f1;
    --text-primary: #ecf0f1;
    --text-muted: #bdc3c7;
    --nav-height: 80px; /* Zväčšená výška pre lepší vzhľad */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* --- NAVBAR --- */
.navbar {
    background: rgba(18, 18, 18, 0.8); /* Viac priehľadné */
    height: var(--nav-height);
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(15px); /* Silnejší blur efekt */
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px; /* Širší kontajner */
    padding: 0 40px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-logo-img img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(46, 204, 113, 0.3));
    transition: transform 0.3s;
}

.nav-logo-img:hover img {
    transform: scale(1.1) rotate(5deg);
}

/* Server Status Widget v Navbare */
.nav-status {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 20px;
    border-radius: 12px; /* Hranatejšie pre lepší look vedľa loga */
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.nav-status:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(46, 204, 113, 0.3);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
    animation: pulse-dot 2s infinite;
}

.status-dot.online {
    background-color: var(--primary);
    color: var(--primary);
}

.status-dot.offline {
    background-color: #e74c3c;
    color: #e74c3c;
    animation: none; /* Bez animácie keď je offline */
}

.status-dot.orange {
    background-color: #f39c12;
    color: #f39c12;
    animation: none;
}

@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.status-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.status-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}

.player-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
    position: relative;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.dropdown-toggle:hover {
    color: var(--text-light);
}

.dropdown-toggle i {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px); /* Medzera pod toggle */
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--card-bg);
    min-width: 220px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    z-index: 1000;
}

/* Neviditeľná hover zóna medzi toggle a menu - pokrýva medzeru */
.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    height: 15px;
    background: transparent;
}

.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Metrics dropdown NEPOUŽÍVA hover, len active triedu */
/* Metrics dropdown NEPOUŽÍVA hover, len active triedu - vypnúť hover úplne */
.metrics-dropdown:hover .dropdown-menu {
    display: none !important;
}

.metrics-dropdown.active .dropdown-menu {
    display: block !important;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.2s;
}

.dropdown-menu a:hover {
    background: rgba(46, 204, 113, 0.1);
    color: var(--primary);
    padding-left: 18px;
}

.dropdown-menu a i {
    margin-right: 12px;
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 10px;
}

.user-name {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-name i {
    color: var(--primary);
}

.nav-links a:not(.btn-nav-login):not(.dropdown-toggle)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:not(.btn-nav-login):not(.dropdown-toggle):hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-light);
}

.dropdown.active .dropdown-toggle {
    color: var(--primary);
}

.btn-nav-login {
    background: linear-gradient(135deg, var(--secondary), #2980b9);
    padding: 10px 24px;
    border-radius: 50px; /* Pill shape */
    color: white !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-nav-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
}

/* --- HERO SECTION --- */
.hero-section {
    height: 85vh; /* Trochu vyšší */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: url('https://i.ibb.co/PztKyqMv/2024-01-27-22-05-07.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), var(--dark-bg)); /* Mierne svetlejší gradient */
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-logo {
    width: 320px;
    max-width: 85%;
    height: auto;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.2));
}

/* Starý status box skrytý, keďže je v navbare */
.server-status-box {
    display: none; 
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.1;
    letter-spacing: -1px;
    background: linear-gradient(45deg, #ffffff, #bdc3c7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 40px;
    font-weight: 400;
}

/* IP Widget - Moderný */
.ip-widget {
    display: flex;
    align-items: center;
    background: rgba(20, 20, 20, 0.6);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 40px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.ip-widget:hover {
    transform: scale(1.02);
    border-color: rgba(46, 204, 113, 0.5);
}

.ip-text {
    padding: 15px 25px;
    font-family: 'JetBrains Mono', monospace; /* Modernejší font ak je dostupný, inak monospace */
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 1px;
}

.copy-btn {
    background: transparent;
    border: none;
    color: #fff;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 1.2rem;
    border-left: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
}

.copy-btn:hover { background: transparent; color: var(--primary); }
.copy-btn.copied { background: var(--primary); color: white; border-left-color: var(--primary); }

/* Buttons */
.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 14px 35px;
    border-radius: 12px; /* Modern rounded corners but not pills */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary);
    color: #1a1a1a; /* Tmavý text pre lepší kontrast na zelenej */
    box-shadow: 0 4px 20px rgba(46, 204, 113, 0.3);
}

.btn-primary:hover {
    background: #2ecc71;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.5);
}

.btn-discord {
    background: rgba(88, 101, 242, 0.2);
    border: 1px solid #5865F2;
    color: #fff;
    backdrop-filter: blur(5px);
}

.btn-discord:hover {
    background: #5865F2;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.4);
}

/* Pulse Animation */
.pulse { animation: pulse-animation 2s infinite; }
@keyframes pulse-animation {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

/* --- MAIN CONTENT --- */
.main-container {
    max-width: 1200px;
    margin: -50px auto 0; /* Posun obsahu hore cez hero banner */
    padding: 0 20px 50px;
    position: relative;
    z-index: 10;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    padding-top: 50px;
}

.section-header h2 {
    font-size: 2.2rem;
    white-space: nowrap;
    color: var(--text-light);
    font-weight: 800;
}

.section-line {
    height: 3px;
    background: linear-gradient(90deg, var(--primary), transparent);
    width: 100%;
    border-radius: 3px;
    opacity: 0.5;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.news-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border-color: rgba(46, 204, 113, 0.3);
}

.news-image {
    height: 220px;
    background: #2a2a2a;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.news-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(37, 37, 37, 0.8));
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.news-meta i { color: var(--primary); margin-right: 5px; }

.news-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-light);
    font-weight: 700;
    line-height: 1.3;
}

.news-content p {
    font-size: 1rem;
    color: #a0a0a0;
    margin-bottom: 25px;
    line-height: 1.6;
    flex-grow: 1;
}

.read-more {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
}

.read-more:hover { color: var(--primary); gap: 10px; }

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    text-align: left;
    padding: 40px;
    background: linear-gradient(145deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s;
}

.feature-card:hover {
    border-color: var(--primary);
    background: linear-gradient(145deg, rgba(46, 204, 113, 0.1), rgba(255,255,255,0.01));
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 25px;
    background: rgba(46, 204, 113, 0.1);
    padding: 15px;
    border-radius: 12px;
    display: inline-block;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* --- FOOTER --- */
footer {
    background: var(--darker-bg);
    padding: 80px 0 30px;
    margin-top: 80px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
    padding: 0 20px 50px;
}

.footer-section h3 {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.footer-section p { color: var(--text-muted); line-height: 1.8; }

.footer-section ul li { margin-bottom: 12px; }
.footer-section a { color: #888; font-weight: 500; }
.footer-section a:hover { color: var(--primary); padding-left: 5px; }

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    color: #fff;
    font-size: 1.2rem;
    padding-left: 0 !important; /* Override previous padding hover */
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: #666;
    font-size: 0.9rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .nav-links { gap: 20px; }
    .nav-container { padding: 0 20px; }
    .hero-content h1 { font-size: 3rem; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* .nav-status { display: none; }  Už neskrývame status na mobile, keďže je namiesto loga */
    .nav-status {
        padding: 6px 12px; /* Menší padding na mobile */
    }
    .status-text {
        font-size: 0.8rem;
    }
    .player-count {
        font-size: 0.75rem;
    }
    
    .nav-links { display: none; }
    .nav-toggle { display: block; cursor: pointer; }
    
    .nav-toggle .bar {
        display: block;
        width: 28px;
        height: 3px;
        margin: 6px auto;
        transition: all 0.3s ease-in-out;
        background-color: var(--text-light);
        border-radius: 2px;
    }

    .hero-content h1 { font-size: 2.5rem; }
    .features-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; gap: 40px; }
    
    .server-status-box { display: inline-flex; } /* Zobraziť status v hero na mobile */
}

/* --- ADMIN STYLES (Shared across admin pages) --- */

/* Filters Bar */
.filters-bar {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.filter-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    width: auto !important; /* Override globálne width: 100% */
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: white;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s;
}

.filter-form select {
    flex: 1;
    min-width: 200px;
    width: auto !important;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ecf0f1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px;
}

.filter-form select:hover {
    background: rgba(255,255,255,0.15);
}

.filter-form select option {
    background: var(--card-bg);
    color: var(--text-light);
    padding: 10px;
}

.filter-form input[type="text"]:focus,
.filter-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.admin-table th {
    background: rgba(0,0,0,0.2);
    font-weight: 600;
    color: var(--text-muted);
}

.table-responsive {
    overflow-x: auto;
}

/* Badges */
.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
}

.badge-new {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.badge-approved {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.badge-rejected {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.badge-ban {
    background: rgba(0, 0, 0, 0.5);
    color: #aaa;
    border: 1px solid #555;
}

/* Simple badge variant (for roles) */
.badge:not([class*="badge-"]) {
    background: rgba(255,255,255,0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
    font-weight: 400;
}

/* Action Buttons */
.btn-action {
    color: var(--text-light);
    background: rgba(255,255,255,0.1);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.btn-action:hover {
    background: var(--primary);
    color: #000;
}

/* --- AUTH & FORM STYLES --- */

/* Auth Container / Box */
.auth-box {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.auth-container {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-light);
    font-size: 2rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-weight: 500;
}

.form-group .required {
    color: #e74c3c;
}

/* Form Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

/* Input with Icon */
.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 1;
}

.input-with-icon input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert.success {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid var(--primary);
    color: var(--primary);
}

.alert.error {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    color: #e74c3c;
}

.alert-success {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Auth Footer */
.auth-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* --- DETAIL / SHOW PAGES --- */

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.detail-card,
.action-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.info-group {
    margin-bottom: 20px;
}

.info-group label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: block;
}

.info-group .value {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
}

.code {
    font-family: monospace;
    background: rgba(0,0,0,0.3);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.message-box {
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 8px;
    font-style: italic;
    line-height: 1.6;
    color: #ddd;
}

.status-select {
    width: 100%;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #fff;
    margin-bottom: 10px;
}

.btn-back {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
}

.btn-back:hover {
    color: var(--primary);
}

/* --- PERMISSIONS PAGE --- */

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

.permission-category {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.permission-category h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--secondary);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.permission-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
    user-select: none;
}

.permission-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    transition: all 0.2s;
}

.permission-item:hover input ~ .checkmark {
    background-color: rgba(255,255,255,0.1);
}

.permission-item input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.permission-item input:checked ~ .checkmark:after {
    display: block;
}

.permission-item .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.perm-info {
    display: flex;
    flex-direction: column;
}

.perm-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
}

.perm-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.form-actions {
    margin-top: 30px;
    display: flex;
    gap: 20px;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .permissions-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .filter-form input[type="text"],
    .filter-form select {
        min-width: 100%;
    }
}

/* --- METRICS PAGE --- */
.metrics-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.metrics-grid .admin-card {
    width: 100%;
}

.chart-container {
    position: relative; 
    height: 300px; 
    width: 100%;
}

.admin-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: visible;
    border: 1px solid rgba(255,255,255,0.05);
}

.admin-card-body {
    overflow: visible !important;
    padding: 20px;
}

.admin-card-header {
    background: rgba(0,0,0,0.2);
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.admin-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Metrics specific buttons - prepíšu globálne ak sú potrebné */
.metrics-dropdown .btn-primary,
.metrics-dropdown .btn-secondary {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.metrics-dropdown .btn-secondary {
    background: rgba(255,255,255,0.1);
    color: var(--text-light);
    border: 1px solid rgba(255,255,255,0.1);
}

.metrics-dropdown .btn-secondary:hover {
    background: rgba(255,255,255,0.15);
}

.metrics-dropdown .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.quick-filter-btn {
    background: rgba(255,255,255,0.05);
    color: var(--text-light);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-filter-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--primary);
}

/* Metrics Dropdown - prepíše globálne dropdown štýly */
.metrics-dropdown {
    position: relative;
    z-index: 10;
}

.metrics-dropdown .dropdown-toggle {
    /* Reset globálnych štýlov */
    position: static;
    transform: none;
}

.metrics-dropdown .dropdown-menu {
    /* Prepíše globálne dropdown-menu štýly */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    transform: none !important; /* Prepíše globálny transform */
    z-index: 10000;
    min-width: 180px;
    width: 100%;
    padding: 5px 0;
    margin-top: 0;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    display: none;
}

/* Zabezpečiť, že dropdown nie je orezaný */
#metricsFilterForm {
    overflow: visible !important;
}

.metrics-dropdown .dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 15px;
    clear: both;
    font-weight: 400;
    color: var(--text-primary);
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.metrics-dropdown .dropdown-item:hover {
    background-color: rgba(255,255,255,0.1);
    padding-left: 15px; /* Reset globálneho padding-left */
}

.metrics-dropdown .dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid rgba(255,255,255,0.1);
}
