/* account-settings.css — REBRAND v2 */
/* Normalized to match 404 Servers dark-navy / neon-green design system */

/* ============================================================
   IMPORTS & CSS VARIABLES
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=Rajdhani:wght@500;600;700&display=swap');

:root {
    /* Core palette — matches new site */
    --bg-primary:       #0a0e17;
    --bg-secondary:     #12161f;
    --bg-card:          #171d28;
    --bg-hover:         #1d2432;

    /* Accent */
    --accent-primary:   #00ff88;
    --accent-secondary: #00d4ff;
    --accent-warning:   #ffa500;
    --accent-danger:    #ff3366;

    /* Text */
    --text-primary:     #e4e9f0;
    --text-secondary:   #8892a6;
    --text-dim:         #545d6f;

    /* Borders */
    --border:           #252d3d;
    --border-subtle:    #1d2432;

    /* Typography */
    --font-body:        'IBM Plex Mono', monospace;
    --font-display:     'Rajdhani', sans-serif;

    /* Spacing */
    --space-2xs:  2px;
    --space-xs:   4px;
    --space-sm:   6px;
    --space-md:   10px;
    --space-lg:   14px;
    --space-xl:   18px;
    --space-2xl:  24px;

    /* Radius — sharp like new site */
    --radius-sm:  4px;
    --radius-md:  6px;
    --radius-lg:  8px;

    /* Legacy sidebar var kept for any inline refs */
    --sidebar-width:    320px;
    --status-green:     #00ff88;
    --status-red:       #ff3366;
    --status-orange:    #ffa500;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--bg-primary);
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-size: 12px;
    line-height: 1.4;
}

/* Subtle grid overlay like new site */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image:
        linear-gradient(rgba(0, 255, 136, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.015) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.8;
}

/* ============================================================
   MAIN LAYOUT — WRAPPER + CONTENT
   ============================================================ */

.settings-wrapper {
    display: flex;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 1px rgba(0, 255, 136, 0.15);
    overflow: hidden;
    height: calc(100vh - 65px);
    position: relative;
    z-index: 1;
}

/* ============================================================
   NAVIGATION SIDEBAR
   ============================================================ */

.settings-nav {
    width: 220px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
    padding: 20px 0;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    z-index: 10;
}

.settings-nav h1 {
    font-family: var(--font-display);
    font-size: 1.3em;
    color: var(--accent-primary);
    padding: 0 20px 20px 20px;
    margin: 0;
    border-bottom: 1px solid var(--border);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.settings-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.settings-nav a:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
    border-left-color: rgba(0, 255, 136, 0.4);
}

.settings-nav a.active {
    background-color: rgba(0, 255, 136, 0.06);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
}

.settings-nav a .fa-fw {
    width: 20px;
    color: inherit;
}

/* ============================================================
   CONTENT AREA
   ============================================================ */

.settings-content-wrapper {
    display: flex;
    flex-grow: 1;
    width: calc(100% - 220px);
    height: 100%;
}

.settings-content {
    flex-grow: 1;
    padding: 24px 30px;
    transition: width 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.settings-section {
    display: none;
}

.settings-section.active {
    display: block;
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 15px;
}

/* Scrollbar styling */
.settings-section.active::-webkit-scrollbar { width: 6px; }
.settings-section.active::-webkit-scrollbar-track { background: var(--bg-primary); border-radius: var(--radius-sm); }
.settings-section.active::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-sm); }
.settings-section.active::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

/* ============================================================
   SECTION HEADERS & TYPOGRAPHY
   ============================================================ */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    margin-bottom: 25px;
    padding-bottom: 15px;
}

.settings-section h2 {
    font-family: var(--font-display);
    font-size: 1.6em;
    margin: 0;
    color: var(--text-primary);
    border-bottom: none;
    padding-bottom: 0;
    letter-spacing: 0.5px;
}

.settings-section h3 {
    font-family: var(--font-display);
    font-size: 1.2em;
    margin-bottom: 10px;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.settings-section p {
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.8rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */

/* Primary save / action */
.save-btn {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.save-btn:hover:not(:disabled) {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 255, 136, 0.25);
}

.save-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    border-color: var(--border);
    color: var(--text-dim);
}

.save-btn .spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.save-btn.saving .spinner { display: block; }
.save-btn.saving .btn-text { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Variants */
.save-btn.danger {
    border-color: var(--accent-danger);
    color: var(--accent-danger);
}
.save-btn.danger:hover:not(:disabled) {
    background: var(--accent-danger);
    color: #fff;
    box-shadow: 0 4px 16px rgba(255, 51, 102, 0.25);
}

.save-btn.secondary {
    border-color: var(--border);
    color: var(--text-secondary);
}
.save-btn.secondary:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.save-btn.steam {
    border-color: #5c6bc0;
    color: #8fa0e0;
}
.save-btn.steam:hover:not(:disabled) {
    background: #5c6bc0;
    color: #fff;
    box-shadow: 0 4px 16px rgba(92, 107, 192, 0.3);
}

.save-btn.discord {
    border-color: #7289da;
    color: #99aae8;
}
.save-btn.discord:hover:not(:disabled) {
    background: #7289da;
    color: #fff;
    box-shadow: 0 4px 16px rgba(114, 137, 218, 0.3);
}

/* Edit button (ghost mode / widget) */
.edit-btn {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}
.edit-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.edit-btn.active-edit { background: rgba(0, 255, 136, 0.1); border-color: var(--accent-primary); color: var(--accent-primary); }
.edit-btn i { margin-right: 6px; }

/* ============================================================
   FORMS & INPUTS
   ============================================================ */

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-family: var(--font-body);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 4px;
    display: inline-block;
    letter-spacing: 0.3px;
}

/* Checkbox */
.checkbox-group { display: flex; align-items: center; margin-bottom: 10px; }
.checkbox-group input[type="checkbox"] { display: none; }

.checkbox-group label {
    position: relative;
    padding-left: 32px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--text-primary);
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: 0;
}

.checkbox-group label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.checkbox-group label:hover::before { border-color: var(--accent-primary); }

.checkbox-group input:checked + label::before {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.checkbox-group input:checked + label::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--bg-primary);
}

/* Radio pills */
.radio-group-pills {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.radio-group-pills input[type="radio"] { display: none; }
.radio-group-pills label {
    flex: 1;
    text-align: center;
    padding: 8px;
    cursor: pointer;
    background: var(--bg-secondary);
    color: var(--text-dim);
    transition: all 0.2s ease;
    margin-bottom: 0;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.radio-group-pills input[type="radio"]:checked + label {
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent-primary);
    border-left: 1px solid var(--accent-primary);
}
.radio-group-pills input[type="radio"]:disabled + label {
    opacity: 0.3;
    cursor: not-allowed;
    background: var(--bg-primary) !important;
    color: var(--text-dim) !important;
}

/* Select widget */
.widget-select {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px 8px;
    font-size: 0.75rem;
    font-family: var(--font-body);
}
.widget-select.wide { width: 100%; }

/* File input */
.file-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.75rem;
    font-family: var(--font-body);
}
.file-input::file-selector-button {
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    margin-right: 12px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.2s;
}
.file-input::file-selector-button:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

/* Color picker */
.color-picker-group { display: flex; align-items: center; justify-content: space-between; }
.color-picker-group label { margin-bottom: 0; }
input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}
input[type="color"]::-webkit-color-swatch {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

/* Divider */
.form-divider {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

/* ============================================================
   FEEDBACK / TOAST
   ============================================================ */

#feedback-message {
    text-align: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 10px 20px;
    margin: 0;
    border-radius: var(--radius-sm);
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    z-index: 9999;
    border: 1px solid;
}
#feedback-message.show { display: block; opacity: 1; transform: translateX(-50%) translateY(0); }
#feedback-message.success {
    background: rgba(0, 255, 136, 0.15);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.2);
}
#feedback-message.error {
    background: rgba(255, 51, 102, 0.15);
    color: var(--accent-danger);
    border-color: var(--accent-danger);
    box-shadow: 0 4px 20px rgba(255, 51, 102, 0.2);
}

/* Status indicators */
.status-indicator {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    border: 1px solid;
}
.status-indicator.success {
    background: rgba(0, 255, 136, 0.08);
    color: var(--accent-primary);
    border-color: rgba(0, 255, 136, 0.3);
}
.status-indicator.warning {
    background: rgba(255, 165, 0, 0.08);
    color: var(--accent-warning);
    border-color: rgba(255, 165, 0, 0.3);
}

/* ============================================================
   WIDGET EDIT — "GHOST MODE"
   ============================================================ */

#dashboard .widget {
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

#dashboard.is-editing .widget {
    border: 2px dashed rgba(0, 255, 136, 0.4);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.1);
}

