:root {
    --color-bg: #0D0D10;
    --color-surface-1: #1C1C1E;
    --color-surface-2: #2D2D2F;
    --color-surface-3: #373739;
    --color-text-primary: #E0E0E0;
    --color-text-secondary: #9CA3AF;
    --color-accent-primary: #bf95f9;
    --color-accent-secondary: #d1b1fb;
    --color-accent-glow: rgba(191, 149, 249, 0.2);
    /* --- FIX: Corrected typo (was 0.45) --- */
    --color-accent-glow-strong: rgba(191, 149, 249, 0.4);
    --color-danger: #F87171; /* red-400 */
    --color-danger-hover: #EF4444; /* red-500 */
    --color-maintenance: #FBBF24; /* amber-400 */
    --color-warning: #FBBF24; /* NEW: amber-400 */
    --color-success: #22C55E; /* NEW: green-500 */
    --color-success-glow: rgba(34, 197, 94, 0.2); /* NEW: green glow */
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Orbitron', sans-serif;
    --font-mono: 'Roboto Mono', monospace;

    /* --- NEW: Application Colors --- */
    --color-app-staff: #95f9c5;
    --color-app-staff-glow: rgba(149, 249, 197, 0.3);
    --color-app-dev: #f5f995;
    --color-app-dev-glow: rgba(245, 249, 149, 0.3);
    --color-app-pd: #3f61bd;
    --color-app-pd-glow: rgba(63, 97, 189, 0.3);
    /* NEW: Add strong glow variables */
    --color-app-staff-glow-strong: rgba(149, 249, 197, 0.4);
    --color-app-dev-glow-strong: rgba(245, 249, 149, 0.4);
    --color-app-pd-glow-strong: rgba(63, 97, 189, 0.4);
    /* NEW: Medic and Gang Colors */
    --color-app-md: #ca1e44;
    --color-app-md-glow: rgba(202, 30, 68, 0.3);
    --color-app-md-glow-strong: rgba(202, 30, 68, 0.4);
    --color-app-gang: #86a1b1;
    --color-app-gang-glow: rgba(200, 200, 200, 0.3);
    --color-app-gang-glow-strong: rgba(220, 220, 220, 0.4);

    /* --- NEW: Subscription Colors --- */
    --color-emerald: #10B981;
    --color-emerald-glow: rgba(16, 185, 129, 0.3);
    --color-platinum: #9CA3AF;
    --color-platinum-glow: rgba(156, 163, 175, 0.3);
    --color-diamond: #38BDF8;
    --color-diamond-glow: rgba(56, 189, 248, 0.3);
}

