/**
 * Genesis Trading Platform - Shared Styles
 * Version: 1.0
 */

:root {
    --black: #000000;
    --white: #ffffff;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    --gray-950: #0a0a0a;
    --green: #22c55e;
    --green-dim: #16a34a;
    --red: #ef4444;
    --red-dim: #dc2626;
    --blue: #3b82f6;
    --orange: #f59e0b;
    --purple: #8b5cf6;
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--black);
    color: var(--white);
    min-height: 100vh;
    line-height: 1.5;
}

.serif {
    font-family: 'Instrument Serif', Georgia, serif;
}

/* Layout */
.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; /* Full height from top */
    height: 100vh;
    background: var(--black);
    z-index: 100;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-mark {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
    padding: 8px 12px;
    font-weight: 500;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    cursor: pointer;
}

.nav-item:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.nav-item svg {
    width: 18px !important;
    height: 18px !important;
    opacity: 0.7;
}

.nav-item.active svg {
    opacity: 1;
}

.nav-new-tag {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: auto;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gray-700), var(--gray-800));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.75rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Content */
.main {
    flex: 1;
    margin-left: 280px;
    margin-top: 72px; /* Account for fixed header height */
    min-height: calc(100vh - 72px);
    width: calc(100vw - 280px); /* Account for sidebar width */
}

.header {
    position: fixed;
    top: 0;
    left: 280px; /* Start from right edge of sidebar */
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 150;
    padding: 10px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.breadcrumb-separator {
    color: var(--gray-700);
}

.breadcrumb-current {
    color: var(--white);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.header-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 100px;
    font-size: 0.6875rem;
    color: var(--green);
    font-weight: 500;
    white-space: nowrap;
}

.header-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--white);
    border-color: var(--border-light);
}

.icon-btn svg {
    width: 16px !important;
    height: 16px !important;
}

.notification-bell {
    position: relative;
    cursor: pointer;
    text-decoration: none;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--red);
    color: var(--white);
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.625rem;
    font-weight: 500;
    min-width: 16px;
    text-align: center;
}

.account-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: var(--gray-950);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.account-selector:hover {
    border-color: var(--border-light);
}

.account-selector-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    text-align: right;
}

.account-selector-label {
    font-size: 0.625rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    line-height: 1.4;
    display: inline-block;
    vertical-align: middle;
}

.account-selector-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--white);
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
    display: inline-block;
    vertical-align: middle;
}

.account-selector svg {
    width: 16px;
    height: 16px;
    color: var(--gray-500);
}

/* Content */
.content {
    padding: 32px;
}

.page-header {
    margin-bottom: 32px;
}

.page-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.page-title {
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.page-subtitle {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

/* Cards */
.card {
    background: var(--gray-950);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

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

.card-title {
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title-badge {
    font-size: 0.6875rem;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    color: var(--gray-400);
    font-weight: 400;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 24px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--black);
    padding: 24px;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.stat-value.positive {
    color: var(--green);
}

.stat-value.negative {
    color: var(--red);
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 4px;
}

.stat-change.positive {
    color: var(--green);
    background: rgba(34, 197, 94, 0.1);
}

.stat-change.negative {
    color: var(--red);
    background: rgba(239, 68, 68, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    text-decoration: none;
}

.btn-primary {
    background: var(--white);
    color: var(--black);
}

.btn-primary:hover {
    background: var(--gray-200);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-light);
}

.btn-success {
    background: var(--green);
    color: var(--white);
}

.btn-success:hover {
    background: var(--green-dim);
}

.btn-danger {
    background: var(--red);
    color: var(--white);
}

.btn-danger:hover {
    background: var(--red-dim);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}

/* Time Filter */
.time-filter {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--gray-900);
    border-radius: 8px;
}

.time-filter-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    border: none;
    background: transparent;
    color: var(--gray-500);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.time-filter-btn:hover {
    color: var(--white);
}

.time-filter-btn.active {
    background: var(--gray-800);
    color: var(--white);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
    font-weight: 500;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 14px 16px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
    font-variant-numeric: tabular-nums;
}

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

.data-table tbody tr {
    transition: background 0.15s ease;
}

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

/* Form Elements */
.form-input {
    padding: 10px 12px;
    background: var(--black);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--white);
    font-family: inherit;
    font-size: 0.875rem;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: var(--blue);
}

.form-select {
    padding: 10px 12px;
    background: var(--black);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--white);
    font-family: inherit;
    font-size: 0.875rem;
    width: 100%;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--gray-800);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.toggle-switch.active {
    background: var(--green);
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--white);
    border-radius: 50%;
    transition: all 0.15s ease;
}

.toggle-switch.active .toggle-slider {
    transform: translateX(20px);
}

/* Progress Bar */
.progress-bar {
    height: 4px;
    background: var(--gray-800);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.progress-fill.green {
    background: var(--green);
}

.progress-fill.red {
    background: var(--red);
}

.progress-fill.white {
    background: var(--white);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--green);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--orange);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue);
}

/* Status Indicators */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-indicator.positive {
    background: var(--green);
}

.status-indicator.negative {
    background: var(--red);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.4s ease forwards;
}

.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; }

/* Utilities */
.text-muted {
    color: var(--gray-500);
}

.text-sm {
    font-size: 0.875rem;
}

.font-mono {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.9em;
}

.positive {
    color: var(--green);
}

.negative {
    color: var(--red);
}

