/* Evolution Roleplay - FiveM Design System */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables - Evolution RP Palett */
:root {
    /* Nya Blå Paletten */
    --bg-darker: #1e2a5a;
    /* Mörkaste bakgrunden */
    --bg-dark: #1f2e6b;
    /* Kort/Sektioner bakgrund */
    --primary-blue: #273e92;
    /* Mellanblå */
    --primary-blue-light: #304fbe;
    /* Accent/Knappar */
    --primary-hover: #304eaf;
    /* Hover state */
    --accent-blue-deep: #23388b;
    /* Djup accent */

    --accent-gold: #fbbf24;
    /* Behåller guld för status/viktigt */

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #e0e7ff;
    /* Lätt blåtonad vit */
    --text-muted: #a5b4fc;

    /* Utility */
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;

    /* Spacing & Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;

    /* Glassmorphism overrides */
    --bg-card: rgba(31, 46, 107, 0.7);
    /* Baserad på #1f2e6b */
    --glass-border: rgba(48, 79, 190, 0.3);
}

/* CUSTOM SCROLLBAR */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
    /* Mörk bakgrund */
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-blue), var(--primary-blue-light));
    border-radius: 5px;
    border: 2px solid rgba(15, 23, 42, 0.6);
    /* Creates padding effect */
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Firefox support */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-blue) rgba(15, 23, 42, 0.6);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--bg-darker) 0%, #151e40 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(48, 79, 190, 0.15) 0%, transparent 60%);
    animation: rotate 40s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(48, 79, 190, 0.5);
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Inputs & Textareas - Premium Design */
input,
select,
textarea {
    width: 100%;
    padding: 1rem 1.25rem !important;
    background: rgba(15, 23, 42, 0.45) !important;
    border: 1px solid rgba(165, 180, 252, 0.15) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-primary) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 1rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    backdrop-filter: blur(5px);
}

input::placeholder,
textarea::placeholder {
    color: rgba(224, 231, 255, 0.4);
}

input:hover,
select:hover,
textarea:hover {
    background: rgba(15, 23, 42, 0.6) !important;
    border-color: rgba(165, 180, 252, 0.3) !important;
}

input:focus,
select:focus,
textarea:focus {
    outline: none !important;
    background: rgba(15, 23, 42, 0.75) !important;
    border-color: var(--primary-blue-light) !important;
    box-shadow: 0 0 0 4px rgba(48, 79, 190, 0.25), 0 0 15px rgba(48, 79, 190, 0.2) !important;
    transform: translateY(-1px);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Custom Select styling fix */
select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23e0e7ff'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    background-size: 1rem;
    padding-right: 3rem !important;
}

select option {
    background: #1e2a5a;
    color: white;
    padding: 10px;
}

/* Buttons */
.btn {
    padding: 0.875rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary-blue-light);
    color: white;
    box-shadow: 0 4px 14px rgba(48, 79, 190, 0.4);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(48, 79, 190, 0.6);
}

.btn-accent {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-full {
    width: 100%;
}

/* Navbar */
.navbar {
    background: rgba(31, 46, 107, 0.9);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.dashboard-card {
    background: linear-gradient(160deg, rgba(39, 62, 146, 0.4), rgba(31, 46, 107, 0.6));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-align: center;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    background: linear-gradient(160deg, rgba(48, 79, 190, 0.5), rgba(39, 62, 146, 0.7));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-blue-light);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

/* Rules Section */
.rules-container {
    counter-reset: rule-section;
}

.rule-section {
    margin-bottom: 2rem;
}

.rule-section h2 {
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-blue);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.rule-list {
    list-style: none;
    counter-reset: rule-item;
}

.rule-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary-blue-light);
}

.rule-title {
    font-weight: 700;
    color: white;
    display: block;
    margin-bottom: 0.25rem;
}

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-box {
    width: 100%;
    max-width: 450px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

th {
    background: rgba(35, 56, 139, 0.5);
    padding: 1rem;
    text-align: left;
    color: var(--text-muted);
}

td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mt-3 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.alert-info {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Character Counter */
.char-count {
    text-align: right;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.char-count.valid {
    color: #10b981;
    /* Green */
}

.char-count.invalid {
    color: #ef4444;
    /* Red */
}