:root {
    --bg-dark: #0a0b12;
    --surface: rgba(22, 24, 37, 0.7);
    --surface-light: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --accent: #ffd100;
    /* WoW Gold */
    --accent-glow: rgba(255, 209, 0, 0.2);
    --text-primary: #e2e8f0;
    --text-muted: #94a3b8;

    /* WoW Class Colors */
    --class-warrior: #C79C6E;
    --class-paladin: #F58CBA;
    --class-hunter: #ABD473;
    --class-rogue: #FFF569;
    --class-priest: #FFFFFF;
    --class-death-knight: #C41F3B;
    --class-shaman: #0070DE;
    --class-mage: #69CCF0;
    --class-warlock: #9482C9;
    --class-monk: #00FF96;
    --class-druid: #FF7D0A;
    --class-demon-hunter: #A330C9;
    --class-evoker: #33937F;
    
    /* Faction Colors */
    --alliance-blue: #004a95;
    --alliance-gold: #ffcc00;
    --horde-red: #8c1616;
    --horde-black: #1a0000;
}

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

/* WoW Atmospheric Background */
body {
    font-family: 'Inter', sans-serif;
    background-color: #05060a;
    background-image:
        radial-gradient(circle at 50% 0%, rgba(255, 180, 0, 0.08) 0%, transparent 50%), /* Top Sun/Portal Glow */
        radial-gradient(circle at 10% 20%, rgba(0, 74, 149, 0.15) 0%, transparent 40%),  /* Alliance Blue subtle bleed */
        radial-gradient(circle at 90% 80%, rgba(140, 22, 22, 0.15) 0%, transparent 40%);  /* Horde Red subtle bleed */
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* WoW 'Textured Faction' Tile Overlay */
body::before {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    /* Sparse Diagonal Alliance & Horde Logos - Detailed & Etched */
    background-image: url("data:image/svg+xml,%3Csvg width='280' height='280' viewBox='0 0 280 280' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='hatch' width='4' height='4' patternUnits='userSpaceOnUse' patternTransform='rotate(45)'%3E%3Cline x1='0' y1='0' x2='0' y2='4' stroke='%23ffffff' stroke-width='1' stroke-opacity='0.2'/%3E%3C/pattern%3E%3C/defs%3E%3Cg fill='url(%23hatch)'%3E%3C!-- Detailed Alliance Shield & Lion --%3E%3Cpath d='M30 30 c0-10 15-20 40-20 s40 10 40 20 c0 15-10 35-40 60 c-30-25-40-45-40-60 M40 35 c0-10 10-15 30-15 s30 5 30 15 c0 10-5 25-30 45 c-25-20-30-35-30-45 M60 30 q10 -10 20 0 q-10 25 -10 40 q0-15 -10-40 M55 45 l5 10 l5-10 M48 40 h24'/%3E%3C!-- Detailed Horde Spiky Symbol --%3E%3Cpath d='M160 140 l15-10 l15 10 l10 30 c-10 25-30 25-40 0 l-10-30 l15-10 M175 145 l10 15 l-10 15 l-10-15 z M175 155 v30 M165 170 h20'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 280px 280px;
    transform: rotate(-15deg);
    transform-origin: center;
    opacity: 0.6;
    pointer-events: none;
    z-index: 1000;
}

/* Strong Faction Bloom (Back-glows) */
.app-wrapper::before,
.app-wrapper::after {
    content: '';
    position: fixed;
    top: 0; bottom: 0;
    width: 600px;
    pointer-events: none;
    z-index: -1;
    opacity: 0.18;
    filter: blur(120px);
}

.app-wrapper::before {
    left: -100px;
    background: radial-gradient(circle at 0% 50%, #0066cc, transparent 80%);
}

.app-wrapper::after {
    right: -100px;
    background: radial-gradient(circle at 100% 50%, #cc3333, transparent 80%);
}

h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
    background: transparent;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(10, 11, 18, 0.85);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 209, 0, 0.1);
    display: flex;
    flex-direction: column;
    padding: 2rem 0;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 2rem 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.sidebar-logo .logo-icon {
    width: 32px;
    height: 32px;
    color: var(--accent);
    filter: drop-shadow(0 0 8px var(--accent-glow));
    margin-top: 2px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.guild-name-main {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.guild-server-info {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.app-title-tag {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 4px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    width: fit-content;
}

.sidebar-nav {
    flex: 1;
    padding: 0 1rem;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(255, 209, 0, 0.2), rgba(255, 209, 0, 0.05));
    color: var(--accent);
    box-shadow: inset 2px 0 0 var(--accent), 0 0 15px rgba(255, 209, 0, 0.1);
    text-shadow: 0 0 8px rgba(255, 209, 0, 0.3);
}

.sidebar-bottom {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 1px solid var(--border);
}

.sidebar-action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateY(-1px);
}

.sidebar-action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Main Body */
.main-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: calc(100% - 280px);
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2.5rem;
    background: transparent;
    border-bottom: 1px solid var(--border);
}

.header-path #current-page-title {
    font-family: 'Outfit';
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.dashboard {
    padding: 2rem 2.5rem;
    flex: 1;
}

.view-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.view-content.active {
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap; /* Safety for small screens */
}

.actions-btn {
    display: inline-flex; /* Use inline-flex for better width handling */
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap; /* Prevent vertical text */
    height: 40px;
}

.actions-btn i {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.actions-btn.btn-gold {
    background: var(--accent) !important;
    color: #000 !important;
    border: none !important;
}

.actions-btn.btn-gold i {
    color: #000;
}

.actions-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-1px);
}

.actions-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 209, 0, 0.4);
}