#dashboard.is-editing .widget.is-selected {
    border-style: solid;
    border-color: var(--accent-primary);
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
    z-index: 2;
}

.widget-edit-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(10, 14, 23, 0.7);
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    border-radius: var(--radius-md);
}

#dashboard.is-editing .widget-edit-overlay { opacity: 1; pointer-events: none; }
#dashboard.is-editing .widget-drag-handle,
#dashboard.is-editing .widget-settings-btn { pointer-events: auto; }

.widget-drag-handle, .widget-settings-btn {
    background: rgba(10, 14, 23, 0.8);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    height: 28px;
    width: 28px;
    display: grid;
    place-items: center;
    font-size: 0.85em;
}
.widget-drag-handle { cursor: grab; }
.widget-drag-handle:active { cursor: grabbing; }
.widget-settings-btn { cursor: pointer; }
.widget-settings-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

/* ============================================================
   WIDGET SETTINGS SIDEBAR
   ============================================================ */

#widget-settings-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    flex-shrink: 0;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: none;
    height: 100%;
    overflow-y: auto;
}
#widget-settings-sidebar.is-visible {
    transform: translateX(0);
    opacity: 1;
    display: block;
}

.sidebar-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}
.sidebar-header h3 {
    margin: 0;
    font-family: var(--font-display);
    color: var(--accent-primary);
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.sidebar-content { padding: 20px; }

#widget-settings-prompt {
    text-align: center;
    color: var(--text-dim);
    padding: 40px 20px;
    font-size: 0.75rem;
}
#widget-settings-prompt i { font-size: 2em; margin-bottom: 12px; display: block; opacity: 0.4; }

.widget-settings-panel { display: none; }
.widget-settings-panel h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 16px;
    letter-spacing: 0.3px;
}

/* Available widgets list */
#available-widgets-container {
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
}
p.sidebar-instruction {
    font-size: 0.7rem;
    color: var(--text-dim);
    padding: 0 0 12px;
    margin: 0;
    line-height: 1.4;
}
#available-widgets-list {
    min-height: 100px;
    background: var(--bg-primary);
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
}
#available-widgets-list .widget {
    transform: scale(0.95);
    opacity: 0.6;
    margin-bottom: 10px;
    cursor: grab;
}
#available-widgets-list .widget:active { cursor: grabbing; }
#available-widgets-list .widget .widget-body,
#available-widgets-list .widget .widget-header { display: none; }
#available-widgets-list .widget::before {
    content: attr(data-widget-id);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
#available-widgets-list .widget-edit-overlay { display: none; }

/* Sortable states */
.sortable-ghost { opacity: 0.3; background: rgba(0, 255, 136, 0.1); border: 1px dashed var(--accent-primary) !important; }
.sortable-drag { opacity: 0.9 !important; transform: rotate(1.5deg); box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important; }

/* ============================================================
   DASHBOARD WIDGET STYLES
   ============================================================ */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 16px;
    min-height: 200px;
    position: relative;
    align-items: start;
}

#dashboard.is-editing .dashboard-grid:empty {
    border: 2px dashed var(--border);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
}
#dashboard.is-editing .dashboard-grid:empty::before {
    content: "Drop widgets here to add them to your dashboard";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    text-align: center;
    padding: 20px;
    letter-spacing: 0.5px;
}