/* Responsive */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main {
        margin-left: 0;
        width: 100vw; /* Full width on mobile */
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 20px;
    }

    .header {
        left: 0; /* Override desktop left positioning on mobile */
        position: sticky; /* Use sticky on mobile instead of fixed */
        padding: 16px 20px;
        padding-left: 72px; /* Space for mobile menu button */
    }

    .page-title {
        font-size: 1.5rem;
    }
}

/* Tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    padding: 8px 12px;
    background: var(--gray-800);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--gray-300);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.15s ease;
    z-index: 100;
    pointer-events: none;
}

.tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    border: 6px solid transparent;
    border-top-color: var(--gray-800);
    opacity: 0;
    visibility: hidden;
    transition: all 0.15s ease;
    z-index: 100;
}

.tooltip:hover::after,
.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

.tooltip:hover::after {
    transform: translateX(-50%) translateY(-8px);
}

.tooltip:hover::before {
    transform: translateX(-50%) translateY(0);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray-500);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    opacity: 0.4;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--gray-400);
    margin-bottom: 8px;
}

.empty-state-message {
    font-size: 0.875rem;
    line-height: 1.5;
    max-width: 300px;
    margin: 0 auto;
}

/* Alert Banner */
.alert-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.alert-banner.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--blue);
}

.alert-banner.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--green);
}

.alert-banner.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--orange);
}

.alert-banner.danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--red);
}

.alert-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.alert-message {
    font-size: 0.875rem;
    opacity: 0.9;
}

.alert-close {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: currentColor;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-close:hover {
    opacity: 1;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-800);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-700);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--gray-950);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95) translateY(10px);
    transition: all 0.2s ease;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

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

.modal-title {
    font-size: 1.125rem;
    font-weight: 500;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--black);
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-300);
    margin-bottom: 8px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Input with prefix/suffix */
.input-group {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.input-group:focus-within {
    border-color: var(--blue);
}

.input-group-prefix,
.input-group-suffix {
    padding: 10px 12px;
    background: var(--gray-900);
    color: var(--gray-500);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.input-group .form-input {
    border: none;
    border-radius: 0;
}

.input-group .form-input:focus {
    outline: none;
}

/* Form validation states */
.form-input.error,
.form-select.error {
    border-color: var(--red);
}

.form-input.success,
.form-select.success {
    border-color: var(--green);
}

.form-error {
    font-size: 0.75rem;
    color: var(--red);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-error svg {
    width: 14px;
    height: 14px;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--gray-900) 0%,
        var(--gray-800) 50%,
        var(--gray-900) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 16px;
    width: 100%;
    margin-bottom: 8px;
}

.skeleton-text:last-child {
    margin-bottom: 0;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-card {
    height: 120px;
    border-radius: 8px;
}

.skeleton-table-row {
    height: 60px;
    margin-bottom: 1px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.tab {
    padding: 12px 16px;
    font-size: 0.875rem;
    color: var(--gray-500);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: -1px;
}

.tab:hover {
    color: var(--gray-300);
}

.tab.active {
    color: var(--white);
    border-bottom-color: var(--white);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 200px;
    background: var(--gray-950);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.15s ease;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: 0.875rem;
    color: var(--gray-400);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--white);
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* Position Info in Modal */
.position-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--black);
    border-radius: 8px;
    margin-bottom: 20px;
}

.position-info-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--gray-800);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-400);
}

.position-info-details {
    flex: 1;
}

.position-info-symbol {
    font-size: 1.125rem;
    font-weight: 500;
}

.position-info-meta {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.position-info-pnl {
    text-align: right;
}

.position-info-pnl-value {
    font-size: 1.25rem;
    font-weight: 500;
}

.position-info-pnl-value.positive {
    color: var(--green);
}

.position-info-pnl-value.negative {
    color: var(--red);
}

/* Quick Actions in Dashboard */
.quick-actions {
    display: flex;
    gap: 12px;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s ease;
    background: var(--white);
    color: var(--black);
}

.quick-action-btn:hover {
    background: var(--gray-200);
}

.quick-action-btn.secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--border);
}

.quick-action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-light);
}

.quick-action-btn svg {
    width: 18px !important;
    height: 18px !important;
}

/* Dashboard-specific styles */
.main {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
}

.header {
    position: fixed;
    top: 0;
    left: 280px; /* Start from right edge of sidebar */
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 150;
    padding: 10px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.breadcrumb-separator {
    color: var(--gray-700);
}

.breadcrumb-current {
    color: var(--white);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.header-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 100px;
    font-size: 0.6875rem;
    color: var(--green);
    font-weight: 500;
    white-space: nowrap;
}

.header-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--white);
    border-color: var(--border-light);
}

.icon-btn svg {
    width: 16px !important;
    height: 16px !important;
}

.notification-bell {
    position: relative;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--red);
    color: var(--white);
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.625rem;
    font-weight: 500;
    min-width: 16px;
    text-align: center;
}

.content {
    padding: 32px;
}

.page-header {
    margin-bottom: 32px;
}

.page-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.page-title {
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.page-title-jp {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 400;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.page-subtitle {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.account-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: var(--gray-950);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.account-selector:hover {
    border-color: var(--border-light);
}

.account-selector-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    text-align: right;
}

.account-selector-label {
    font-size: 0.625rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    line-height: 1.4;
    display: inline-block;
    vertical-align: middle;
}

.account-selector-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--white);
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
    display: inline-block;
    vertical-align: middle;
}