/* Empty State View */
.empty-state-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state-view i {
    width: 64px;
    height: 64px;
    color: var(--accent);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state-view h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.empty-state-view p {
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.placeholder-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 800px;
}

.placeholder-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
}

.placeholder-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.placeholder-card i {
    width: 32px;
    height: 32px;
    margin-bottom: 0;
}

.placeholder-card h3 {
    font-size: 1.1rem;
}

.placeholder-card p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

.current-guild-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    animation: fadeIn 0.5s ease-out;
}

.info-tag {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-tag i {
    width: 18px;
    height: 18px;
    color: var(--accent);
    filter: drop-shadow(0 0 5px var(--accent-glow));
}

.info-tag:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.1));
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.2);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    filter: grayscale(1);
}

.clear-btn {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.clear-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fff;
    transform: translateY(-2px);
}

.settings-btn {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-btn:hover {
    background: var(--surface-light);
    color: #fff;
    transform: translateY(-2px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #111827;
    margin: 5vh auto;
    padding: 0;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.modal-header {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.25rem;
    color: var(--accent);
}

.close-btn,
.close-modal {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 1.2rem;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.close-btn:hover,
.close-modal:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.modal-body {
    padding: 1.5rem;
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.75rem;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #fff;
    outline: none;
}

.help-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.backend-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    color: #60a5fa;
    font-size: 0.8rem;
}

.modal-footer {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.clear-btn i {
    width: 18px;
    height: 18px;
}

.sync-btn i {
    width: 18px;
    height: 18px;
}

.sync-loading {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-card.horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0.75rem 1.25rem;
    height: 80px;
    gap: 1.25rem;
}

.stat-card.horizontal .stat-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.stat-card.horizontal .stat-info {
    justify-content: center;
}

.stat-card.horizontal .stat-value {
    font-size: 1.25rem;
    line-height: 1.2;
}

/* Sidebar Submenu */
.nav-item-wrapper {
    display: flex;
    flex-direction: column;
}

.submenu-arrow {
    margin-left: auto;
    width: 16px !important;
    height: 16px !important;
    transition: transform 0.3s ease;
}

.nav-item.active .submenu-arrow {
    transform: rotate(180deg);
}

.nav-submenu {
    display: none;
    flex-direction: column;
    padding-left: 3rem;
    margin-bottom: 0.5rem;
    animation: slideDown 0.3s ease-out;
}

.nav-item.active + .nav-submenu {
    display: flex;
}

/* View Toggle Group for Staging */
.view-toggle-group {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px;
    margin-right: 8px;
    height: 40px;
    align-items: center;
}

.toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    height: 100%;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.toggle-btn.active {
    background: var(--accent);
    color: #000;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.toggle-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.btn-gold {
    background: linear-gradient(135deg, #ffd700, #ff8c00) !important;
    color: #000 !important;
    border: none !important;
}

.btn-gold:hover {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4) !important;
}

.nav-subitem {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    position: relative;
}

.nav-subitem::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    width: 4px;
    height: 4px;
    background: var(--border);
    border-radius: 50%;
    transform: translateY(-50%);
}

.nav-subitem:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-subitem.active {
    color: var(--accent);
    font-weight: 600;
}

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

/* Points Compact Entry UI */
.points-compact-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.points-entry-bar {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.entry-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.entry-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
}

.entry-group input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    color: #fff;
    outline: none;
    transition: all 0.2s;
}

.entry-group input:focus {
    border-color: var(--accent);
}

.owner-cell {
    position: relative;
    cursor: pointer;
    min-width: 140px;
}

.owner-display {
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-block;
    border: 1px solid transparent;
}

.owner-cell:hover .owner-display {
    background: rgba(var(--primary-rgb), 0.05);
    border-color: rgba(var(--primary-rgb), 0.2);
    color: var(--primary);
}

.owner-display.empty {
    color: var(--text-muted);
}

.owner-input {
    width: 100%;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9em;
    background: var(--bg-card);
    color: var(--text-main);
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

.owner-input:focus {
    border-color: var(--primary);
}

.activity-group { width: 180px; }
.names-group { flex: 1; }
.value-group { width: 90px; }

.parse-btn-compact {
    height: 42px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 1.25rem;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.parse-btn-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.parse-results-compact {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    animation: fadeIn 0.4s ease-out;
}

.results-header {
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-title {
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 600;
}

.submit-points-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-points-action:hover {
    box-shadow: 0 0 15px var(--accent-glow);
}

.results-table-compact {
    max-height: 480px;
    overflow-y: auto;
}

.results-table-compact table {
    width: 100%;
    border-collapse: collapse;
}

.results-table-compact th {
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

/* Points Table Visual Distinctness */
.source-name-text {
    color: #eab308; /* Soft Amber/Gold for raw data */
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.matched-owner-col .re-match-input {
    color: var(--accent); /* Our primary brand/matched color */
    font-weight: 700;
    font-size: 0.95rem;
    background: rgba(255, 209, 0, 0.05);
    border: 1px solid rgba(255, 209, 0, 0.1);
}

.matched-owner-col .re-match-input.unmatched {
    color: #94a3b8;
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(239, 68, 68, 0.2);
}

.match-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.match-status-badge.success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.match-status-badge.fail {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.match-status-badge i {
    width: 14px;
    height: 14px;
}

/* Specific Row Indicators */
.parsed-row-fail {
    background: rgba(239, 68, 68, 0.02);
}

.parsed-row-success {
    background: rgba(34, 197, 94, 0.01);
}

.re-match-btn i {
    width: 16px;
    height: 16px;
}

.stat-icon {
    width: 42px;
    height: 42px;
    background: var(--surface-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.stat-icon.class-priest {
    color: var(--class-priest);
}

.stat-icon.class-shaman {
    color: var(--class-shaman);
}

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

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Outfit';
}

/* Controls Layout and Alignment */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
}

.compact-controls {
    display: flex;
    gap: 0.75rem;
    margin-left: auto;
}

.search-box,
.filter-group,
.threshold-control,
.page-size-control {
    display: flex;
    align-items: center;
    height: 40px;
    /* Consistent Height for all controls */
}

.search-box {
    position: relative;
    flex: 1.5;
    min-width: 300px;
    display: flex;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: initial;
}

.threshold-control,
.page-size-control {
    background: var(--surface);
    padding: 0 0.75rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

/* Unified Element Styling */
.search-box input,
.filter-group select,
.threshold-control input,
.page-size-control select {
    height: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box input {
    width: 100%;
    padding: 0 1.5rem 0 3rem;
}

.search-box i {
    position: absolute;
    left: 1.25rem;
    color: var(--text-muted);
    pointer-events: none;
}

.filter-group select {
    padding: 0 1.5rem 0 1rem;
    min-width: 140px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.threshold-control input,
.page-size-control select {
    background: transparent;
    border: none;
    padding: 0 0.5rem;
    font-weight: 700;
    color: var(--accent);
}

.page-size-control select {
    padding-right: 1.5rem;
}

.search-box input:focus,
.filter-group select:focus,
.threshold-control:focus-within,
.page-size-control:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 209, 0, 0.1);
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0 0.5rem;
    height: 100%;
}

.checkbox-container input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.checkbox-label:hover {
    color: var(--text-primary);
}

select {
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: #fff;
    outline: none;
    cursor: pointer;
}

/* Table Card */
.table-card {
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 70%), 
                var(--surface);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 209, 0, 0.15); /* Subtle Gold Top Ridge */
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.table-card:hover {
    border-color: rgba(255, 209, 0, 0.25);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 209, 0, 0.05);
}

.table-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem;
    border-radius: 10px;
}

.tab-btn {
    padding: 0.5rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--surface-light);
    color: var(--accent);
}

.tab-btn:hover:not(.active) {
    color: var(--text-primary);
}

.status-badge {
    padding: 0.4rem 0.8rem;
    background: var(--surface-light);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Pagination Footer */
.pagination-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border);
}

.page-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.page-info span {
    color: var(--text-primary);
    font-weight: 600;
}

.pagination-btns {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 0.25rem;
}

.page-num {
    padding: 0.25rem 0.75rem;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
}

.page-num:hover:not(.active) {
    background: var(--surface-light);
    color: var(--text-primary);
}

.page-num.active {
    background: var(--accent);
    color: #000;
}

.page-btn i {
    width: 16px;
    height: 16px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    user-select: none;
    position: relative;
}

th:hover {
    color: var(--text-primary);
}

th::after {
    content: '';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    opacity: 0.5;
}

th.sort-asc::after {
    content: '▲';
    color: var(--accent);
    opacity: 1;
}

th.sort-desc::after {
    content: '▼';
    color: var(--accent);
    opacity: 1;
}

/* Specific Cell Styles */
td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Specific Cell Styles */
.role-name {
    font-weight: 600;
}

.level-badge {
    padding: 0.25rem 0.5rem;
    background: var(--surface-light);
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: monospace;
}

.class-pill {
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.3);
}

.rank-pill {
    padding: 0.3rem 0.6rem;
    background: rgba(255, 209, 0, 0.1);
    color: var(--accent);
    border: 1px solid rgba(255, 209, 0, 0.2);
    border-radius: 4px;
    font-size: 0.75rem;
}

.owner-cell {
    cursor: pointer;
    min-width: 120px;
}

.inline-edit-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--accent);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    outline: none;
    font-size: 0.9rem;
    box-shadow: 0 0 10px var(--accent-glow);
}

.owner-cell:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.owner-input {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--accent);
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    outline: none;
}