.widget {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#profile-snapshot-widget,
.player-card-live-preview {
    border-top: 2px solid var(--accent-primary);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}
.widget-header h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.widget-body { padding: 14px; flex-grow: 1; }

.widget-footer-link {
    display: block;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.7rem;
    text-align: right;
    color: var(--accent-primary);
    text-decoration: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.2s;
}
.widget-footer-link:hover { color: var(--accent-secondary); }

/* Profile card in widget */
.profile-card { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.profile-avatar {
    width: 60px; height: 60px;
    border-radius: 50%;
    border: 2px solid var(--card-accent-color, var(--accent-primary));
    flex-shrink: 0;
}
.profile-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.profile-username {
    font-family: var(--font-display);
    font-size: 1.2em;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-level, .profile-currency {
    color: var(--text-secondary);
    font-size: 0.75rem;
}
.profile-currency i { color: #ffd700; margin-right: 4px; }

/* Server cards in widget */
#pinned-servers-widget .widget-body { padding: 0; }
.server-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.server-card:last-child { border-bottom: none; }
.server-card.main-pinned { background: rgba(0, 255, 136, 0.04); }
.server-status-indicator {
    flex-shrink: 0;
    width: 4px;
    height: 100%;
    position: absolute;
    left: 0; top: 0;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.server-details { flex-grow: 1; padding-left: 12px; }
.server-name { font-family: var(--font-display); font-weight: 700; color: var(--text-primary); font-size: 0.85rem; }
.server-map, .server-players { font-size: 0.7rem; color: var(--text-secondary); }
.server-sub-stats { display: flex; gap: 12px; font-size: 0.65rem; color: var(--text-secondary); margin-top: 4px; }
.server-sub-stats i { margin-right: 4px; color: var(--text-dim); }
.server-stats { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }

.connect-btn {
    background: rgba(0, 255, 136, 0.08);
    color: var(--accent-primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.7rem;
    text-decoration: none;
    display: inline-block;
    border: 1px solid var(--accent-primary);
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.connect-btn:hover { background: var(--accent-primary); color: var(--bg-primary); }

.connect-btn-small {
    background: var(--bg-hover);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 0.65rem;
    text-decoration: none;
    transition: all 0.2s;
}
.connect-btn-small:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

/* Misc widget pieces */
.achievements-container { display: flex; gap: 12px; flex-wrap: wrap; }
.achievement-icon {
    font-size: 1.5em;
    color: var(--text-dim);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.2s;
}
.achievement-icon:hover { color: var(--accent-primary); border-color: var(--accent-primary); transform: translateY(-2px); }

.progress-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.progress-list li { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 0.75rem; }
.progress-list i { color: var(--text-dim); width: 18px; text-align: center; }
.progress-list strong { color: var(--text-primary); }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-item {
    background: var(--bg-primary);
    padding: 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    text-align: center;
}
.stat-item span { display: block; font-size: 0.6rem; color: var(--text-dim); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-item strong { font-family: var(--font-display); font-size: 1.3em; color: var(--text-primary); }

/* Friends list */
.friends-list { list-style: none; padding: 0; margin: 0; }
.friends-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
    text-decoration: none;
}
.friends-list li a:hover { background: var(--bg-hover); }
.friends-list img { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); }
.friends-list span:first-of-type { flex-grow: 1; color: var(--text-primary); font-size: 0.75rem; }
.status { font-size: 0.65rem; color: var(--text-dim); white-space: nowrap; }
.status::before { content: '●'; margin-right: 5px; }
.status.online::before { color: var(--accent-primary); }
.status.website::before { color: var(--accent-warning); }
.status.offline::before { color: var(--text-dim); }

/* LFG */
.lfg-create-btn {
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.7rem;
    transition: all 0.2s;
}
.lfg-create-btn:hover { background: var(--accent-primary); color: var(--bg-primary); }

#lfg-feed-widget .widget-body { display: flex; flex-direction: column; gap: 8px; padding: 14px; }

.lfg-post {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-primary);
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.lfg-game { font-size: 1.3em; color: var(--text-dim); }
.lfg-details { flex-grow: 1; }
.lfg-title { display: block; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; text-decoration: none; font-size: 0.75rem; }
.lfg-slots { font-size: 0.65rem; color: var(--text-secondary); display: flex; align-items: center; gap: 2px; }
.lfg-slots .fa-user { color: var(--accent-primary); }
.lfg-author { font-size: 0.65rem; color: var(--text-dim); margin-top: 2px; }

.lfg-join-btn {
    background: rgba(0, 255, 136, 0.08);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.7rem;
    transition: all 0.2s;
}
.lfg-join-btn:hover { background: var(--accent-primary); color: var(--bg-primary); }

.lfg-leave-btn {
    background: rgba(255, 51, 102, 0.08);
    color: var(--accent-danger);
    border: 1px solid var(--accent-danger);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.7rem;
    transition: all 0.2s;
}
.lfg-leave-btn:hover { background: var(--accent-danger); color: #fff; }

.lfg-chat-btn {
    position: absolute;
    top: 8px; right: 8px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 28px; height: 28px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 5;
    font-size: 0.75rem;
}
.lfg-chat-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

.lfg-action-area { margin-left: auto; flex-shrink: 0; }

/* Announcements */
.announcements-list { list-style: none; padding: 0; margin: 0; }
.announcements-list li {
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
}
.announcements-list li:last-child { border-bottom: none; }
.announcements-list a { color: var(--text-primary); text-decoration: none; }
.announcements-list a:hover { color: var(--accent-primary); }

/* Squad widget */
.squad-info { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.squad-logo { width: 44px; height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.squad-info h4 { margin: 0; font-family: var(--font-display); font-size: 1.1em; }
.squad-goal {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 8px;
    border-radius: var(--radius-sm);
    margin: 0 0 12px 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* VIP widget */
.vip-widget {
    border-top: 2px solid #ffd700;
    background: linear-gradient(135deg, var(--bg-card), #1a1a10);
}
.vip-tag {
    background: #ffd700;
    color: var(--bg-primary);
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.vip-tag i { margin-right: 3px; }
.vip-tag-small {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: var(--radius-sm);
    margin-left: 5px;
    vertical-align: middle;
    background: #ffd700;
    color: var(--bg-primary);
}
.vip-tag-small i { margin-right: 2px; }

.exchange-rates {
    margin: 8px 0;
    padding: 6px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    text-align: center;
    display: flex;
    justify-content: space-evenly;
    border: 1px solid var(--border);
}
.standard-rate { text-decoration: line-through; color: var(--text-dim); font-size: 0.75rem; }
.vip-rate { color: #ffd700; font-weight: 700; font-size: 0.75rem; }

.trade-interface { display: flex; gap: 8px; margin-top: 8px; }
.trade-interface input {
    flex-grow: 1;
    padding: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.75rem;
}
.trade-btn {
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.7rem;
    transition: all 0.2s;
}
.trade-btn:hover { background: var(--accent-primary); color: var(--bg-primary); }

/* Empty / loading */
.widget-loading-state, .widget-empty-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 36px 20px;
    color: var(--text-dim);
    min-height: 120px;
    font-size: 0.75rem;
}
.widget-empty-state i { font-size: 2em; margin-bottom: 12px; opacity: 0.3; }
.widget-empty-state p { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin: 0; font-family: var(--font-display); }
.widget-empty-state span { font-size: 0.7rem; color: var(--text-dim); }

/* ============================================================
   PROFILE STATS (within player card)
   ============================================================ */

.profile-stats {
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.07);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 12px 8px;
    text-align: center;
}
.profile-stat-item { overflow: hidden; }
.profile-stat-item strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.15em;
    font-weight: 700;
    color: var(--card-accent-color, var(--accent-primary));
    white-space: nowrap;
}
.profile-stat-item span {
    font-size: 0.6em;
    opacity: 0.6;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* Level progress bar */
.level-progress-container {
    background: rgba(0,0,0,0.4);
    border-radius: 20px;
    height: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.2);
}
.level-progress-bar {
    background: linear-gradient(90deg, var(--card-accent-color, var(--accent-primary)) 0%, var(--accent-secondary) 100%);
    height: 100%;
    border-radius: 20px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--card-accent-color, var(--accent-primary));
}
.level-progress-text {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

.vip-badge-on-card {
    background: linear-gradient(45deg, #ffd700, var(--accent-warning));
    color: var(--bg-primary);
    font-family: var(--font-display);
    font-size: 0.55em;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    margin-left: 6px;
    text-transform: uppercase;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

/* ============================================================
   PLAYER CARD SECTION
   ============================================================ */

#player-card:not(.is-editing) #player-card-edit-container { display: none; }
#player-card.is-editing #player-card-view-container { display: none; }
#player-card.is-editing #player-card-edit-container { display: block; }

.player-card-content { display: flex; gap: 28px; }

#player-card-edit-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 22px;
    border-radius: var(--radius-lg);
    display: none;
}
#player-card-edit-container h4 {
    margin-top: 0;
    margin-bottom: 14px;
    font-family: var(--font-display);
    color: var(--accent-primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    font-size: 1.1em;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Live preview wrapper */
.player-card-live-preview,
#profile-snapshot-widget {
    --card-bg-color:    #171d28;
    --card-text-color:  #e4e9f0;
    --card-accent-color: #00ff88;

    overflow: visible;
    padding: 4px;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    max-width: 450px;
    margin-bottom: 18px;
    background: transparent;
    border: 4px solid transparent;
}

.player-card {
    color: var(--card-text-color);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 13px;
    height: 100%; width: 100%;
    position: relative;
    z-index: 2;
    background-color: transparent;
}
.player-card:hover { transform: translateY(-2px); }

.player-card-background {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: background-image 0.3s ease;
}

.profile-card-main { display: flex; align-items: center; gap: 13px; }

/* Background style classes */
.bg-solid .player-card { background: var(--card-bg-color); }
.bg-carbon {
    background-image:
        linear-gradient(27deg,#151515 5px,transparent 5px),
        linear-gradient(207deg,#151515 5px,transparent 5px),
        linear-gradient(27deg,#222 5px,transparent 5px),
        linear-gradient(207deg,#222 5px,transparent 5px),
        linear-gradient(90deg,#1b1b1b 10px,transparent 10px),
        linear-gradient(#1d1d1d 25%,#1a1a1a 25%,#1a1a1a 50%,transparent 50%,transparent 75%,#242424 75%,#242424),
        linear-gradient(80deg,#131313 8%,transparent 8%);
    background-color: #111;
    background-size: 20px 38px;
}
.bg-geometric { background-color: var(--card-bg-color); }
.bg-image .player-card { background-size: cover; background-position: center; background-repeat: no-repeat; }
.bg-bronze .player-card { background: linear-gradient(145deg,#5c473a,#3e2e25); }
.bg-silver .player-card { background: linear-gradient(145deg,#60676e,#41464b); }
.bg-gold .player-card { background: linear-gradient(145deg,#8a6e2f,#66501e); }
.bg-platinum .player-card { background: linear-gradient(145deg,#6c7a89,#485563); }

/* Border style classes */
.border-standard { border-top-color: var(--card-accent-color); }
.border-glow {
    border-color: transparent;
    box-shadow: 0 0 16px var(--card-accent-color), 0 0 6px var(--card-accent-color) inset;
}
.border-vip, .border-gold {
    border-style: solid;
    border-image: linear-gradient(45deg,#FFD700,#F0C43D,#FFD700) 1;
    animation: gold-glow-animation 4s ease-in-out infinite;
}
@keyframes gold-glow-animation {
    0%   { border-image: linear-gradient(45deg,#FFD700,#F0C43D,#FFD700) 1; }
    50%  { border-image: linear-gradient(135deg,#FFD700,#EAC12D,#FFD700) 1; }
    100% { border-image: linear-gradient(225deg,#FFD700,#F0C43D,#FFD700) 1; }
}
.border-bronze { border-style: solid; border-image: linear-gradient(145deg,#6c4e3a,#986f56,#6c4e3a) 1; }
.border-silver { border-style: solid; border-image: linear-gradient(145deg,#98a1a9,#d0d5d9,#98a1a9) 1; }
.border-platinum { border-style: solid; border-image: linear-gradient(145deg,#7c98b3,#a7c0d8,#7c98b3) 1; box-shadow: 0 0 8px #a7c0d8; }
.border-circuit {
    border-color: var(--card-accent-color);
    box-shadow: 0 0 10px var(--card-accent-color) inset;
}
.border-glitch {
    border: none;
    padding: 8px;
    animation: glitch-border 5s linear infinite;
}
@keyframes glitch-border {
    0%,100% { box-shadow: -2px -2px 0 var(--card-accent-color), 2px 2px 0 #00d4ff; }
    25%      { box-shadow:  2px  2px 0 var(--card-accent-color),-2px -2px 0 #00d4ff; }
    50%      { box-shadow:  2px -2px 0 var(--card-accent-color),-2px  2px 0 #00d4ff; }
    75%      { box-shadow: -2px  2px 0 var(--card-accent-color), 2px -2px 0 #00d4ff; }
}
.border-glitch .player-card { padding: 16px; }

/* Text styles */
.text-style-outline .player-card {
    text-shadow:
        -1px -1px 0 var(--card-accent-color), 1px -1px 0 var(--card-accent-color),
        -1px  1px 0 var(--card-accent-color), 1px  1px 0 var(--card-accent-color),
        -1px  0   0 var(--card-accent-color), 1px  0   0 var(--card-accent-color),
         0   -1px 0 var(--card-accent-color), 0    1px 0 var(--card-accent-color);
}
.text-style-outline .profile-username { text-shadow: none; }

.username-style-glow {
    text-shadow: 0 0 8px var(--card-accent-color), 0 0 10px var(--card-accent-color);
}
.username-style-gradient {
    background: linear-gradient(45deg, var(--card-accent-color), #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.5));
}
.text-style-outline .username-style-glow {
    text-shadow: 0 0 8px var(--card-accent-color), 0 0 10px var(--card-accent-color);
}

/* Shareable link */
.shareable-link-container .input-with-button { display: flex; }
.shareable-link-container input[type="text"] {
    flex-grow: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    background: var(--bg-primary);
}
.shareable-link-container button {
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    padding: 0 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.75rem;
}
.shareable-link-container button:hover { background: var(--accent-primary); color: var(--bg-primary); }

/* Scaled card in dashboard widget */
#profile-snapshot-widget .widget-body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px;
    overflow: hidden;
}
#profile-snapshot-widget .profile-card-link-wrapper {
    width: 350px; height: 220px;
    transform: scale(0.8);
    transform-origin: top left;
    margin-left: -35px;
    margin-top: -30px;
    flex-shrink: 0;
}
#profile-snapshot-widget .profile-card-link-wrapper .player-card { width: 100%; height: 100%; }
#profile-snapshot-widget .profile-card { display: block; text-decoration: none; }

.player-card-widget-body {
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    height: 100%;
}
.scaled-card-container {
    aspect-ratio: 16/9;
    width: 100%; height: 100%;
    zoom: 80%;
    display: flex;
    text-decoration: none;
}
.scaled-card-container .player-card { width: 100%; height: 100%; }

/* ============================================================
   AUTH PROVIDERS / MFA
   ============================================================ */

#mfa-qr-code-container {
    width: 180px;
    padding: 14px;
    background: white;
    border-radius: var(--radius-sm);
    margin: 18px 0;
}
#mfa-qr-code-container img { display: block; width: 100%; height: auto; }
#mfa-secret-code {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
}
#mfa-recovery-codes-section {
    margin-top: 18px;
    padding: 14px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
}
#mfa-recovery-codes-list { column-count: 2; list-style: none; padding-left: 0; }
#mfa-recovery-codes-list li {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 4px 6px;
    margin-bottom: 4px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.75rem;
}
#mfa-enroll-feedback, #mfa-action-feedback, #authActionMessages {
    margin-top: 12px;
    color: var(--accent-warning);
    min-height: 18px;
    font-size: 0.75rem;
}

.auth-provider-container {
    padding: 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 18px;
}
.auth-provider-container h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-family: var(--font-display);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    letter-spacing: 0.3px;
}
.provider-status { display: flex; align-items: center; margin-bottom: 14px; }
.indicator-light {
    width: 10px; height: 10px;
    border-radius: 50%;
    margin-right: 7px;
    border: 1px solid rgba(0,0,0,0.2);
}
.indicator-light.green { background: var(--accent-primary); box-shadow: 0 0 6px var(--accent-primary); }
.indicator-light.red   { background: var(--accent-danger); }

#pinned-servers-checklist {
    max-height: 380px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
}

/* ============================================================
   MAP VOTING
   ============================================================ */

.map-vote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.map-vote-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.map-vote-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 255, 136, 0.4);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.08);
}
.map-vote-card.voted-for {
    border-color: var(--accent-primary);
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.2);
    transform: translateY(-4px) scale(1.01);
}

.map-vote-card .map-image-container {
    width: 100%; height: 150px;
    overflow: hidden;
    background: var(--bg-primary);
}
.map-vote-card .map-image-container img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.map-vote-card:hover .map-image-container img { transform: scale(1.05); }

.map-vote-card .map-vote-info {
    padding: 14px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.map-vote-card h4 {
    margin: 0 0 12px 0;
    font-family: var(--font-display);
    font-size: 1.05em;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.vote-progress-bar-container {
    width: 100%;
    height: 6px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 6px;
    border: 1px solid var(--border);
}
.vote-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-sm);
    transition: width 0.4s ease-out;
}
.vote-count-text {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.map-vote-card .vote-button {
    margin-top: auto;
    width: 100%;
    background: rgba(0, 255, 136, 0.08);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    padding: 8px;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.2s;
}
.map-vote-card .vote-button:hover:not(:disabled) {
    background: var(--accent-primary);
    color: var(--bg-primary);
}
.map-vote-card.voted-for .vote-button,
.map-vote-card .vote-button.voted-for-btn {
    background: rgba(0, 255, 136, 0.15);
    cursor: not-allowed;
}
.map-vote-card .vote-button.confirming {
    background: rgba(255, 165, 0, 0.12);
    border-color: var(--accent-warning);
    color: var(--accent-warning);
    cursor: wait;
}

.vote-timer {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    display: inline-block;
    border: 1px solid var(--border);
    font-family: var(--font-body);
}

.map-image-link { display: block; }
.map-title-link { text-decoration: none; color: inherit; transition: color 0.2s; }
.map-title-link:hover h4 { color: var(--accent-primary); }
a.map-card-link { text-decoration: none; color: inherit; display: block; }
.map-title-container { padding: 10px 14px 4px; }
.map-vote-info { margin-top: auto; padding: 0 14px 14px; }

/* ============================================================
   FRIENDS
   ============================================================ */

.friends-sub-section { margin-bottom: 36px; }
.friends-sub-section h3 {
    font-family: var(--font-display);
    font-size: 1.1em;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.3px;
}

.add-friend-form .input-with-button { display: flex; gap: 8px; }
.add-friend-form input { flex-grow: 1; }
.add-friend-form .add-btn {
    flex-shrink: 0;
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}
.add-friend-form .add-btn:hover { background: var(--accent-primary); color: var(--bg-primary); }
#add-friend-feedback { margin-top: 8px; font-weight: 600; font-size: 0.75rem; }

.user-list { display: flex; flex-direction: column; gap: 8px; }
.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    transition: border-color 0.2s;
}
.user-card:hover { border-color: rgba(0, 255, 136, 0.3); }
.user-card img { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); }
.user-info { flex-grow: 1; }
.user-info .username {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    text-decoration: none;
}
.user-info .username:hover { color: var(--accent-primary); text-decoration: none; }
.user-actions { display: flex; gap: 8px; }

.action-btn {
    padding: 6px 12px;
    border: 1px solid;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}
.action-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.accept-btn  { background: rgba(0,255,136,0.08); color: var(--accent-primary); border-color: var(--accent-primary); }
.accept-btn:hover:not(:disabled)  { background: var(--accent-primary); color: var(--bg-primary); }

.decline-btn, .remove-btn { background: rgba(255,51,102,0.08); color: var(--accent-danger); border-color: var(--accent-danger); }
.decline-btn:hover:not(:disabled), .remove-btn:hover:not(:disabled) { background: var(--accent-danger); color: #fff; }

.cancel-btn { background: var(--bg-secondary); color: var(--text-secondary); border-color: var(--border); }
.cancel-btn:hover:not(:disabled) { border-color: var(--text-secondary); color: var(--text-primary); }

.empty-list-message {
    color: var(--text-dim);
    padding: 20px;
    text-align: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

/* ============================================================
   MODALS
   ============================================================ */

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 14, 23, 0.92);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,255,136,0.08);
    width: 90%;
    max-width: 500px;
    overflow: hidden;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}
.modal-header h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.2em;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}
.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2em;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s, transform 0.2s;
}
.modal-close-btn:hover { color: var(--accent-danger); transform: rotate(90deg); }
.modal-content { padding: 22px; }
.modal .form-divider { margin: 18px 0; }
.modal .form-actions { display: flex; justify-content: flex-end; gap: 12px; }

/* ============================================================
   LFG CHAT MODAL
   ============================================================ */

.chat-feed {
    flex-grow: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.chat-form {
    display: flex;
    padding: 12px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    gap: 8px;
}
.chat-form input {
    flex-grow: 1;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 25px;
    font-size: 0.8rem;
    font-family: var(--font-body);
}
.chat-form input:focus { outline: none; border-color: var(--accent-primary); }
.chat-form .send-btn {
    flex-shrink: 0;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--accent-primary);
    background: rgba(0,255,136,0.1);
    color: var(--accent-primary);
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s;
}
.chat-form .send-btn:hover { background: var(--accent-primary); color: var(--bg-primary); }

.chat-message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 80%;
    width: fit-content;
}
.message-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 16px;
    order: 2;
}
.message-content p { margin: 0; line-height: 1.4; color: var(--text-primary); word-break: break-word; font-size: 0.8rem; }
.message-avatar { width: 34px; height: 34px; border-radius: 50%; order: 1; align-self: flex-start; border: 1px solid var(--border); }
.message-author { display: block; font-family: var(--font-display); font-size: 0.75rem; font-weight: 700; margin-bottom: 3px; color: var(--accent-primary); }
.message-timestamp { display: block; font-size: 0.6rem; color: var(--text-dim); text-align: right; margin-top: 4px; }

.chat-message.received { align-self: flex-start; }
.chat-message.received .message-content { border-bottom-left-radius: 4px; }

.chat-message.sent { align-self: flex-end; flex-direction: row-reverse; }
.chat-message.sent .message-content {
    background: rgba(0, 255, 136, 0.12);
    border-color: rgba(0, 255, 136, 0.3);
    order: 2;
    border-bottom-right-radius: 4px;
}
.chat-message.sent .message-content p { color: var(--accent-primary); }
.chat-message.sent .message-author { display: none; }

/* ============================================================
   SQUAD MANAGEMENT
   ============================================================ */

.squad-manage-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 22px;
}
.squad-manage-logo { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--accent-primary); flex-shrink: 0; }
.squad-header-info h2 { margin: 0 0 4px 0; font-family: var(--font-display); font-size: 1.7em; letter-spacing: 0.3px; }
.squad-header-info p { margin: 0; color: var(--text-secondary); font-style: italic; font-size: 0.8rem; }

.squad-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 22px;
}
.squad-tab-link {
    padding: 12px 22px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    top: 2px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.squad-tab-link:hover { color: var(--text-primary); }
.squad-tab-link.active { color: var(--accent-primary); border-bottom-color: var(--accent-primary); }
.squad-tab-pane { display: none; }
.squad-tab-pane.active { display: block; }

#squad-update-form textarea { min-height: 110px; }
.squad-danger-zone { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); text-align: right; }

#my-squad-section .input-with-button { display: flex; gap: 8px; }
#my-squad-section .input-with-button select {
    flex-grow: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-family: var(--font-body);
    font-size: 0.8rem;
}

.squad-role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    margin-top: 4px;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    border: 1px solid;
}
.role-leader  { background: rgba(255,215,0,0.12); color: #ffd700; border-color: #ffd700; }
.role-officer { background: rgba(114,137,218,0.12); color: #7289da; border-color: #7289da; }
.role-member  { background: rgba(84,93,111,0.12); color: var(--text-secondary); border-color: var(--border); }

.squad-role-select {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px;
    margin-right: 8px;
    font-family: var(--font-body);
    font-size: 0.75rem;
}

.kick-btn {
    background: rgba(255,51,102,0.08);
    color: var(--accent-danger);
    border: 1px solid var(--accent-danger);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.2s;
}
.kick-btn:hover { background: var(--accent-danger); color: #fff; }

/* ============================================================
   LEADERBOARDS
   ============================================================ */

#leaderboard-server-select {
    min-width: 240px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    font-family: var(--font-body);
    font-size: 0.8rem;
}

#leaderboards-content { margin-top: 22px; }

.leaderboard-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.leaderboard-tile {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.2s ease;
}
.leaderboard-tile:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 5px 16px rgba(0,255,136,0.08);
}
.leaderboard-tile-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.leaderboard-tile-icon { width: 36px; height: 36px; object-fit: contain; }
.leaderboard-tile-header h4 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.05em;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}
.leaderboard-tile-top-players {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.75rem;
}
.leaderboard-tile-top-players li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
}
.leaderboard-tile-top-players .player-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.leaderboard-tile-top-players .player-score { font-family: var(--font-display); font-weight: 700; color: var(--accent-primary); }

/* Detail view */
.leaderboard-detail-view {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
}
.leaderboard-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.leaderboard-detail-header h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.4em;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}
.leaderboard-back-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.leaderboard-back-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

.leaderboard-list-container { display: flex; flex-direction: column; }
.leaderboard-list-header,
.leaderboard-list-entry {
    display: grid;
    grid-template-columns: 55px 1fr 100px;
    gap: 12px;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}
.leaderboard-list-header {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-dim);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.leaderboard-list-entry { transition: background 0.2s; }
.leaderboard-list-entry:nth-child(odd) { background: var(--bg-card); }
.leaderboard-list-entry:hover { background: var(--bg-hover); }

.leaderboard-rank {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1em;
    text-align: center;
    color: var(--accent-primary);
}
.leaderboard-list-entry:nth-child(1) .leaderboard-rank { color: #ffd700; }
.leaderboard-list-entry:nth-child(2) .leaderboard-rank { color: #c0c0c0; }
.leaderboard-list-entry:nth-child(3) .leaderboard-rank { color: #cd7f32; }

.leaderboard-player-name { font-weight: 600; color: var(--text-primary); font-size: 0.8rem; }
.leaderboard-score {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1em;
    color: var(--accent-primary);
    text-align: right;
}

.leaderboard-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-top: 22px;
}
.leaderboard-pagination .page-info { font-weight: 600; color: var(--text-secondary); font-size: 0.75rem; }

/* ============================================================
   CONNECTION CODES
   ============================================================ */

.connection-codes-list { display: flex; flex-direction: column; gap: 16px; }
.connection-code-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-primary);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    transition: border-color 0.2s;
}
.connection-code-card:hover { border-color: var(--accent-primary); box-shadow: 0 0 12px rgba(0,255,136,0.06); }

.server-title { margin: 0 0 4px 0; font-family: var(--font-display); font-size: 1.1em; color: var(--text-primary); letter-spacing: 0.3px; }
.server-description { margin: 0; color: var(--text-secondary); font-size: 0.75rem; max-width: 480px; }

.code-area { display: flex; align-items: center; gap: 0; min-width: 300px; }
.code-display {
    flex-grow: 1;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: var(--bg-primary);
    color: var(--text-dim);
    border: 1px solid var(--border);
    padding: 9px 12px;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    transition: color 0.2s;
    user-select: none;
}
.code-display.revealed { color: var(--accent-primary); user-select: all; }

.reveal-code-btn {
    flex-shrink: 0;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-left: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.7rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1.5;
}
.reveal-code-btn i { margin-right: 6px; }
.reveal-code-btn:hover { background: var(--bg-hover); border-color: var(--accent-primary); color: var(--accent-primary); }

/* ============================================================
   PROMO CODES
   ============================================================ */

.promo-code-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-primary);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    transition: all 0.2s;
}
.promo-code-card:hover { box-shadow: 0 4px 16px rgba(0,255,136,0.06); }

.promo-title { margin: 0 0 6px 0; font-family: var(--font-display); font-size: 1.1em; color: var(--text-primary); letter-spacing: 0.3px; }
.promo-description { margin: 0 0 8px 0; color: var(--text-secondary); font-size: 0.75rem; max-width: 480px; }
.promo-expiry {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-dim);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 3px 7px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   ACHIEVEMENT TOASTS
   ============================================================ */

#toast-notification-container {
    position: fixed;
    bottom: 20px; right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    pointer-events: none;
}

.toast-notification {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 360px;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
    color: var(--text-primary);
    padding: 16px;
    border-radius: var(--radius-md);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    border: 1px solid var(--accent-primary);
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    animation: toast-slide-in 0.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
}
.toast-notification.exiting {
    animation: toast-slide-out 0.5s cubic-bezier(0.600,-0.280,0.735,0.045) forwards;
}
@keyframes toast-slide-in  { from { opacity:0; transform:translateX(100%); } to { opacity:1; transform:translateX(0); } }
@keyframes toast-slide-out { from { opacity:1; transform:translateX(0);    } to { opacity:0; transform:translateX(110%); } }

.toast-icon { font-size: 2em; color: #ffd700; text-shadow: 0 0 8px var(--accent-primary); }
.toast-content { display: flex; flex-direction: column; gap: 2px; }
.toast-title { font-family: var(--font-display); font-weight: 700; font-size: 1em; color: var(--text-primary); letter-spacing: 0.3px; }
.toast-message { font-size: 0.8rem; color: var(--text-secondary); }
.toast-xp { font-family: var(--font-display); font-weight: 700; color: var(--accent-primary); font-size: 0.75rem; }
.toast-progress {
    position: absolute;
    bottom: 0; left: 0;
    height: 3px; width: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    animation: toast-progress-bar 5s linear forwards;
}
@keyframes toast-progress-bar { from { width:100%; } to { width:0%; } }

/* ============================================================
   HELP MODE TOGGLE
   ============================================================ */

#help-mode-toggle {
    position: fixed;
    bottom: 24px; left: 24px;
    width: 46px; height: 46px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1050;
    transition: box-shadow 0.3s ease;
    border: 1px solid var(--border);
}
#help-mode-toggle .fas {
    font-size: 20px;
    font-weight: 600;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}
#help-mode-toggle::before {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    z-index: 1;
}
#help-mode-toggle.help-toggle-off {
    box-shadow: 0 0 12px rgba(147,51,234,0.5), 0 0 4px rgba(195,137,215,0.5);
}
#help-mode-toggle.help-toggle-off .fas { color: #c389d7; }
#help-mode-toggle.help-toggle-off::before { background: #9b59b6; }

#help-mode-toggle.help-toggle-on {
    box-shadow: 0 0 12px rgba(0,255,136,0.5), 0 0 4px rgba(0,255,136,0.3);
}
#help-mode-toggle.help-toggle-on .fas { color: var(--bg-primary); }
#help-mode-toggle.help-toggle-on::before { background: var(--accent-primary); }

.help-mode-tooltip-text {
    visibility: hidden;
    width: 150px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    text-align: center;
    border-radius: var(--radius-sm);
    padding: 6px;
    position: absolute;
    z-index: 1;
    bottom: 120%;
    left: 50%;
    margin-left: -75px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.help-mode-tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%; left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--border) transparent transparent transparent;
}
#help-mode-toggle:hover .help-mode-tooltip-text { visibility: visible; opacity: 1; }

#main-help-tooltip {
    position: fixed;
    display: none;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    z-index: 2000;
    pointer-events: none;
    font-size: 0.75rem;
    max-width: 280px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* ============================================================
   MOBILE & RESPONSIVE
   ============================================================ */

.mobile-header,
.nav-close-btn,
.nav-overlay { display: none; }

@media (max-width: 1024px) {
    body {
        padding: 0;
        overflow-y: auto;
    }
    .settings-wrapper {
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
        overflow-x: hidden;
        position: relative;
        height: auto;
    }
    .settings-nav {
        position: fixed;
        top: 65px; left: 0;
        height: calc(100% - 65px);
        width: 270px;
        z-index: 99;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-right: 1px solid var(--border);
        overflow-y: auto;
    }
    .settings-wrapper.nav-is-open .settings-nav {
        transform: translateX(0);
        box-shadow: 5px 0 20px rgba(0,0,0,0.4);
    }
    .nav-close-btn {
        display: block;
        position: absolute;
        top: 10px; right: 14px;
        background: none;
        border: none;
        color: var(--text-secondary);
        font-size: 2.2em;
        line-height: 1;
        cursor: pointer;
        padding: 0;
    }
    .nav-close-btn:hover { color: var(--accent-danger); }
    .settings-nav h1 { padding-right: 48px; }

    .settings-content-wrapper { width: 100%; flex-grow: 1; height: auto; }
    .settings-content { display: block; height: auto; }
    .settings-section.active { flex-grow: 0; overflow-y: visible; }

    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 18px;
        padding-bottom: 14px;
        border-bottom: 1px solid var(--border);
    }
    #mobile-nav-toggle {
        background: var(--bg-secondary);
        color: var(--text-primary);
        border: 1px solid var(--border);
        padding: 7px 9px;
        border-radius: var(--radius-sm);
        font-size: 1.1em;
        line-height: 1;
        cursor: pointer;
        transition: border-color 0.2s;
    }
    #mobile-nav-toggle:hover { border-color: var(--accent-primary); }
    #mobile-nav-toggle i { margin-right: 0; }

    .mobile-section-title {
        font-family: var(--font-display);
        font-size: 1.3em;
        margin: 0;
        color: var(--text-primary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        letter-spacing: 0.3px;
    }

    .nav-overlay {
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(10, 14, 23, 0.7);
        z-index: 1000;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    .settings-wrapper.nav-is-open .nav-overlay {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .dashboard-grid { grid-template-columns: 1fr; }
    .player-card-content { flex-direction: column; }
    .player-card-live-preview { max-width: 100%; }

    #widget-settings-sidebar {
        position: fixed;
        right: 0; top: 0; height: 100%;
        transform: translateX(100%);
        z-index: 1002;
        width: 90%;
        max-width: 310px;
    }
    #widget-settings-sidebar.is-visible { transform: translateX(0); }

    .connection-code-card { flex-direction: column; align-items: flex-start; }
    .code-area { width: 100%; min-width: unset; }
}

@media (max-width: 480px) {
    .settings-content { padding: 10px; }
    .mobile-section-title { font-size: 1.1em; }
    .map-vote-grid { grid-template-columns: 1fr; }
    .player-card-content { flex-direction: column; }
    .leaderboard-dashboard-grid { grid-template-columns: 1fr; }
}

/* account-settings-polish.css
   Polish & depth layer — loads AFTER account-settings.css
   Adds glow effects, animation, depth, and visual refinement
   to match the 404 Server Analytics page quality bar.
   ============================================================ */

/* ============================================================
   BACKGROUND — more visible grid + radial depth overlay
   ============================================================ */

body {
    /* Slightly brighter grid so it actually reads */
    background-image:
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Radial glow from top-left like the analytics page */
body::after {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse, rgba(0, 255, 136, 0.04) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================================
   WRAPPER — tighter glow border
   ============================================================ */

.settings-wrapper {
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 255, 136, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    animation: fadeInDown 0.45s ease-out;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   NAV SIDEBAR — glow, shimmer, active pulse
   ============================================================ */

.settings-nav {
    background: linear-gradient(180deg, #0d1219 0%, #0a0e17 100%);
    border-right: 1px solid rgba(0, 255, 136, 0.1);
    position: relative;
    overflow: hidden;
}

/* Vertical scan-line shimmer on the nav */
.settings-nav::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 255, 136, 0.03) 50%,
        transparent 100%
    );
    animation: navScan 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes navScan {
    0%   { top: -100%; }
    100% { top: 200%; }
}

.settings-nav h1 {
    /* Brighter neon glow on the brand title */
    text-shadow:
        0 0 20px rgba(0, 255, 136, 0.5),
        0 0 40px rgba(0, 255, 136, 0.2);
    position: relative;
}

/* Active nav link — left glow bar + bg glow */
.settings-nav a.active {
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.1) 0%, transparent 100%);
    border-left-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: inset 3px 0 12px rgba(0, 255, 136, 0.15);
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
}

.settings-nav a:hover {
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.06) 0%, transparent 100%);
    border-left-color: rgba(0, 255, 136, 0.3);
}

/* Pulse dot on the active item's icon */
.settings-nav a.active .fa-fw {
    filter: drop-shadow(0 0 4px rgba(0, 255, 136, 0.8));
}

/* ============================================================
   SECTION HEADERS — accent rule + glow
   ============================================================ */

.section-header {
    border-bottom: 1px solid rgba(0, 255, 136, 0.15);
    position: relative;
}

/* Neon underline on the section title */
.section-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), transparent);
    border-radius: 2px;
}

.settings-section h2 {
    background: linear-gradient(135deg, var(--text-primary) 0%, rgba(228, 233, 240, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   WIDGET CARDS — depth gradient + glow border + hover lift
   ============================================================ */

.widget {
    background: linear-gradient(168deg, #141a25 0%, #0e1219 100%);
    border: 1px solid rgba(0, 255, 136, 0.08);
    border-radius: var(--radius-lg);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s ease,
                box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

/* Radial hover glow from top-left like analytics tiles */
.widget::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.05), transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.widget:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 255, 136, 0.25);
    box-shadow:
        0 8px 28px rgba(0, 255, 136, 0.08),
        0 0 0 1px rgba(0, 255, 136, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.widget:hover::before {
    opacity: 1;
}

/* Green top-accent glow line (replaces the solid border-top) */
#profile-snapshot-widget,
.player-card-live-preview {
    border-top: 2px solid var(--accent-primary);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        0 -1px 8px rgba(0, 255, 136, 0.2);
}

/* Widget header — darker strip like analytics modal headers */
.widget-header {
    background: linear-gradient(135deg, #0d1219 0%, #111722 100%);
    border-bottom: 1px solid rgba(0, 255, 136, 0.08);
}

.widget-header h3 {
    color: var(--text-primary);
    letter-spacing: 1px;
}

/* ============================================================
   BUTTONS — ghost style with glow on hover
   ============================================================ */

.save-btn {
    position: relative;
    overflow: hidden;
    letter-spacing: 1.2px;
}

/* Shimmer sweep on hover */
.save-btn::before {
    content: '';
    position: absolute;
    top: -50%; left: -100%;
    width: 100%; height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
    transition: left 0.5s ease;
}

.save-btn:hover:not(:disabled)::before {
    left: 150%;
}

.save-btn:hover:not(:disabled) {
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.25), 0 4px 16px rgba(0, 0, 0, 0.3);
}

.save-btn.danger:hover:not(:disabled) {
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.3), 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   FORM INPUTS — sharper focus glow
   ============================================================ */

.form-group input[type="text"]:focus,
.form-group input[type="date"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent-primary);
    box-shadow:
        0 0 0 3px rgba(0, 255, 136, 0.1),
        0 0 12px rgba(0, 255, 136, 0.05);
    background: linear-gradient(135deg, #0d1219, #111722);
}

/* Hover state on unfocused inputs */
.form-group input[type="text"]:hover,
.form-group input[type="date"]:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: rgba(0, 255, 136, 0.25);
}

/* ============================================================
   STATUS DOTS — pulsing animation
   ============================================================ */

.status.online::before {
    color: var(--accent-primary);
    animation: statusGlow 2s ease-in-out infinite;
}

@keyframes statusGlow {
    0%, 100% { text-shadow: 0 0 4px rgba(0, 255, 136, 0.8); }
    50%       { text-shadow: 0 0 8px rgba(0, 255, 136, 0.4); }
}

/* ============================================================
   SERVER CARDS (pinned widget) — left accent bar glow
   ============================================================ */

.server-card.main-pinned {
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.06) 0%, transparent 100%);
}

.server-status-indicator {
    /* Glowing left bar */
    box-shadow: 2px 0 8px currentColor;
}

/* ============================================================
   CONNECT BUTTONS — full treatment
   ============================================================ */

.connect-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.connect-btn:hover {
    box-shadow: 0 4px 16px rgba(0, 255, 136, 0.3);
    transform: translateY(-1px);
}

/* ============================================================
   LEADERBOARD TILES — hover glow
   ============================================================ */

.leaderboard-tile:hover {
    box-shadow:
        0 6px 20px rgba(0, 255, 136, 0.1),
        0 0 0 1px rgba(0, 255, 136, 0.1);
}

/* ============================================================
   MAP VOTE CARDS — neon hover treatment
   ============================================================ */

.map-vote-card {
    background: linear-gradient(168deg, #141a25 0%, #0e1219 100%);
    border: 1px solid rgba(0, 255, 136, 0.08);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-vote-card:hover {
    box-shadow:
        0 8px 24px rgba(0, 255, 136, 0.1),
        0 0 0 1px rgba(0, 255, 136, 0.08);
}

.map-vote-card.voted-for {
    box-shadow:
        0 0 20px rgba(0, 255, 136, 0.2),
        0 0 0 1px rgba(0, 255, 136, 0.3);
}

/* ============================================================
   VOTE PROGRESS BAR — glowing fill
   ============================================================ */

.vote-progress-bar {
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

/* ============================================================
   USER CARDS (friends) — depth + hover
   ============================================================ */

.user-card {
    background: linear-gradient(135deg, #141a25 0%, #0e1219 100%);
    transition: all 0.2s ease;
}

.user-card:hover {
    box-shadow: 0 4px 16px rgba(0, 255, 136, 0.08);
    transform: translateX(3px);
}

/* ============================================================
   TOAST NOTIFICATIONS — brighter glow border
   ============================================================ */

.toast-notification {
    background: linear-gradient(135deg, #141a25 0%, #0e1219 100%);
    border: 1px solid rgba(0, 255, 136, 0.3);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 255, 136, 0.1);
}

/* ============================================================
   CONNECTION CODE CARDS — left glow bar
   ============================================================ */

.connection-code-card {
    background: linear-gradient(135deg, #141a25 0%, #0e1219 100%);
    border-left: 3px solid var(--accent-primary);
    box-shadow: -2px 0 12px rgba(0, 255, 136, 0.1);
    transition: all 0.2s ease;
}

.connection-code-card:hover {
    box-shadow:
        -2px 0 16px rgba(0, 255, 136, 0.2),
        0 4px 16px rgba(0, 0, 0, 0.3);
    transform: translateX(2px);
}

.code-display.revealed {
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.15);
}

/* ============================================================
   ACHIEVEMENT ICONS — neon hover glow
   ============================================================ */

.achievement-icon:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
    transform: translateY(-2px) scale(1.05);
}

/* ============================================================
   PLAYER CARD LIVE PREVIEW — neon frame
   ============================================================ */

.player-card-live-preview {
    transition: all 0.3s ease;
}

.player-card-live-preview.border-standard {
    box-shadow: 0 0 0 0 transparent;
    border-top: 3px solid var(--card-accent-color);
    box-shadow: 0 -1px 12px rgba(0, 255, 136, 0.2);
}

.player-card-live-preview.border-glow {
    box-shadow:
        0 0 20px var(--card-accent-color),
        0 0 8px var(--card-accent-color) inset,
        0 0 40px rgba(0, 255, 136, 0.1);
}

/* ============================================================
   SQUAD MANAGEMENT — header accent
   ============================================================ */

.squad-manage-header {
    background: linear-gradient(135deg, #141a25 0%, #0e1219 100%);
    border: 1px solid rgba(0, 255, 136, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.squad-manage-logo {
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.2);
}

/* ============================================================
   MODAL — depth + glow border
   ============================================================ */

.modal {
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(0, 255, 136, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.modal-header {
    background: linear-gradient(135deg, #0d1219 0%, #111722 100%);
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
}

/* ============================================================
   EDIT BUTTON — glows when active
   ============================================================ */

.edit-btn.active-edit {
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.25);
    animation: editPulse 2s ease-in-out infinite;
}

@keyframes editPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 255, 136, 0.2); }
    50%       { box-shadow: 0 0 18px rgba(0, 255, 136, 0.4); }
}

/* ============================================================
   WIDGET EDIT OVERLAY — cleaner ghost mode
   ============================================================ */

#dashboard.is-editing .widget {
    border: 1px dashed rgba(0, 255, 136, 0.35);
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.06), inset 0 0 20px rgba(0, 255, 136, 0.03);
}

#dashboard.is-editing .widget.is-selected {
    border: 1px solid var(--accent-primary);
    box-shadow: 0 0 24px rgba(0, 255, 136, 0.2), inset 0 0 20px rgba(0, 255, 136, 0.05);
}

/* ============================================================
   SORTABLE DRAG — neon ghost
   ============================================================ */

.sortable-ghost {
    opacity: 0.25;
    background: rgba(0, 255, 136, 0.06) !important;
    border: 1px dashed var(--accent-primary) !important;
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.15) !important;
}

.sortable-drag {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(0, 255, 136, 0.3) !important;
}

/* ============================================================
   LEADERBOARD ENTRIES — left-slide hover
   ============================================================ */

.leaderboard-list-entry {
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.leaderboard-list-entry:hover {
    background: rgba(0, 255, 136, 0.04) !important;
    border-left-color: var(--accent-primary);
    transform: translateX(3px);
}

/* Top 3 rank numbers — glow */
.leaderboard-list-entry:nth-child(1) .leaderboard-rank {
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}
.leaderboard-list-entry:nth-child(2) .leaderboard-rank {
    text-shadow: 0 0 8px rgba(192, 192, 192, 0.5);
}
.leaderboard-list-entry:nth-child(3) .leaderboard-rank {
    text-shadow: 0 0 8px rgba(205, 127, 50, 0.5);
}

/* ============================================================
   PROGRESS / LEVEL BAR — glow pulse
   ============================================================ */

.level-progress-bar {
    box-shadow: 0 0 10px var(--card-accent-color, var(--accent-primary));
    animation: progressGlow 3s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% { box-shadow: 0 0 6px var(--card-accent-color, var(--accent-primary)); }
    50%       { box-shadow: 0 0 14px var(--card-accent-color, var(--accent-primary)); }
}

/* ============================================================
   RADIO PILLS — active glow
   ============================================================ */

.radio-group-pills input[type="radio"]:checked + label {
    box-shadow: inset 0 0 8px rgba(0, 255, 136, 0.15);
}

/* ============================================================
   FEEDBACK MESSAGE — glow border
   ============================================================ */

#feedback-message.success {
    box-shadow: 0 4px 24px rgba(0, 255, 136, 0.25), 0 0 0 1px rgba(0, 255, 136, 0.2);
}
#feedback-message.error {
    box-shadow: 0 4px 24px rgba(255, 51, 102, 0.25), 0 0 0 1px rgba(255, 51, 102, 0.2);
}

/* ============================================================
   AUTH PROVIDER CARDS — depth
   ============================================================ */

.auth-provider-container {
    background: linear-gradient(135deg, #141a25 0%, #0e1219 100%);
    border: 1px solid rgba(0, 255, 136, 0.08);
    transition: border-color 0.2s ease;
}

.auth-provider-container:hover {
    border-color: rgba(0, 255, 136, 0.2);
}

/* ============================================================
   WIDGET SETTINGS SIDEBAR — depth
   ============================================================ */

#widget-settings-sidebar {
    background: linear-gradient(180deg, #0d1219 0%, #0a0e17 100%);
    border-left: 1px solid rgba(0, 255, 136, 0.1);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   PROMO CARDS — success green glow
   ============================================================ */

.promo-code-card {
    background: linear-gradient(135deg, #141a25 0%, #0e1219 100%);
    border-left: 3px solid var(--accent-primary);
}

.promo-code-card:hover {
    box-shadow:
        -2px 0 12px rgba(0, 255, 136, 0.15),
        0 4px 16px rgba(0, 0, 0, 0.3);
    transform: translateX(2px);
}

/* ============================================================
   SQUAD TAB ACTIVE — underline glow
   ============================================================ */

.squad-tab-link.active {
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

/* ============================================================
   HELP MODE TOGGLE — cleaner glow ring
   ============================================================ */

#help-mode-toggle {
    background: linear-gradient(135deg, #141a25, #0e1219);
}

#help-mode-toggle.help-toggle-on {
    box-shadow:
        0 0 0 2px rgba(0, 255, 136, 0.3),
        0 0 16px rgba(0, 255, 136, 0.4),
        0 0 4px rgba(0, 255, 136, 0.2);
}

#help-mode-toggle.help-toggle-off {
    box-shadow:
        0 0 0 2px rgba(155, 89, 182, 0.3),
        0 0 16px rgba(155, 89, 182, 0.4),
        0 0 4px rgba(155, 89, 182, 0.2);
}

/* ============================================================
   VIP WIDGET — gold glow treatment
   ============================================================ */

.vip-widget {
    border-top: 2px solid #ffd700;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        0 -1px 10px rgba(255, 215, 0, 0.15);
}

/* ============================================================
   STAT ITEMS — subtle hover
   ============================================================ */

.stat-item {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-item:hover {
    border-color: rgba(0, 255, 136, 0.2);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.06);
}

/* ============================================================
   SECTION STAGGER — page load animation
   ============================================================ */

.settings-section.active .widget {
    animation: widgetFadeUp 0.35s ease-out backwards;
}

.settings-section.active .widget:nth-child(1) { animation-delay: 0.05s; }
.settings-section.active .widget:nth-child(2) { animation-delay: 0.10s; }
.settings-section.active .widget:nth-child(3) { animation-delay: 0.15s; }
.settings-section.active .widget:nth-child(4) { animation-delay: 0.20s; }

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

/* ============================================================
   SCROLLBAR — neon green thumb
   ============================================================ */

.settings-section.active::-webkit-scrollbar       { width: 5px; }
.settings-section.active::-webkit-scrollbar-track { background: var(--bg-primary); }
.settings-section.active::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.25);
    border-radius: 3px;
    transition: background 0.2s;
}
.settings-section.active::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}
/* ==================== PLAYER CARD EDITOR ==================== */

.card-editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6, 32px);
    margin-top: var(--space-5, 24px);
}

@media (max-width: 1024px) {
    .card-editor-grid {
        grid-template-columns: 1fr;
    }
}

.card-preview-section,
.card-options-section {
    background: rgba(20, 25, 35, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: var(--space-5, 24px);
    backdrop-filter: blur(12px);
}

.card-preview-section h3,
.card-options-section h3 {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.2rem;
    color: #00e57a;
    margin-bottom: var(--space-5, 24px);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.card-preview-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 2 / 1;
    margin: 0 auto var(--space-5, 24px);
    border: 2px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    overflow: hidden;
    background: #05070a;
}

.card-preview-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.card-preview-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-3, 12px);
    background: rgba(5, 7, 10, 0.9);
    color: #8fa8c0;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 1px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.card-preview-loading.active {
    opacity: 1;
    pointer-events: auto;
}

.spinner-small {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.07);
    border-top-color: #00e57a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.card-shareable-link-section {
    background: rgba(30, 40, 55, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: var(--space-4, 16px);
}

.card-shareable-link-section h4 {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    color: #eef2f7;
    margin-bottom: var(--space-3, 12px);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.link-display-flex {
    display: flex;
    gap: var(--space-2, 8px);
    margin-bottom: var(--space-2, 8px);
}

.link-display-flex input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #eef2f7;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    padding: var(--space-2, 8px) var(--space-3, 12px);
    border-radius: 4px;
}

.card-help-text {
    font-size: 0.8rem;
    color: #516678;
    margin: 0;
}

.card-option-group {
    margin-bottom: var(--space-5, 24px);
}

.card-option-group > label {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: #8fa8c0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: var(--space-3, 12px);
}

.card-option-group input[type="text"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #eef2f7;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    padding: var(--space-3, 12px);
    border-radius: 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.card-option-group input[type="text"]:focus {
    border-color: #00e57a;
    box-shadow: 0 0 0 2px rgba(0, 229, 122, 0.12);
    outline: none;
}

.card-char-count {
    display: block;
    text-align: right;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: #516678;
    margin-top: 4px;
}

.card-color-picker-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4, 16px);
}