.account-selector svg {
    width: 16px;
    height: 16px;
    color: var(--gray-500);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.stat-value.positive {
    color: var(--green);
}

.stat-value.negative {
    color: var(--red);
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 4px;
}

.stat-change.positive {
    color: var(--green);
    background: rgba(34, 197, 94, 0.1);
}

.stat-change.negative {
    color: var(--red);
    background: rgba(239, 68, 68, 0.1);
}

.stat-change svg {
    width: 12px !important;
    height: 12px !important;
    max-width: 12px !important;
    max-height: 12px !important;
    min-width: 12px !important;
    min-height: 12px !important;
    flex-shrink: 0;
}
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
}

.card {
    background: var(--gray-950);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

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

.card-title {
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title-badge {
    font-size: 0.6875rem;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    color: var(--gray-400);
    font-weight: 400;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 24px;
}

.chart-container {
    height: 320px;
    position: relative;
}

.chart-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 20px 0;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.05));
    border-radius: 2px 2px 0 0;
    position: relative;
    transition: all 0.3s ease;
}

.chart-bar:hover {
    background: linear-gradient(to top, rgba(34, 197, 94, 0.5), rgba(34, 197, 94, 0.1));
}

.chart-bar.negative {
    background: linear-gradient(to top, rgba(239, 68, 68, 0.3), rgba(239, 68, 68, 0.05));
}

.chart-bar.negative:hover {
    background: linear-gradient(to top, rgba(239, 68, 68, 0.5), rgba(239, 68, 68, 0.1));
}

.chart-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.equity-curve {
    position: absolute;
    inset: 20px 0;
}

.equity-curve svg {
    width: 100%;
    height: 100%;
}

.progress-section {
    margin-bottom: 24px;
}

.progress-section:last-child {
    margin-bottom: 0;
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.progress-label {
    font-size: 0.8125rem;
    color: var(--gray-400);
}

.progress-value {
    font-size: 0.875rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.progress-bar {
    height: 4px;
    background: var(--gray-800);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.progress-fill.green {
    background: var(--green);
}

.progress-fill.red {
    background: var(--red);
}

.progress-fill.white {
    background: var(--white);
}

.progress-limits {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.6875rem;
    color: var(--gray-600);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 24px;
}

.metric-item {
    background: var(--black);
    padding: 16px;
}

.metric-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.metric-value {
    font-size: 1.125rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.rules-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rule-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--black);
    border-radius: 6px;
}

.rule-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rule-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
}

.rule-icon.success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--green);
}

.rule-icon.warning {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.rule-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
}

.rule-icon svg,
.rule-icon.success svg,
.rule-icon.warning svg,
.rule-icon.danger svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
}

.rule-name {
    font-size: 0.875rem;
}

.rule-status {
    font-size: 0.8125rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.rule-status.success {
    color: var(--green);
}

.rule-status.warning {
    color: #fbbf24;
}

.rule-status.danger {
    color: var(--red);
}

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

.trades-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
    font-weight: 500;
    border-bottom: 1px solid var(--border);
}

.trades-table td {
    padding: 14px 16px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
    font-variant-numeric: tabular-nums;
}

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

.trades-table tbody tr {
    transition: background 0.15s ease;
}

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

.trade-symbol {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trade-symbol-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: var(--gray-800);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--gray-400);
}

.trade-type {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
}

.trade-type.buy {
    background: rgba(34, 197, 94, 0.1);
    color: var(--green);
}

.trade-type.sell {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
}

.trade-pnl {
    font-weight: 500;
}

.trade-pnl.positive {
    color: var(--green);
}

.trade-pnl.negative {
    color: var(--red);
}

.right-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.account-status {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.account-balance {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.balance-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.balance-value {
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.account-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.detail-value {
    font-size: 0.875rem;
    font-weight: 500;
}

.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:first-child {
    padding-top: 0;
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
}

.activity-icon svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    color: var(--gray-400);
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: 0.8125rem;
    line-height: 1.5;
}

.activity-text strong {
    font-weight: 500;
}

.activity-time {
    font-size: 0.6875rem;
    color: var(--gray-600);
    margin-top: 2px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--white);
    color: var(--black);
}

.btn-primary:hover {
    background: var(--gray-200);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-light);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.time-filter {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--gray-900);
    border-radius: 8px;
}

.time-filter-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    border: none;
    background: transparent;
    color: var(--gray-500);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.time-filter-btn:hover {
    color: var(--white);
}

.time-filter-btn.active {
    background: var(--gray-800);
    color: var(--white);
}

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

.animate-in {
    animation: fadeInUp 0.4s ease forwards;
}

.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; }

/* Responsive */
@media (max-width: 1400px) {
    .main-grid {
        grid-template-columns: 1fr 340px;
    }
}

@media (max-width: 1200px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 20px;
    }
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-800);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-700);
}

/* Additional Polish */
.glow-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.5), transparent);
    margin: 24px 0;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.text-muted {
    color: var(--gray-500);
}

.text-sm {
    font-size: 0.875rem;
}

.font-mono {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.9em;
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 48px;
}

.welcome-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-content {
    max-width: 500px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--gray-500);
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    gap: 32px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.trading-chart-placeholder {
    width: 100%;
    max-width: 400px;
    height: 200px;
    background: var(--gray-950);
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Getting Started Steps */
.getting-started-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.step-card {
    background: var(--gray-950);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s ease;
}

.step-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.step-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
    flex-shrink: 0;
}
}