/* --- Global Styles --- */
body {
    background-color: var(--color-bg);
    font-family: var(--font-primary);
    color: var(--color-text-primary);
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Futuristic background effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(191, 149, 249, 0.1), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.font-orbitron {
    font-family: var(--font-secondary);
}

/* --- Text Animation --- */
.animated-text-gradient {
    background-image: linear-gradient(90deg, var(--color-accent-secondary), #ffffff, var(--color-accent-secondary));
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: text-gradient-shimmer 3s ease-in-out infinite;
}

@keyframes text-gradient-shimmer {
    0% { background-position: 200% center; }
    100% { background-position: 0% center; }
}

/* --- NEW: Tier Name Animations --- */
.tier-name-animated {
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: text-gradient-shimmer 3s ease-in-out infinite;
}
.tier-name-emerald {
    background-image: linear-gradient(90deg, #10B981, #ffffff, #10B981);
}
.tier-name-platinum {
    background-image: linear-gradient(90deg, #9CA3AF, #ffffff, #9CA3AF);
}
.tier-name-diamond {
    background-image: linear-gradient(90deg, #38BDF8, #ffffff, #38BDF8);
}


/* --- NEW: Icon Animations --- */
.icon-pulse {
    animation: pulse-red 2s infinite ease-in-out;
}
@keyframes pulse-red {
    0% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
        text-shadow: 0 0 15px var(--color-danger);
    }
    100% {
        opacity: 0.7;
        transform: scale(1);
    }
}

/* --- Dashboard Layout --- */
.sidebar {
    background-color: rgba(28, 28, 30, 0.8); /* Slightly transparent */
    border-right: 1px solid var(--color-surface-2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

/* --- FIX: Only apply hover on devices that support it (not touch) --- */
@media (hover: hover) {
    .sidebar-link:hover {
        background-color: var(--color-surface-2);
        color: white;
    }
}

.sidebar-link.active {
    background-color: var(--color-surface-3);
    color: white;
    border-left-color: var(--color-accent-primary);
    box-shadow: 0 0 15px var(--color-accent-glow);
}

.sidebar-link .sidebar-icon {
    font-size: 18px; /* ~18px, good default */
    width: 20px; /* To keep the space consistent */
    height: 20px; /* To keep the space consistent */
    margin-right: 12px;
    text-align: center; /* Center icon within the fixed width */
    line-height: 20px; /* Align icon vertically */
}


.top-bar {
    background-color: rgba(28, 28, 30, 0.8); /* Slightly transparent */
    border-bottom: 1px solid var(--color-surface-2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Search bar */
.top-bar input[type="text"] {
    background-color: var(--color-surface-2);
    border: 1px solid var(--color-surface-2);
    transition: all 0.3s ease;
}
.top-bar input[type="text"]:focus {
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 10px var(--color-accent-glow);
}

.main-content {
    background-color: transparent; /* Let body bg show through */
}

/* Hide all pages by default */
.page {
    display: none;
    animation: fadeIn 0.5s ease;
}
.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Glass Card --- */
.glass-card {
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.6), rgba(28, 28, 30, 0.3));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--color-surface-2);
    box-shadow: 0 0 25px var(--color-accent-glow);
    animation: pulse-glow 3s infinite ease-in-out;
    transition: all 0.3s ease;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 25px var(--color-accent-glow); border-color: var(--color-surface-2); }
    50% { box-shadow: 0 0 35px var(--color-accent-glow-strong); border-color: var(--color-accent-glow-strong); }
    100% { box-shadow: 0 0 25px var(--color-accent-glow); border-color: var(--color-surface-2); }
}

/* --- Button Icons --- */
.icon {
    width: 20px;
    height: 20px;
    font-size: 20px; /* Added */
    line-height: 1; /* Added */
    text-align: center; /* Added */
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}
.icon.icon-check {
    color: white;
    font-size: 18px;
    stroke-width: 2.5;
}


/* --- Whitelist Card States --- */
#whitelist-step-1, #whitelist-step-2, #whitelist-step-pending, 
#whitelist-step-denied, #whitelist-step-denied-final, 
#whitelist-step-banned {
    display: none; /* All cards hidden by default */
}

/* --- Button Styles --- */
.btn-primary {
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
    box-shadow: 0 0 10px var(--color-accent-glow), inset 0 0 5px var(--color-accent-glow);
    transition: all 0.3s ease;
    transform: perspective(100px); /* Add perspective for 3D effect */
    background-color: var(--color-accent-primary);
    color: black;
    font-weight: 600;
    padding: 12px;
    border: 1px solid var(--color-accent-primary);
}
.btn-primary:hover {
    box-shadow: 0 0 20px var(--color-accent-glow-strong), inset 0 0 10px var(--color-accent-glow-strong);
    transform: translateY(-2px) translateZ(2px); /* Slight 3D lift */
    text-shadow: 0 0 10px var(--color-accent-primary);
    background-color: var(--color-accent-secondary);
}
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled,
.btn-disabled {
    background-color: var(--color-surface-3) !important;
    color: var(--color-text-secondary) !important;
    border-color: var(--color-surface-3) !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: 0.7;
}

/* Secondary Button */
.btn-secondary {
    background-color: var(--color-surface-3);
    color: var(--color-text-primary);
    border: 1px solid var(--color-surface-3);
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.btn-secondary:hover {
    background-color: var(--color-surface-2);
    border-color: var(--color-surface-3);
}

/* Danger Button */
.btn-danger {
    background-color: var(--color-danger);
    color: black;
    border: 1px solid var(--color-danger);
    font-weight: 600;
    padding: 8px 16px;
    transition: all 0.2s ease;
    text-shadow: 0 0 5px rgba(0,0,0,0.3);
}
.btn-danger:hover {
    background-color: var(--color-danger-hover);
    border-color: var(--color-danger-hover);
}

/* Specific Button Colors */
#support-discord-link {
     background-color: var(--color-accent-primary);
     color: black;
     border: 1px solid var(--color-accent-primary);
}
#support-discord-link:hover {
     background-color: var(--color-accent-secondary);
}

#btn-steam {
    border: 1px solid var(--color-surface-3); /* Start with a subtle border */
    background-color: var(--color-surface-3);
    color: white;
    text-shadow: none;
    box-shadow: none;
}
#btn-steam:not(:disabled):hover {
    border-color: var(--color-accent-primary);
    background-color: var(--color-surface-2);
    transform: translateY(-2px) translateZ(2px);
    box-shadow: 0 0 20px var(--color-accent-glow-strong);
}