.ilvl-cell {
    font-weight: 700;
    color: #fff;
}

.last-seen {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem !important;
    color: var(--text-muted);
}

.empty-state i {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.3;
}
/* Gold Outline Button Style */
.btn-gold-outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    box-shadow: 0 0 10px rgba(255, 209, 0, 0.05);
}

.btn-gold-outline:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 20px rgba(255, 209, 0, 0.3);
    transform: translateY(-2px);
}

.btn-gold-outline:active {
    transform: translateY(0);
}

/* Footer */
.main-footer {
    margin-top: 3rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-bottom: 2rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Class Color Helpers */
.color-warrior {
    color: var(--class-warrior);
}

.color-paladin {
    color: var(--class-paladin);
}

.color-hunter {
    color: var(--class-hunter);
}

.color-rogue {
    color: var(--class-rogue);
}

.color-priest {
    color: var(--class-priest);
}

.color-deathknight {
    color: var(--class-death-knight);
}

.color-shaman {
    color: var(--class-shaman);
}

.color-mage {
    color: var(--class-mage);
}

.color-warlock {
    color: var(--class-warlock);
}

.color-monk {
    color: var(--class-monk);
}

.color-druid {
    color: var(--class-druid);
}

.color-demonhunter {
    color: var(--class-demon-hunter);
}

.color-evoker {
    color: var(--class-evoker);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.loading-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--surface-light);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: spin 1s cubic-bezier(0.1, 0.7, 0.1, 1) infinite;
    box-shadow: 0 0 20px var(--accent-glow);
}

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

