/* Global Reset & Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-body: #090b10;
    --bg-sidebar: rgba(22, 27, 34, 0.7);
    --bg-card: rgba(33, 38, 45, 0.6);
    --bg-input: rgba(48, 54, 61, 0.5);

    --border-color: rgba(255, 255, 255, 0.1);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);

    --text-main: #f0f6fc;
    --text-muted: #8b949e;

    /* GANG THEME: Premium Red */
    --primary: #E53935;
    --primary-hover: #C62828;
    --primary-glow: rgba(229, 57, 53, 0.4);

    --accent-gradient: linear-gradient(135deg, #E53935 0%, #FF5252 100%);
    --card-gradient: linear-gradient(180deg, rgba(33, 38, 45, 0.8) 0%, rgba(22, 27, 34, 0.95) 100%);

    --danger: #D32F2F;
    --success: #388E3C;
    --warning: #faa61a;

    --sidebar-width: 280px;
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-body);
    /* Subtle mesh gradient background */
    background-image:
        radial-gradient(circle at 15% 50%, rgba(88, 101, 242, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(160, 110, 225, 0.08) 0%, transparent 25%);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: var(--glass-border);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding: 30px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 40px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
    text-shadow: 0 0 20px rgba(88, 101, 242, 0.3);
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    transform: translateX(4px);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(88, 101, 242, 0.15), transparent);
    color: #fff;
    border-left: 3px solid var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.nav-category {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    margin: 28px 0 12px 18px;
    opacity: 0.45;
}

/* User Profile in Sidebar */
.sidebar-footer {
    border-top: var(--glass-border);
    padding-top: 20px;
    margin-top: auto;
}

.user-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 60px;
    width: calc(100% - var(--sidebar-width));
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #b4b4b4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: #fff;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
}

p {
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.7;
}

/* Glass Cards */
.card,
.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.stat-card:hover {
    transform: translateY(-8px);
    border-color: rgba(88, 101, 242, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(88, 101, 242, 0.1);
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 15px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    opacity: 0.8;
}

/* Forms */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

input[type="text"],
input[type="number"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 14px 18px;
    background-color: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.5);
}

.btn:active {
    transform: scale(0.98);
}

.btn-danger {
    background: var(--danger);
    box-shadow: 0 4px 15px rgba(218, 54, 51, 0.3);
}

.btn-danger:hover {
    background: #c03532;
    box-shadow: 0 8px 25px rgba(218, 54, 51, 0.5);
}

/* Lists */
.list-item {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.list-item:last-child {
    border-bottom: none;
}

/* Badges */
.badge {
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-BAN {
    background: rgba(218, 54, 51, 0.15);
    color: #ff7b72;
    border: 1px solid rgba(218, 54, 51, 0.3);
}

.badge-KICK {
    background: rgba(250, 166, 26, 0.15);
    color: #ffd666;
    border: 1px solid rgba(250, 166, 26, 0.3);
}

.badge-MUTE {
    background: rgba(88, 101, 242, 0.15);
    color: #9cb6ff;
    border: 1px solid rgba(88, 101, 242, 0.3);
}

.badge-WARN {
    background: rgba(139, 148, 158, 0.15);
    color: #c9d1d9;
    border: 1px solid rgba(139, 148, 158, 0.3);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    /* Changed from block to flex for centering */
    opacity: 1;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    width: 600px;
    /* Wider for tables */
    max-width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    background: linear-gradient(145deg, rgba(33, 38, 45, 0.95) 0%, rgba(22, 27, 34, 0.95) 100%);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

/* Mission Grid & Card */
.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.mission-card {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.mission-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.mission-card::after {
    content: 'Detaylar için tıkla';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.mission-card:hover::after {
    opacity: 1;
}