.step-icon svg {
    width: 32px;
    height: 32px;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.step-description {
    color: var(--gray-500);
    margin-bottom: 20px;
    line-height: 1.5;
}

.step-link {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.15s ease;
}

.step-link:hover {
    color: var(--white);
}

/* Features Section */
.features-section {
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--gray-950);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--green);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--black);
    flex-shrink: 0;
}
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-description {
    color: var(--gray-500);
    line-height: 1.5;
}

/* Testimonials Section */
.testimonials-section {
    margin-bottom: 48px;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 32px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    background: var(--gray-950);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.testimonial-content {
    font-style: italic;
    color: var(--gray-400);
    margin-bottom: 20px;
    line-height: 1.6;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 500;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.verified-badge {
    color: var(--green);
    display: inline-flex;
    align-items: center;
}

.verified-badge svg {
    width: 14px;
    height: 14px;
}

.author-title {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.author-social {
    margin-top: 8px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--gray-400);
    text-decoration: none;
    transition: color 0.15s ease;
}

.social-link:hover {
    color: var(--blue);
}

.social-link svg {
    width: 14px;
    height: 14px;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--gray-950), var(--black));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px;
    text-align: center;
}

.cta-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.cta-subtitle {
    font-size: 1.125rem;
    color: var(--gray-500);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Mobile Responsive Updates */
@media (max-width: 768px) {
    .quick-actions {
        flex-direction: column;
        width: 100%;
        margin-top: 16px;
    }

    .quick-action-btn {
        justify-content: center;
    }

    .page-header-top {
        flex-direction: column;
        gap: 16px;
    }

    .page-title {
        font-size: 1.75rem;
    }

    /* Dashboard specific mobile improvements */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .main-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-header {
        padding: 16px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .card-title {
        font-size: 0.8125rem;
    }

    .card-body {
        padding: 20px;
    }

    .time-filter {
        width: 100%;
        justify-content: center;
    }

    .trades-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .trades-table {
        min-width: 600px;
    }

    .account-balance {
        text-align: center;
        padding: 16px;
    }

    .balance-value {
        font-size: 1.75rem;
    }

    .activity-item {
        padding: 12px 0;
    }

    .activity-text {
        font-size: 0.75rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .metric-item {
        padding: 12px;
    }

    /* Legacy responsive styles */
    .welcome-hero {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .getting-started-grid,
    .features-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hero-title,
    .cta-title {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-section {
        padding: 32px 24px;
    }

    .step-card,
    .feature-card {
        padding: 24px;
    }

    .testimonial-card {
        padding: 20px;
    }
}

/* Avatar Icons */
.avatar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    transition: all 0.2s ease;
}

.avatar-icon svg {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

/* Authentication Pages */
.auth-container {
    min-height: 100vh;
    background: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--gray-950);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.auth-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--green), var(--blue));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--black);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-name {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.brand-tagline {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

.auth-content {
    padding: 32px;
}

.auth-title-section {
    text-align: center;
    margin-bottom: 32px;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    line-height: 1.2;
}

.auth-subtitle {
    color: var(--gray-500);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group .form-input {
    flex: 1;
    padding-right: 48px;
}

.input-group-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.input-group-btn:hover {
    color: var(--white);
}

.input-group-btn svg {
    width: 18px;
    height: 18px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--gray-400);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--green);
    cursor: pointer;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.forgot-link {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s ease;
}

.forgot-link:hover {
    color: var(--white);
}

.auth-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.auth-footer p {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin: 0;
}

.auth-footer a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.auth-footer a:hover {
    color: var(--white);
}

/* Alert Styles */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--red);
}

.alert svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* Password Requirements */
.password-requirements {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: -4px;
    font-size: 0.8125rem;
    color: var(--gray-300);
}

.password-requirements ul {
    list-style: none;
    display: grid;
    gap: 6px;
}

.password-requirements li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-400);
    transition: color 0.15s ease;
}

.password-requirements li::before {
    content: '○';
    color: var(--gray-600);
    font-size: 0.75rem;
    font-weight: bold;
    width: 12px;
    flex-shrink: 0;
}

.password-requirements li.valid {
    color: var(--green);
}

.password-requirements li.valid::before {
    content: '✓';
    color: var(--green);
}