.loader-content p {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.98); }
}

/* Inactive/Exited Members */
.inactive-row {
    opacity: 0.55;
    background: rgba(239, 68, 68, 0.03) !important;
}

.inactive-row .role-name {
    text-decoration: line-through;
    color: var(--text-muted) !important;
}

.high-count-row {
    background: rgba(255, 209, 0, 0.05) !important;
}

.high-count-row td:first-child {
    border-left: 3px solid var(--accent);
}

/* Status Chips and Selection */
.status-chip {
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}
.status-chip.active {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}
.status-chip.inactive {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
}
.status-chip.left {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.confirmed-left-row {
    filter: grayscale(1);
    opacity: 0.4 !important;
}

.status-select {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.status-select:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.action-cell {
    text-align: center;
    width: 60px;
}

.status-action-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    transition: all 0.23s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    margin: 0 auto;
}

.status-action-box:hover {
    background: var(--surface);
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.1);
    box-shadow: 0 0 12px var(--accent-glow);
}

.status-action-box i, .status-action-box svg {
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.icon-select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    z-index: 2;
}

.exited-tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 4px;
    margin-left: 0.5rem;
    font-weight: 700;
    text-decoration: none !important;
    display: inline-flex;
}

.actions-btn {
    display: flex;
    align-items: center;
    padding: 0.6rem;
    background: var(--surface-light);
    color: var(--accent);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.actions-btn:hover {
    background: var(--surface);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.actions-btn i, .actions-btn svg {
    width: 20px;
    height: 20px;
}

.data-actions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.data-action-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s !important;
    text-align: left;
    width: 100%;
}

.data-action-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(5px);
}