.card-color-picker-item label {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: #516678;
    text-transform: uppercase;
    margin-bottom: var(--space-2, 8px);
    letter-spacing: 1px;
}

.card-color-picker-item input[type="color"] {
    width: 100%;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.07);
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    transition: border-color 0.2s;
}

.card-color-picker-item input[type="color"]:hover {
    border-color: #00e57a;
}

.card-toggle-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-3, 12px);
}

.card-toggle-item {
    display: flex;
    align-items: center;
    gap: var(--space-3, 12px);
    cursor: pointer;
    padding: var(--space-3, 12px);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 4px;
    transition: background 0.2s, border-color 0.2s;
}

.card-toggle-item:hover {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.13);
}

.card-toggle-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: #00e57a;
}

.card-toggle-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    color: #eef2f7;
}

.card-stats-toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-2, 8px);
}

.card-stats-toggle-grid .card-toggle-item {
    padding: var(--space-2, 8px) var(--space-3, 12px);
}

.card-stats-toggle-grid .card-toggle-label {
    font-size: 0.85rem;
}

.card-save-status {
    margin-top: var(--space-3, 12px);
    padding: var(--space-3, 12px);
    border-radius: 4px;
    text-align: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 1px;
    display: none;
}

.card-save-status.success {
    display: block;
    background: rgba(0, 229, 122, 0.15);
    border: 1px solid #00e57a;
    color: #00e57a;
}