/* Responsive Auth */
@media (max-width: 480px) {
    .auth-container {
        padding: 16px;
    }

    .auth-card {
        border-radius: 12px;
    }

    .auth-header {
        padding: 24px 24px 20px;
    }

    .auth-content {
        padding: 24px;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .auth-form {
        gap: 20px;
    }

    .form-group {
        gap: 8px;
    }

    .input-group .form-input {
        padding-right: 44px;
    }

    .input-group-btn {
        right: 10px;
    }

    .checkbox-label {
        font-size: 0.8125rem;
    }

    .auth-footer p {
        font-size: 0.8125rem;
    }
}

@media (max-width: 360px) {
    .auth-content {
        padding: 20px;
    }

    .auth-header {
        padding: 20px 20px 16px;
    }

    .brand-name {
        font-size: 1rem;
    }

    .brand-tagline {
        font-size: 0.75rem;
    }

    .auth-title {
        font-size: 1.375rem;
    }
}

/* Global icon/SVG constraints */
svg {
    max-width: 24px !important;
    max-height: 24px !important;
    flex-shrink: 0 !important;
    display: block;
    font-size: 16px !important;
    box-sizing: border-box !important;
}

/* Special cases for larger SVGs */
.equity-curve svg,
.trading-chart-placeholder svg {
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Duel-focused Dashboard Styles */

/* Duel Results History */
.duels-history {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.duel-result-item {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s ease;
}

.duel-result-item:hover {
    border-color: var(--border-light);
    background: rgba(255, 255, 255, 0.04);
}

.duel-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.duel-type-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue);
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-icon {
    font-size: 0.875rem;
}

.duel-outcome {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.duel-outcome.win {
    background: rgba(34, 197, 94, 0.1);
    color: var(--green);
}

.duel-outcome.loss {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
}

.duel-outcome svg {
    width: 14px;
    height: 14px;
}

.duel-result-details {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
}

.duel-opponent {
    color: var(--white);
    font-weight: 500;
}

.duel-prize {
    color: var(--green);
    font-weight: 500;
}

.duel-time {
    color: var(--gray-500);
    margin-left: auto;
}

/* Duel Status */

.duel-streak {
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(239, 68, 68, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
}

.streak-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.streak-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--orange);
}

.duel-stats .detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.duel-stats .detail-label {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.duel-stats .detail-value {
    color: var(--white);
    font-weight: 500;
    font-size: 0.875rem;
}

/* Duel Achievements */
.duel-achievements {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.achievement-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.achievement-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.achievement-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--gray-800);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
}

.achievement-icon.success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--green);
}

.achievement-icon svg {
    width: 16px;
    height: 16px;
}

.achievement-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--white);
}

.achievement-status {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.achievement-status.success {
    color: var(--green);
    font-weight: 500;
}

/* Duel Activity Icons */
.activity-icon.win {
    background: rgba(34, 197, 94, 0.1);
    color: var(--green);
}

.activity-icon.challenge {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue);
}

.activity-icon.rank {
    background: rgba(245, 158, 11, 0.1);
    color: var(--orange);
}

/* Responsive adjustments for duel elements */
@media (max-width: 768px) {
    .duel-result-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .duel-result-details {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }

    .duel-time {
        margin-left: 0;
    }

    .achievement-item {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

/* Dashboard Components */
.section-header {
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
}

.section-subtitle {
    font-size: 0.875rem;
    color: var(--gray-400);
}

#availableTab .duels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}

/* VIEW SWITCHING HANDLED BY JAVASCRIPT INLINE STYLES */

.duels-grid .duel-card {
    float: left;
    width: 360px;
    margin: 0 20px 20px 0;
}

.duel-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

.duel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.01) 100%);
    pointer-events: none;
}

.duel-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.duel-card:hover::before {
    opacity: 0.8;
}

.duel-card.featured {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.duel-card.featured::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gray-400), var(--gray-300), var(--gray-400));
    border-radius: 16px 16px 0 0;
}

.duel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    position: relative;
}

.duel-type {
    display: flex;
    align-items: center;
}

.duel-badge {
    background: rgba(255, 255, 255, 0.05);
    color: var(--gray-300);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid rgba(255, 255, 255, 0.1);
}


.duel-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-400);
    font-size: 0.8125rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.02);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.duel-status.live {
    color: var(--gray-300);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--gray-400);
    border-radius: 50%;
    animation: pulse 2s infinite;
}


.duel-content {
    margin-bottom: 20px;
}

.duel-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.duel-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.875rem;
    color: var(--gray-400);
    margin-bottom: 8px;
}

.duel-stake {
    color: var(--gray-300);
    font-weight: 600;
}

.duel-time {
    color: var(--gray-500);
    font-weight: 500;
}

.duel-prize {
    color: var(--green);
    font-weight: 600;
}

.duel-participants {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.participant {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.01);
}

.participant:hover {
    background: rgba(255, 255, 255, 0.05);
}

.participant.waiting {
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.005);
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.participant-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-300);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.participant-avatar.empty {
    background: linear-gradient(135deg, var(--gray-800), var(--gray-700));
    color: var(--gray-500);
    border: 2px solid rgba(255, 255, 255, 0.05);
}

.participant-avatar.empty.featured {
    background: var(--gray-600);
    color: var(--gray-400);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.participant-info {
    flex: 1;
    min-width: 0;
}

.participant-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.participant.waiting .participant-name {
    color: var(--gray-400);
}

.participant-score {
    font-size: 0.8125rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.participant-score.positive {
    color: var(--gray-300);
}

.participant-score.negative {
    color: var(--gray-400);
}

.participant-score.neutral {
    color: var(--gray-400);
}

.duel-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.duel-join-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--gray-300);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.duel-join-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.duel-join-btn:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.03);
}

.duel-join-btn.featured {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

    .duel-join-btn.featured:hover {
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.3);
    }

.ongoing-duels {
    margin-bottom: 32px;
}

.table-container {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.ongoing-duels-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.ongoing-duels-table thead {
    background: rgba(255, 255, 255, 0.02);
}

.ongoing-duels-table th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-300);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.ongoing-duels-table td {
    padding: 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.ongoing-duels-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

.table-type {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.table-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--green);
    font-weight: 500;
}

.table-status.active .status-dot {
    background: var(--green);
    animation: pulse 2s infinite;
}