.data-action-item i, .data-action-item svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.action-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.action-info strong {
    font-size: 0.95rem;
    color: #fff;
}

.action-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}
/* Faction Decorative Elements */
.faction-decoration {
    position: fixed;
    bottom: -30px;
    opacity: 0.05;
    z-index: -1;
    pointer-events: none;
    transition: transform 0.5s ease-out;
}

.faction-decoration.alliance {
    left: 20px;
    color: var(--alliance-blue);
    transform: rotate(-10deg);
}

.faction-decoration.horde {
    right: 20px;
    color: var(--horde-red);
    transform: rotate(10deg);
}

.faction-decoration svg {
    width: 280px;
    height: 280px;
    fill: currentColor;
}

@media (max-width: 1024px) {
    .faction-decoration {
        display: none;
    }
}

/* Toast Notification Styles */
.toast {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--accent);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 40px;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--accent-glow);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    border-color: #ef4444;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 15px rgba(239, 68, 68, 0.3);
}

.toast-icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.error .toast-icon {
    color: #ef4444;
}

/* Grouped Points History Styles */
.history-batch-row:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

.history-members-td {
    padding: 1rem !important;
}

.member-pills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 600px;
}

.member-pill-mini {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.member-pill-mini:hover {
    background: rgba(96, 165, 250, 0.1);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}


/* Recall Action Styles */
.recalled-row {
    text-decoration: line-through;
    opacity: 0.5;
    filter: grayscale(0.8);
    background: rgba(239, 68, 68, 0.02) !important;
}

.recalled-row .points-badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.recall-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.recall-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
    transform: rotate(-45deg);
}