.card-save-status.error {
    display: block;
    background: rgba(255, 68, 85, 0.15);
    border: 1px solid #ff4455;
    color: #ff4455;
}

/* ==================== ENHANCED PLAYER CARD FEATURES ==================== */

/* Profile Picture Section */
.card-profile-picture-section {
    display: flex;
    align-items: center;
    gap: var(--space-4, 16px);
    padding: var(--space-3, 12px);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
}

.card-avatar-preview {
    flex-shrink: 0;
}

.card-avatar-controls {
    flex: 1;
}

/* Select Dropdown Styling */
.card-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #eef2f7;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    padding: var(--space-3, 12px);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.card-select:focus {
    border-color: #00e57a;
    box-shadow: 0 0 0 2px rgba(0, 229, 122, 0.12);
    outline: none;
}

.card-select option {
    background: #0a0e14;
    color: #eef2f7;
}

/* Slider Styling */
.card-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.07);
    outline: none;
    -webkit-appearance: none;
}

.card-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00e57a;
    cursor: pointer;
    transition: transform 0.2s;
}

.card-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.card-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00e57a;
    cursor: pointer;
    border: none;
    transition: transform 0.2s;
}

.card-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* Texture Grid */
.card-texture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: var(--space-2, 8px);
}

.card-texture-option {
    aspect-ratio: 1;
    border: 2px solid rgba(255, 255, 255, 0.13);
    border-radius: 4px;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    transition: border-color 0.2s, transform 0.2s;
    position: relative;
}