#btn-discord {
    border: 1px solid var(--color-accent-primary);
}

/* Special class for connected button */
.btn-connected {
    background-color: #22c55e;
    color: white;
    opacity: 0.7;
    cursor: not-allowed;
    border: 1px solid #22c55e;
    box-shadow: none;
    transform: none;
}
.btn-connected:hover {
    transform: none;
    box-shadow: none;
    text-shadow: none;
}

/* --- Form Inputs --- */
.form-input {
    background-color: var(--color-surface-2);
    border: 1px solid var(--color-surface-3);
    color: white;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 1rem;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.form-input:focus {
    outline: none;
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 10px var(--color-accent-glow);
}
.form-input::placeholder { color: #888; }

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%<path stroke='%239CA3AF' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* NEW: File Input */
.form-file-input {
    background-color: var(--color-surface-2);
    border: 1px solid var(--color-surface-3);
    color: var(--color-text-secondary); /* Placeholder-like text */
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 1rem;
    transition: all 0.2s ease;
    width: 100%;
}
.form-file-input:hover {
    border-color: var(--color-surface-3);
}
.form-file-input:focus {
    outline: none;
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 10px var(--color-accent-glow);
}
/* Style the file chooser button */
.form-file-input::file-selector-button {
    background-color: var(--color-surface-3);
    color: var(--color-text-primary);
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    margin-right: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.form-file-input::file-selector-button:hover {
    background-color: var(--color-accent-primary);
    color: black;
}


/* Keybinds & Rules Styling */
.content-box {
    background-color: var(--color-surface-1);
    border-radius: 12px;
    border: 1px solid var(--color-surface-2);
    transition: all 0.3s ease;
}
.content-box:hover {
    transform: translateY(-2px);
    border-color: var(--color-surface-3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.keybind {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--color-surface-2);
}
.keybind:last-child {
    border-bottom: none;
}
.key {
    background-color: var(--color-surface-3);
    color: var(--color-text-primary);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9em;
    border-bottom: 2px solid #222;
    font-family: var(--font-mono);
}

/* --- NEW: Rules Formatting --- */
.rule-item {
    direction: rtl; /* Right-to-left for Farsi */
    /* --- NEW: Added content-box styles --- */
    background-color: var(--color-surface-1);
    border-radius: 12px;
    border: 1px solid var(--color-surface-2);
    transition: all 0.3s ease;
    padding: 1rem 1.5rem;
}
.rule-item:hover {
    transform: translateY(-2px);
    border-color: var(--color-surface-3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.rule-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
    text-align: center; /* Center titles */
}
.rule-item p {
    color: var(--color-text-secondary);
    font-size: 1.1rem; /* Larger font */
    line-height: 1.8; /* More spacing */
    text-align: right; /* Right-align text */
}
.rule-item ul, .rule-item ol {
    margin-right: 1.5rem; /* Indent lists */
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}
.rule-item ul {
    list-style-type: disc;
}
.rule-item ol {
    list-style-type: decimal;
}
.rule-item li {
    margin-bottom: 0.5rem;
}
/* Ban Class Colors */
.ban-a { color: #F87171; font-weight: 600; } /* red-400 */
.ban-b { color: #FBBF24; font-weight: 600; } /* amber-400 */
.ban-c { color: #F97316; font-weight: 600; } /* orange-500 */
.ban-d { color: #EF4444; font-weight: 600; } /* red-500 */
.ban-a-b { color: #F87171; font-weight: 600; }
.ban-a-c { color: #F87171; font-weight: 600; }
.ban-a-d { color: #F87171; font-weight: 600; }
.ban-b-c { color: #FBBF24; font-weight: 600; }

.rule-date {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    font-style: italic;
    margin-top: 8px;
    opacity: 0.7;
    text-align: right; /* Align date to right */
}

/* Stats / Character Detail Styling */
.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-surface-2);
}
.stat-item:last-child { border-bottom: none; }
.stat-label { color: var(--color-text-secondary); }
.stat-value { 
    color: white; 
    font-weight: 500; 
    font-family: var(--font-mono);
}
.stat-value.highlight { 
    color: var(--color-accent-primary); 
    font-weight: 600;
    text-shadow: 0 0 5px var(--color-accent-glow);
}

/* --- My Profile Page --- */
.account-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-surface-2);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--color-surface-3);
    margin-top: 1rem;
}
.danger-zone {
    border: 1px solid var(--color-danger);
    border-radius: 12px;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

/* NEW: Pending Zone Style */
.pending-zone {
    border: 1px solid var(--color-warning);
    border-radius: 12px;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.05));
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
}

/* *** NEW: Success Zone Style (for Whitelisted) *** */
.success-zone {
    border: 1px solid var(--color-success);
    border-radius: 12px;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
    box-shadow: 0 0 20px var(--color-success-glow);
}


/* --- *** NEW: Empty Character Slot Style *** --- */
.char-slot-empty {
    background-color: var(--color-surface-1);
    border: 2px dashed var(--color-surface-3);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 200px; /* Give it some height */
    color: var(--color-text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}
.char-slot-empty:hover {
    border-color: var(--color-accent-primary);
    background-color: var(--color-surface-2);
    color: var(--color-text-primary);
    box-shadow: 0 0 20px var(--color-accent-glow);
}
.char-slot-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--color-surface-3);
    transition: all 0.3s ease;
}
.char-slot-empty:hover i {
    color: var(--color-accent-primary);
    transform: scale(1.1);
}
.char-slot-empty h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
    font-family: var(--font-secondary);
}


/* --- Custom Modal --- */
.modal-content-box {
    background: var(--color-surface-1);
    border: 1px solid var(--color-surface-3);
    animation: fadeInModal 0.3s ease-out;
}
@keyframes fadeInModal {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- MODIFICATION: Server Status Card Styles --- */

/* REMOVED .server-status-card and :hover rules to remove the default glow */

/* The main server name text */
.server-name.animated {
    background-image: linear-gradient(90deg, var(--color-accent-secondary), #ffffff, var(--color-accent-secondary));
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: text-gradient-shimmer 3s ease-in-out infinite;
}

/* This is the "Connect" button. Styled to match .btn-about */
.btn-server-connect {
    background-color: rgba(60, 60, 60, 0.7);
    border: 1px solid var(--color-surface-3);
    color: var(--color-text-primary);
    font-weight: 500;
    transition: all 0.2s ease;
    /* Copied padding/font-size from Tailwind classes in main.js */
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
}
.btn-server-connect:hover {
    background-color: var(--color-surface-2);
    border-color: var(--color-accent-primary);
    color: white;
}

/* This is the gray "Offline" button. It's already styled well. */
.btn-server-offline {
    background-color: var(--color-surface-3) !important;
    border-color: var(--color-surface-3) !important;
    color: var(--color-text-secondary) !important;
    cursor: not-allowed;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* This is the yellow "Maintenance" button. Making it subtle. */
.btn-server-maintenance {
    background-color: rgba(251, 191, 36, 0.2) !important; /* amber-400 at 20% opacity */
    border-color: var(--color-maintenance) !important;
    color: var(--color-maintenance) !important; /* amber-400 text */
    font-weight: 600;
    text-shadow: none !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 1;
}

/* REMOVED .btn-server-connect .animated-text-gradient as it's no longer used */


/* --- BANNER FIX --- */
/* This targets the img tag inside the banner container on the dashboard */
#dashboard-banner-container > img {
    height: 153px; /* Set a fixed height */
    object-fit: cover; /* Crop the image to fit, maintaining aspect ratio */
    object-position: center; /* Center the image */
}

/* --- NEW: Subscription Page Styles --- */
.sub-card {
    background-color: var(--color-surface-1);
    border: 1px solid var(--color-surface-2);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative; /* Needed for the badge */
}
.sub-card-img {
    width: 100%;
    height: 150px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    opacity: 0.8;
}
.sub-card-features {
    list-style-type: none;
    padding-left: 0;
    margin: 1.5rem 0;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    flex-grow: 1; /* Makes features list take up space */
}
.sub-card-features li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
}
.sub-card-features li::before {
    content: '\f00c'; /* Font Awesome check mark */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--color-accent-primary);
}
.sub-card-prices {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    background-color: var(--color-surface-2);
    padding: 1rem;
    border-radius: 8px;
}
.sub-card-prices p {
    display: flex;
    justify-content: space-between;
}
.sub-card-prices span {
    color: var(--color-text-primary);
    font-weight: 600;
}

/* Subscription Card Hover/Active States */
.sub-card[data-tier="Emerald"] { 
    border-color: var(--color-emerald);
    box-shadow: 0 0 25px var(--color-emerald-glow);
}
.sub-card[data-tier="Emerald"]:hover { transform: translateY(-5px); }
.sub-card[data-tier="Emerald"] .btn-primary {
    background-color: var(--color-emerald);
    border-color: var(--color-emerald);
    color: black;
    box-shadow: 0 0 10px var(--color-emerald-glow);
}
.sub-card[data-tier="Emerald"] .btn-primary:hover {
    background-color: #15d194;
    border-color: #15d194;
    box-shadow: 0 0 20px var(--color-emerald-glow);
}

.sub-card[data-tier="Platinum"] { 
    border-color: var(--color-platinum);
    box-shadow: 0 0 25px var(--color-platinum-glow);
}
.sub-card[data-tier="Platinum"]:hover { transform: translateY(-5px); }
.sub-card[data-tier="Platinum"] .btn-primary {
    background-color: var(--color-platinum);
    border-color: var(--color-platinum);
    color: black;
    box-shadow: 0 0 10px var(--color-platinum-glow);
}
.sub-card[data-tier="Platinum"] .btn-primary:hover {
    background-color: #b1b9c7;
    border-color: #b1b9c7;
    box-shadow: 0 0 20px var(--color-platinum-glow);
}

.sub-card[data-tier="Diamond"] { 
    border-color: var(--color-diamond);
    box-shadow: 0 0 25px var(--color-diamond-glow);
}
.sub-card[data-tier="Diamond"]:hover { transform: translateY(-5px); }
.sub-card[data-tier="Diamond"] .btn-primary {
    background-color: var(--color-diamond);
    border-color: var(--color-diamond);
    color: black;
    box-shadow: 0 0 10px var(--color-diamond-glow);
}
.sub-card[data-tier="Diamond"] .btn-primary:hover {
    background-color: #5cd0fa;
    border-color: #5cd0fa;
    box-shadow: 0 0 20px var(--color-diamond-glow);
}

/* Agreement Box */
.agreement-box {
    background-color: var(--color-surface-2);
    border: 1px solid var(--color-surface-3);
    border-radius: 8px;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
    font-family: var(--font-primary);
    white-space: pre-wrap; /* Allows text to wrap */
    color: var(--color-text-secondary);
    /* --- FIX: Farsi LTR Styles --- */
    direction: ltr;
    text-align: left;
}

/* Custom Radio Buttons */
.radio-label {
    background-color: var(--color-surface-2);
    border: 1px solid var(--color-surface-3);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-weight: 500;
    display: block; /* ADDED THIS */
}
.radio-label:hover {
    background-color: var(--color-surface-3);
}
/* --- FINAL FIX: This CSS rule will work. --- */
.radio-input:checked + .radio-label {
    background-color: var(--color-accent-primary);
    color: black;
    border-color: var(--color-accent-secondary);
    box-shadow: 0 0 15px var(--color-accent-glow-strong);
}

/* --- NEW FIX: Make application form radio buttons light up when selected --- */
.app-form-question .radio-input:checked + .form-check-label {
    background-color: var(--color-accent-primary);
    color: black;
    border-color: var(--color-accent-secondary);
    box-shadow: 0 0 15px var(--color-accent-glow-strong);
}
.app-form-question .radio-input:checked + .form-check-label .form-check-label-text {
    color: black;
}


/* --- NEW: Subscription Tier Colors --- */
.text-emerald {
    color: var(--color-emerald) !important;
    font-weight: 600;
    text-shadow: 0 0 10px var(--color-emerald-glow);
}
.text-platinum {
    color: var(--color-platinum) !important;
    font-weight: 600;
    text-shadow: 0 0 10px var(--color-platinum-glow);
}
.text-diamond {
    color: var(--color-diamond) !important;
    font-weight: 600;
    text-shadow: 0 0 10px var(--color-diamond-glow);
}
.text-danger {
    color: var(--color-danger) !important;
    font-weight: 600;
    text-shadow: 0 0 10px var(--color-danger);
}
.text-warning {
    color: var(--color-warning) !important;
    font-weight: 600;
    text-shadow: 0 0 10px var(--color-warning);
}

/* --- NEW: Upgrade UI Styles --- */
.current-plan-badge {
    position: absolute;
    top: -15px;
    right: 20px;
    background-color: var(--color-accent-primary);
    color: black;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 99px;
    box-shadow: 0 4px 10px var(--color-accent-glow-strong);
}

.sub-card.is-current {
    opacity: 0.7;
    border-color: var(--color-accent-primary);
}

.sub-card.is-lower {
    display: none; /* Hide lower tiers */
}

/* --- NEW: Applications Page Styles --- */

.app-card {
    background-color: var(--color-surface-1);
    border: 1px solid var(--color-surface-2);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%; /* <-- ADDED: This makes the card fill the grid cell height */
    /* MODIFIED: 
      Set the default border to dark and the default glow to the pink one.
      The classes below will override this.
    */
    border-color: var(--color-surface-2);
    box-shadow: 0 0 25px var(--color-accent-glow);
}
.app-card:hover {
    transform: translateY(-5px);
    /* MODIFIED: Set the default hover glow to the strong pink */
    box-shadow: 0 0 35px var(--color-accent-glow-strong);
}

/* NEW: App-specific card glow overrides */
/* This uses the variables already in :root */
.app-card.app-card-staff {
    border-color: var(--color-app-staff);
    box-shadow: 0 0 25px var(--color-app-staff-glow);
}
.app-card.app-card-staff:hover {
    box-shadow: 0 0 35px var(--color-app-staff-glow-strong);
}

.app-card.app-card-dev {
    border-color: var(--color-app-dev);
    box-shadow: 0 0 25px;
}
.app-card.app-card-dev:hover {
    box-shadow: 0 0 35px var(--color-app-dev-glow-strong);
}

.app-card.app-card-pd {
    border-color: var(--color-app-pd);
    box-shadow: 0 0 25px var(--color-app-pd-glow);
}
.app-card.app-card-pd:hover {
    box-shadow: 0 0 35px var(--color-app-pd-glow-strong);
}

/* NEW: Medic Card */
.app-card.app-card-md {
    border-color: var(--color-app-md);
    box-shadow: 0 0 25px var(--color-app-md-glow);
}
.app-card.app-card-md:hover {
    box-shadow: 0 0 35px var(--color-app-md-glow-strong);
}

/* NEW: Gang Card */
.app-card.app-card-gang {
    border-color: #9494a4; /* Black border is invisible */
    box-shadow: 0 0 25px var(--color-app-gang-glow);
}
.app-card.app-card-gang:hover {
    box-shadow: 0 0 35px var(--color-app-gang-glow-strong);
}


.app-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    font-family: var(--font-secondary); /* NEW: Use Orbitron font */
    margin-bottom: 0.5rem;
}
.app-card-desc {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    flex-grow: 1; /* Makes description take up space */
    margin-bottom: 1.5rem;
}

/* NEW: Animated App Titles */
.app-title-animated {
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: text-gradient-shimmer 3s ease-in-out infinite;
}
.app-title-staff {
    background-image: linear-gradient(90deg, var(--color-app-staff), #ffffff, var(--color-app-staff));
}
.app-title-dev {
    background-image: linear-gradient(90deg, var(--color-app-dev), #ffffff, var(--color-app-dev));
}
.app-title-pd {
    background-image: linear-gradient(90deg, var(--color-app-pd), #ffffff, var(--color-app-pd));
}
/* NEW: Medic Title */
.app-title-md {
    background-image: linear-gradient(90deg, var(--color-app-md), #ffffff, var(--color-app-md));
}
/* NEW: Gang Title */
.app-title-gang {
    /* Black animated title won't look good, use a white/grey shimmer */
    background-image: linear-gradient(90deg, #888, #ffffff, #888);
}

/* NEW: App Button Colors */
.btn-app-staff {
    background-color: var(--color-app-staff);
    border-color: var(--color-app-staff);
    color: black;
    box-shadow: 0 0 10px var(--color-app-staff-glow);
}
.btn-app-staff:hover {
    background-color: #a7fadd; /* Lighter shade */
    border-color: #a7fadd;
    box-shadow: 0 0 20px var(--color-app-staff-glow);
}

.btn-app-dev {
    background-color: var(--color-app-dev);
    border-color: var(--color-app-dev);
    color: black;
    box-shadow: 0 0 10px var(--color-app-dev-glow);
}
.btn-app-dev:hover {
    background-color: #f8fac5; /* Lighter shade */
    border-color: #f8fac5;
    box-shadow: 0 0 20px var(--color-app-dev-glow);
}

.btn-app-pd {
    background-color: var(--color-app-pd);
    border-color: var(--color-app-pd);
    color: white; /* White text for blue bg */
    box-shadow: 0 0 10px var(--color-app-pd-glow);
}
.btn-app-pd:hover {
    background-color: #5272c4; /* Lighter shade */
    border-color: #5272c4;
    box-shadow: 0 0 20px var(--color-app-pd-glow);
}

/* NEW: Medic Button */
.btn-app-md {
    background-color: var(--color-app-md);
    border-color: var(--color-app-md);
    color: white;
    box-shadow: 0 0 10px var(--color-app-md-glow);
}
.btn-app-md:hover {
    background-color: #e02f5a; /* Lighter shade */
    border-color: #e02f5a;
    box-shadow: 0 0 20px var(--color-app-md-glow);
}

/* NEW: Gang Button */
.btn-app-gang {
    background-color: var(--color-app-gang);
    border-color: var(--color-surface-3); /* Black border invisible */
    color: white; 
    box-shadow: 0 0 10px var(--color-app-gang-glow);
}
.btn-app-gang:hover {
    background-color: #7f8794; /* Dark grey */
    border-color: var(--color-surface-3);
    box-shadow: 0 0 20px var(--color-app-gang-glow);
}


.app-card-status-badge {
    position: absolute;
    top: -15px;
    right: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 99px;
    text-transform: capitalize;
}
.app-card-status-badge.pending {
    background-color: var(--color-warning);
    color: black;
    box-shadow: 0 4px 10px rgba(251, 191, 36, 0.3);
}
.app-card-status-badge.approved {
    background-color: var(--color-emerald);
    color: black;
    box-shadow: 0 4px 10px var(--color-emerald-glow);
}
.app-card-status-badge.denied {
    background-color: var(--color-danger);
    color: black;
    box-shadow: 0 4px 10px rgba(248, 113, 113, 0.3);
}

.app-card.is-pending {
    border-color: var(--color-warning);
}
.app-card.is-approved {
    border-color: var(--color-emerald);
}
.app-card.is-denied {
    border-color: var(--color-danger);
}


/* --- NEW: Application Form Styles --- */

.app-form-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}
.app-form-sublabel {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
    font-style: italic;
}
.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Custom Checkbox/Radio for Forms */
.form-check-label {
    display: flex;
    align-items: center;
    background-color: var(--color-surface-2);
    border: 1px solid var(--color-surface-3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.form-check-label:hover {
    background-color: var(--color-surface-3);
}
.form-check-input {
    height: 1.25rem;
    width: 1.25rem;
    border-radius: 6px;
    background-color: var(--color-surface-3);
    border: 1px solid var(--color-surface-3);
    color: var(--color-accent-primary);
    margin-right: 0.75rem;
    flex-shrink: 0;
    /* --- NEW FIX: Force accent color for Luma theme --- */
    accent-color: var(--color-accent-primary);
}
.form-check-input:checked {
    background-color: var(--color-accent-primary);
    border-color: var(--color-accent-primary);
}
.form-check-input:focus {
    outline: none;
    box-shadow: 0 0 10px var(--color-accent-glow);
}
.form-check-input[type="radio"] {
    border-radius: 99px;
}
.form-check-input:checked + .form-check-label-text {
    color: var(--color-text-primary);
}
.form-check-label-text {
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* --- NEW: About Us Page Styles --- */
.about-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0.5rem; /* 8px gap */
    width: 100%;
    height: 500px; /* Fixed height for layout */
    max-width: 700px;
    margin: auto;
}
.about-image-cell {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem; /* 8px */
}
.about-image-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.3s ease;
}
.about-image-cell:hover img {
    transform: scale(1.05);
}
/* Applying the clip-paths from the screenshot */
#clip-1 {
    clip-path: polygon(0 0, 100% 0, 100% 80%, 0% 100%);
}
#clip-2 {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 80%);
}
#clip-3 {
    clip-path: polygon(0 20%, 100% 0, 100% 100%, 0 100%);
}
#clip-4 {
    clip-path: polygon(0 0, 100% 20%, 100% 100%, 0 100%);
}

/* Custom button style for about page */
.btn-about {
    background-color: rgba(60, 60, 60, 0.7);
    border: 1px solid var(--color-surface-3);
    color: var(--color-text-primary);
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.2s ease;
}
.btn-about:hover {
    background-color: var(--color-surface-2);
    border-color: var(--color-accent-primary);
}
/* --- End About Us Styles --- */