.table-participants {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-participant {
    display: flex;
    align-items: center;
    gap: 8px;
}

.participant-avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.participant-name {
    font-weight: 500;
    color: var(--white);
}

.vs-text {
    color: var(--gray-500);
    font-weight: 400;
    margin: 0 4px;
}

.performance-score {
    font-weight: 600;
    font-size: 0.875rem;
}

.performance-score.positive {
    color: var(--green);
}

.performance-score.negative {
    color: var(--red);
}

.time-remaining {
    color: var(--gray-400);
    font-weight: 500;
}

.prize-amount {
    color: var(--gray-300);
    font-weight: 600;
}

.btn-outline.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 6px;
}


.ongoing-duels {
    margin-bottom: 32px;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    opacity: 0.5;
}

.empty-icon svg {
    width: 100%;
    height: 100%;
    color: var(--gray-500);
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 8px;
}

.empty-subtitle {
    font-size: 0.875rem;
    color: var(--gray-400);
    margin-bottom: 20px;
}

.quick-stats {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 24px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(34, 197, 94, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 20px;
    height: 20px;
    color: var(--green);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 2px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-weight: 500;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .duels-grid .duel-card {
        width: calc(100% - 20px);
        margin: 0 10px 16px 10px;
        float: none;
    }

.duels-grid {
    overflow: hidden; /* Clear floats */
}

.duels-grid::after {
    content: '';
    display: table;
    clear: both;
}



    .duel-participants {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    .participant {
        padding: 12px;
        gap: 12px;
    }

    .participant-avatar {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .participant-info {
        flex: 1;
        min-width: 0;
    }

    .participant-name {
        font-size: 0.875rem;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .participant-score {
        font-size: 0.8125rem;
        text-align: left;
        margin-top: 2px;
    }

    .duel-join-btn {
        padding: 12px 20px;
        font-size: 0.8125rem;
    }

    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .stat-item {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--gray-950);
    border: 1px solid var(--border);
    border-radius: 16px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 24px 24px 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--white);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-body {
    padding: 24px;
    text-align: center;
}

.modal-icon {
    width: 64px;
    height: 64px;
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid var(--blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
}

.modal-icon svg {
    width: 32px;
    height: 32px;
    color: var(--blue);
}

.modal-content {
    margin-bottom: 24px;
}

.modal-subtitle {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 12px;
}

.modal-text {
    color: var(--gray-300);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-details {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--gray-400);
    font-size: 0.875rem;
}

.detail-value {
    font-weight: 500;
    color: var(--white);
}

.detail-value.positive {
    color: var(--green);
}

.modal-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--orange);
}

.modal-warning svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.modal-footer {
    padding: 0 24px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

@media (max-width: 640px) {
    .modal-container {
        margin: 20px;
        width: calc(100% - 40px);
    }

    .modal-header {
        padding: 20px 20px 0 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        padding: 0 20px 20px 20px;
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* === DUELS PAGE STYLES === */

/* Duel Tabs */
.duels-section {
    margin-bottom: 48px;
}

.duels-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.duels-tabs {
    display: flex;
    gap: 8px;
}

.duels-tab {
    padding: 8px 16px;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--gray-400);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.duels-tab:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.04);
}

.duels-tab.active {
    border-bottom-color: var(--blue);
    background: rgba(255, 255, 255, 0.06);
    color: var(--blue);
}

.duels-tab-content {
    display: none;
}

.duels-tab-content.active {
    display: block;
}

.duels-title {
    font-size: 1.5rem;
    font-weight: 500;
}

/* Ongoing Duels Header */
.ongoing-duels-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 24px;
    background: var(--gray-950);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.ongoing-duels-info {
    flex: 1;
}

.ongoing-duels-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 8px;
}

.ongoing-duels-subtitle {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin: 0;
}

.create-duel-btn-primary {
    background: var(--white);
    color: var(--black);
    padding: 16px 24px;
    border-radius: 8px;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
}

.create-duel-btn-primary:hover {
    background: var(--gray-200);
    transform: translateY(-2px);
}

.create-duel-btn {
    background: var(--white);
    color: var(--black);
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.create-duel-btn:hover {
    background: var(--gray-200);
}

/* Duels Table */
.duels-table-container {
    background: var(--gray-950);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.duels-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.duels-table thead {
    background: var(--gray-900);
}

.duels-table th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--white);
    border-bottom: 1px solid var(--border);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.duels-table td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

.opponent-cell {
    min-width: 200px;
}

.opponent-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.opponent-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gray-600), var(--gray-700));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--white);
    flex-shrink: 0;
}

.opponent-details {
    min-width: 0;
    flex: 1;
}

.opponent-name {
    display: block;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 2px;
}

.duel-type-badge.vs1 {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue);
}

.duel-type-badge.vs3 {
    background: rgba(139, 92, 246, 0.1);
    color: var(--purple);
}

.duel-type-badge.vsx {
    background: rgba(245, 158, 11, 0.1);
    color: var(--orange);
}

.fee-cell, .prize-cell, .timeframe-cell {
    font-weight: 500;
    color: var(--white);
}

.status-cell .duel-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    width: fit-content;
}

.status-cell .duel-status.waiting {
    background: rgba(34, 197, 94, 0.1);
    color: var(--green);
}

.status-cell .duel-status.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue);
}

.status-cell .duel-status.ongoing {
    background: rgba(245, 158, 11, 0.1);
    color: var(--orange);
}

.status-cell .duel-status.completed {
    background: rgba(34, 197, 94, 0.1);
    color: var(--green);
}