.card-texture-option:hover {
    border-color: #00e57a;
    transform: scale(1.05);
}

.card-texture-option.selected {
    border-color: #00e57a;
    box-shadow: 0 0 0 2px rgba(0, 229, 122, 0.25);
}

.card-texture-option.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.card-texture-option.locked::after {
    content: '\f023';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff4455;
    font-size: 1.2rem;
}

/* VIP Lock Indicator */
.vip-lock-indicator {
    display: inline-block;
    margin-left: var(--space-2, 8px);
    font-size: 0.75rem;
    color: #ff9500;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 1px;
}

.vip-lock-indicator i {
    margin-right: 4px;
}

/* Border Preview Styles */
.card-border-preview {
    margin-top: var(--space-3, 12px);
    padding: var(--space-4, 16px);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: #8fa8c0;
}

/* Drag-and-Drop Layout Editor */
#card-preview-draggable-container.layout-edit-mode {
    cursor: move;
}

#card-preview-draggable-container.layout-edit-mode .draggable-element {
    border: 2px dashed #00e57a;
    position: absolute;
    cursor: move;
    transition: opacity 0.2s;
}

#card-preview-draggable-container.layout-edit-mode .draggable-element:hover {
    opacity: 0.8;
}

.draggable-element {
    user-select: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-profile-picture-section {
        flex-direction: column;
        text-align: center;
    }

    .card-color-picker-grid {
        grid-template-columns: 1fr;
    }

    .card-texture-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
}