.recall-btn i {
    width: 16px;
    height: 16px;
}

/* Guild Identity Badges in Sidebar Header */
.guild-badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.guild-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.guild-tag i {
    width: 12px;
    height: 12px;
}

.guild-tag.guild-name-tag {
    background: rgba(var(--accent-rgb), 0.15);
    border-color: rgba(var(--accent-rgb), 0.3);
    color: var(--accent);
    font-weight: 600;
}

.loading-pulse {
    font-size: 0.8rem;
    color: var(--class-priest);
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

.toggle-group {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    height: 38px;
}

.toggle-group input[type="radio"] {
    display: none;
}

.toggle-group label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 !important;
}

.toggle-group input[type="radio"]:checked + label {
    background: var(--accent);
    color: #000;
}

.mode-group { width: 140px; }

.recent-records-compact {
    margin-top: 1.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.recent-records-compact .results-title {
    color: var(--accent);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.recent-records-compact table th {
    font-size: 0.75rem;
    padding: 8px 12px;
}

.recent-records-compact table td {
    font-size: 0.8rem;
    padding: 8px 12px;
}

.table-wrapper-compact {
    overflow-x: auto;
    padding: 0 1rem 1rem 1rem;
}

.table-wrapper-compact table {
    width: 100%;
    border-collapse: collapse;
}

.table-wrapper-compact th {
    text-align: left;
    padding: 10px 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    font-weight: 500;
}

.table-wrapper-compact td {
    padding: 10px 12px;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-wrapper-compact tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Personality System Styles */
.personality-container {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.personality-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.8));
    padding: 1.5rem 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    flex-wrap: wrap;
    gap: 1.5rem;
}

.personality-header h2 {
    font-size: 1.75rem;
    color: #f8fafc;
    margin-bottom: 0.5rem;
}

.personality-header p {
    color: #94a3b8;
    font-size: 0.95rem;
}

.personality-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.personality-card-main {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-title-bar {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title-bar h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.dimension-list {
    padding: 1.25rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.dimension-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.dim-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.dim-name {
    font-weight: 600;
    color: var(--accent);
    font-size: 0.9rem;
}

.dim-codes {
    font-family: monospace;
    font-size: 0.85rem;
    color: #94a3b8;
}

.dim-labels {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.dim-label {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: center;
}

.dim-vs {
    font-size: 0.7rem;
    color: #475569;
    font-weight: 700;
}

.types-table-wrapper {
    flex: 1;
    overflow-y: auto;
    max-height: 700px;
}

.types-table-wrapper th {
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 5;
}

.action-icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #94a3b8;
    padding: 0.4rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
    transform: scale(1.1);
}

.action-icon-btn i {
    width: 14px;
    height: 14px;
}

.type-edit-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.4rem;
    border-radius: 4px;
    width: 100%;
}

/* Personality Test Styles */
.personality-test-content {
    max-width: 650px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(255, 209, 0, 0.2);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 209, 0, 0.05);
}

.test-welcome {
    padding: 30px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.test-icon-large {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(255, 209, 0, 0.3));
}

.test-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.test-step.active {
    display: block;
}

.xp-bar-container {
    height: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    overflow: hidden;
    margin: 20px 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd100, #f59e0b);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 10px rgba(255, 209, 0, 0.4);
}

.question-box {
    padding: 20px;
    margin-top: 20px;
}

.question-box h3 {
    font-size: 1.35rem;
    margin-bottom: 25px;
    color: #f8fafc;
    line-height: 1.4;
}

.options-grid {
    display: grid;
    gap: 15px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #cbd5e1;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.option-btn:hover {
    background: rgba(255, 209, 0, 0.1);
    border-color: var(--accent);
    transform: translateX(5px);
    color: var(--accent);
}

.option-label {
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Result Card Design */
.result-card-inner {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 209, 0, 0.3);
    border-radius: 16px;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.result-card-inner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,209,0,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.result-header {
    text-align: center;
    margin-bottom: 25px;
}

.result-type-name {
    font-size: 2.5rem;
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(to bottom, #fff, #ffd100);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 10px 0;
}

.result-code {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent);
    color: #000;
    font-weight: 800;
    border-radius: 4px;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.result-desc {
    color: #94a3b8;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 30px;
}

.member-name-tag {
    display: block;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    color: rgba(255, 209, 0, 0.8);
    margin-top: 20px;
}

.test-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}


.personality-badge-mini {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 6px;
    background: rgba(255, 209, 0, 0.15);
    color: var(--accent);
    border: 1px solid rgba(255, 209, 0, 0.3);
    border-radius: 4px;
    font-weight: 600;
    max-width: fit-content;
    white-space: nowrap;
}

.dim-labels-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: flex-start;
    gap: 1.5rem;
    margin-top: 10px;
}

.dim-pole {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dim-desc {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.4;
}

.dim-pole .dim-label {
    background: rgba(255, 209, 0, 0.1);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    text-align: center;
    border: 1px solid rgba(255, 209, 0, 0.2);
}

.personality-radar-mini {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 0 5px rgba(255, 209, 0, 0.2));
}

.personality-radar-mini circle {
    stroke-dasharray: 2, 2;
}

.radar-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.radar-placeholder .personality-radar-mini {
    width: 200px;
    height: 200px;
}

.dim-parse-line {
    margin-bottom: 2px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.dim-parse-title {
    color: #64748b;
    font-weight: 600;
}

.dim-parse-val {
    color: #cbd5e1;
    font-weight: 500;
}

/* Toast Notifications - Professional WoW Style */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: rgba(10, 11, 18, 0.95);
    border: 1px solid var(--accent);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 209, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    transform: translateX(120%);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.toast i {
    color: var(--accent);
}

.toast.error i {
    color: #ef4444;
}

/* Simulation Report Styles */
.wide-modal {
    max-width: 850px;
    width: 90%;
}

.sim-summary {
    background: rgba(255, 209, 0, 0.05);
    border: 1px dashed var(--accent);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    text-align: center;
}

.summary-stat-val {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
}

.summary-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.simulation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.sim-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s;
}

.sim-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 209, 0, 0.3);
}

.sim-code {
    font-family: monospace;
    font-weight: 800;
    color: #000;
    background: var(--accent);
    padding: 6px 10px;
    border-radius: 8px;
    min-width: 55px;
    text-align: center;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.sim-info {
    flex: 1;
}

.sim-name-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.sim-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
}

.sim-percentage {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
}

.sim-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.sim-bar-fill {
    height: 100%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.missing-types-box {
    margin-top: 25px;
    padding: 15px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
}

.missing-title {
    font-size: 0.85rem;
    color: #f87171;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.missing-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: monospace;
    font-weight: 700;
    margin: 4px;
}

/* Modal Core System */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

.modal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.header-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-title i {
    color: var(--accent);
    width: 24px;
    height: 24px;
}

.header-title h3 {
    margin: 0;
    font-size: 1.25rem;
    font-family: 'Outfit';
    letter-spacing: -0.5px;
}

.close-modal {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.animate-pop {
    animation: animatePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes animatePop {
    from { opacity: 0; transform: scale(0.9) translateY(30px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}