.participants-cell {
    min-width: 200px;
}

.participants-list {
    display: flex;
    align-items: center;
    gap: 8px;
}

.participant-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    font-size: 0.8125rem;
}

.participant-mini .participant-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gray-600), var(--gray-700));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--white);
    flex-shrink: 0;
}

.vs-text {
    color: var(--gray-500);
    font-weight: 500;
    font-size: 0.8125rem;
}

.time-cell {
    font-weight: 600;
    color: var(--orange);
    font-family: 'DM Sans', monospace;
}

.pnl-cell {
    font-weight: 600;
    font-family: 'DM Sans', monospace;
}

.pnl-cell.positive {
    color: var(--green);
}

.pnl-cell.negative {
    color: var(--red);
}

.duel-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.duel-row:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}

.action-cell .join-duel-btn {
    background: var(--green);
    color: var(--white);
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.action-cell .join-duel-btn:hover {
    background: var(--green-dim);
}

/* Timeframes */
.timeframes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.timeframe-card {
    background: var(--gray-950);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: border-color 0.2s ease;
}

.timeframe-card:hover {
    border-color: var(--border-light);
}

.timeframe-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.timeframe-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--white);
    margin: 0;
}

.timeframe-duration {
    padding: 4px 12px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.timeframe-stats {
    display: grid;
    gap: 12px;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.stat:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.stat-value {
    color: var(--white);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Animation Delays */
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.2s; }

/* Modal Contract Styles */
.modal-content .contracts-section {
    margin-bottom: 32px;
}

.contract-duration-section,
.contract-values-section {
    margin-bottom: 40px;
}

.duration-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.duration-card {
    background: var(--gray-950);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.duration-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.duration-card.active {
    border-color: var(--blue);
    background: rgba(59, 130, 246, 0.05);
}

.duration-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--gray-800);
    color: var(--white);
}

.duration-card.active .duration-icon {
    background: var(--blue);
}

.duration-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--white);
}

.duration-subtitle {
    font-size: 0.875rem;
    color: var(--gray-400);
    margin: 0;
    font-weight: 500;
}

.duration-description {
    font-size: 0.875rem;
    color: var(--gray-400);
    margin-bottom: 8px;
    font-weight: 500;
}

.duration-detail {
    font-size: 0.8125rem;
    color: var(--gray-500);
    line-height: 1.4;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.value-card {
    background: var(--gray-950);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.value-card:hover {
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.value-card.active {
    border-color: var(--green);
    background: rgba(34, 197, 94, 0.05);
}

.value-amount {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
}

.value-fee {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.value-winner {
    font-size: 0.75rem;
    color: var(--green);
    margin-top: 2px;
    font-weight: 500;
}

.value-card.active .value-amount {
    color: var(--green);
}

.value-card.active .value-fee {
    color: var(--green);
}

.value-card.active .value-winner {
    color: var(--green);
}

/* Selection Summary */
.selection-summary {
    margin-bottom: 32px;
    background: var(--gray-950);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.summary-header {
    margin-bottom: 20px;
}

.summary-title {
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--white);
    letter-spacing: -0.02em;
}

.summary-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: none;
}

.summary-label {
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 500;
}

.summary-value {
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 600;
}

/* Sorting Controls */
.sorting-controls {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.sort-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-400);
}

.sort-select {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--gray-950);
    color: var(--white);
    font-size: 0.875rem;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.sort-select:focus {
    outline: none;
    border-color: var(--blue);
}

.sort-select:hover {
    border-color: var(--border-light);
}

/* Pill Selector */
.pill-selector {
    display: flex;
    gap: 8px;
}

.pill-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--gray-950);
    color: var(--gray-400);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.pill-btn:hover {
    border-color: var(--border-light);
    color: var(--white);
}

.pill-btn.active {
    border-color: var(--blue);
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue);
}

/* View Toggle */
.view-toggle-group {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--gray-950);
    color: var(--gray-400);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.view-toggle-btn:hover {
    border-color: var(--border-light);
    color: var(--white);
}

.view-toggle-btn.active {
    border-color: var(--blue);
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue);
}

.view-toggle-btn svg {
    width: 16px;
    height: 16px;
}

/* === DASHBOARD DUELS TABLE === */

.duels-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
}

.duels-table thead {
    background: var(--gray-900);
}

.duels-table th {
    padding: 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    border-bottom: 1px solid var(--border);
}

.duels-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

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

.duels-table tbody tr:last-child {
    border-bottom: none;
}

.duels-table td {
    padding: 16px;
    vertical-align: middle;
    color: var(--gray-300);
    font-size: 0.875rem;
}

/* Mode Badge */
.duel-mode-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--gray-800);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-300);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Table Players */
.table-players {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.player-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-300);
    border: 1px solid var(--border);
}

.player-avatar-small.empty {
    background: var(--gray-900);
    border: 1px dashed var(--border);
    color: var(--gray-600);
}

.player-avatar-small.empty svg {
    width: 16px;
    height: 16px;
    color: var(--gray-600);
}

.player-separator {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 300;
}

/* Prize and Entry Fee */
.prize-amount,
.entry-fee {
    font-weight: 600;
    color: var(--gray-200);
    font-family: 'DM Sans', monospace;
}

/* Value Pills */
.value-pill {
    display: inline-block;
    padding: 6px 12px;
    background: var(--gray-800);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-weight: 600;
    color: var(--gray-200);
    font-family: 'DM Sans', monospace;
    font-size: 0.875rem;
}

.value-pill.entry-fee {
    background: var(--gray-800);
}

.value-pill.prize-amount {
    background: var(--gray-800);
}

/* Performance Value */
.performance-value {
    font-weight: 600;
    font-family: 'DM Sans', monospace;
}

.performance-value.positive {
    color: var(--gray-300);
}

.performance-value.negative {
    color: var(--gray-400);
}

/* Time Remaining */
.time-remaining {
    color: var(--gray-400);
    font-family: 'DM Sans', monospace;
    font-size: 0.875rem;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--gray-800);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.waiting {
    color: var(--gray-500);
}

.status-badge.active {
    color: var(--gray-400);
}

/* Table Button */
.btn-table {
    padding: 6px 16px;
    background: var(--gray-800);
    color: var(--gray-300);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-table:hover {
    background: var(--gray-700);
    border-color: var(--border-light);
    color: var(--gray-200);
}

/* Responsive Dashboard Table */
@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
    }

    .duels-table {
        min-width: 600px;
    }

    .duels-table th,
    .duels-table td {
        padding: 12px 8px;
        font-size: 0.8125rem;
    }

    .player-avatar-small {
        width: 28px;
        height: 28px;
        font-size: 0.6875rem;
    }
}

/* Responsive Duel Styles */
@media (max-width: 1024px) {
    .duels-grid .duel-card {
        width: calc(50% - 20px);
        margin: 0 10px 20px 10px;
    }
}

@media (max-width: 768px) {
    .duels-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .ongoing-duels-grid {
        grid-template-columns: 1fr;
    }

    .duel-players-row {
        gap: 8px;
    }

    .player-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.75rem;
    }

    .duel-cost,
    .duel-rewards {
        padding: 10px;
    }


    .sorting-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .sort-group {
        justify-content: space-between;
    }

    .pill-selector {
        flex-wrap: wrap;
        gap: 6px;
    }

    .pill-btn {
        padding: 6px 12px;
        font-size: 0.8125rem;
    }

    /* Timeframe filter gets special treatment on mobile */
    .sorting-controls .sort-group:first-child .pill-selector {
        justify-content: center;
    }

    .view-toggle-group {
        margin-left: 0;
        margin-top: 12px;
        justify-content: center;
    }
}

/* ===================================
   IMPROVED STATISTICS PAGE STYLES
   =================================== */

/* Expanded Stats Grid - 6x2 layout */
.stats-grid-expanded {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.stat-card.compact {
    background: var(--card-bg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-card.compact .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card.compact .stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-card.compact .stat-change {
    font-size: 0.6875rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Three Column Stats Layout */
.stats-three-column {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stats-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Compact Cards */
.card.compact-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.card-header.compact {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header.compact .card-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body.compact {
    padding: 12px 16px;
}

/* Mini Time Filter */
.time-filter.mini {
    display: flex;
    gap: 4px;
}

.time-filter.mini .time-filter-btn {
    padding: 4px 8px;
    font-size: 0.6875rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.time-filter.mini .time-filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Mini Chart Container */
.chart-container.mini {
    margin: 0;
    padding: 0;
}

/* Mini Metrics */
.mini-metrics {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mini-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.mini-metric:last-child {
    border-bottom: none;
}

.mini-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.mini-value {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mini-value.positive {
    color: var(--success);
}

.mini-value.negative {
    color: var(--danger);
}

/* Compact Activity List */
.activity-compact {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.activity-compact-item {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.activity-compact-item:last-child {
    border-bottom: none;
}

.activity-badge {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 700;
    flex-shrink: 0;
}

.activity-badge.win {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.activity-badge.loss {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.activity-compact-item .activity-text {
    font-size: 0.75rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-compact-item .activity-value {
    font-size: 0.75rem;
    font-weight: 600;
}

.activity-compact-item .activity-value.positive {
    color: var(--success);
}

.activity-compact-item .activity-value.negative {
    color: var(--danger);
}

/* Compact Achievements */
.achievements-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.achievement-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--secondary-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s;
}

.achievement-compact.unlocked {
    background: rgba(34, 197, 94, 0.05);
    border-color: rgba(34, 197, 94, 0.2);
}

.achievement-compact.locked {
    opacity: 0.5;
}

.achievement-compact svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.achievement-compact.unlocked svg {
    color: var(--success);
}

.achievement-compact.locked svg {
    color: var(--text-muted);
}

.achievement-compact span {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Opponents List */
.opponents-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.opponent-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.opponent-item:last-child {
    border-bottom: none;
}

.opponent-name {
    font-size: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.opponent-record {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
}

.opponent-profit {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: right;
}

.opponent-profit.positive {
    color: var(--success);
}

.opponent-profit.negative {
    color: var(--danger);
}

/* Responsive adjustments for Statistics page */
@media (max-width: 1400px) {
    .stats-grid-expanded {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .stats-three-column {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid-expanded {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .stats-grid-expanded {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-three-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-grid-expanded {
        grid-template-columns: 1fr;
        gap: 12px;
        background: transparent;
        border: none;
    }
    
    .stat-card.compact {
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 20px;
    }
    
    .achievements-compact {
        grid-template-columns: 1fr;
    }
    
    .opponent-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    
    .opponent-record,
    .opponent-profit {
        text-align: left;
    }
}