/* Apple Design System - Glassmorphism Enhanced */
:root {
    --primary: #0071e3;
    --primary-hover: #0077ed;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --bg-primary: rgba(255, 255, 255, 0.85);
    --bg-secondary: #f5f5f7;
    --bg-tertiary: rgba(250, 250, 250, 0.7);
    --border: rgba(210, 210, 215, 0.6);
    --border-light: rgba(232, 232, 237, 0.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 8px 32px rgba(0,0,0,0.04);
    --shadow-lg: 0 8px 28px rgba(0,0,0,0.12), 0 16px 48px rgba(0,0,0,0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-bg-hover: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: 
        radial-gradient(ellipse at top left, rgba(0, 113, 227, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(175, 82, 222, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at top right, rgba(52, 199, 89, 0.05) 0%, transparent 40%),
        linear-gradient(135deg, #f5f5f7 0%, #fafafa 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Navigation - Enhanced Glass Effect */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.85) 0%, 
        rgba(255, 255, 255, 0.75) 100%);
    backdrop-filter: saturate(200%) blur(30px);
    -webkit-backdrop-filter: saturate(200%) blur(30px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 1000;
    transition: var(--transition-smooth);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03), 
                0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-brand .logo {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
}

.nav-link.active {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.06);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-icon:hover {
    background: rgba(0, 0, 0, 0.04);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.user-avatar {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.6);
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.user-avatar:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Main Content */
.main-content {
    padding-top: 52px;
    min-height: 100vh;
}

.section {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.section.active {
    display: block;
    animation: fadeInSmooth 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInSmooth {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
        filter: blur(8px);
    }
    50% {
        filter: blur(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 0 50px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #1d1d1f 0%, #434344 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleFloat 6s ease-in-out infinite;
}

@keyframes titleFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

.hero-subtitle {
    font-size: 21px;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.04),
        0 1px 2px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px var(--glass-border);
    border: none;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    background: var(--glass-bg-hover);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.08),
        0 4px 8px rgba(0, 0, 0, 0.03),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-bounce);
}

.stat-card:hover .stat-icon {
    transform: scale(1.15) rotate(5deg);
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon.blue {
    background: linear-gradient(135deg, rgba(0, 113, 227, 0.15) 0%, rgba(0, 113, 227, 0.05) 100%);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.15);
}

.stat-icon.purple {
    background: linear-gradient(135deg, rgba(175, 82, 222, 0.15) 0%, rgba(175, 82, 222, 0.05) 100%);
    color: #af52de;
    box-shadow: 0 4px 12px rgba(175, 82, 222, 0.15);
}

.stat-icon.orange {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.15) 0%, rgba(255, 149, 0, 0.05) 100%);
    color: #ff9500;
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.15);
}

.stat-icon.green {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.15) 0%, rgba(52, 199, 89, 0.05) 100%);
    color: #34c759;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.15);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Chart Section */
.chart-section {
    margin-bottom: 40px;
}

.chart-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.04),
        0 1px 2px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px var(--glass-border);
    border: none;
    transition: var(--transition-smooth);
}

.chart-card:hover {
    background: var(--glass-bg-hover);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.06),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.chart-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.chart-container {
    height: 300px;
    position: relative;
}

/* Recent Section */
.recent-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.04),
        0 1px 2px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px var(--glass-border);
    border: none;
    transition: var(--transition-smooth);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.link {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.link:hover {
    text-decoration: underline;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
    cursor: pointer;
    border: 1px solid transparent;
}

.recent-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(8px) scale(1.01);
    border-color: rgba(0, 113, 227, 0.2);
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.08);
}

.recent-route {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 100px;
}

.recent-sailor {
    font-size: 14px;
    color: var(--text-secondary);
    flex: 1;
}

.recent-date {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 280px;
    position: relative;
}

.search-box svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.filter-group {
    display: flex;
    gap: 12px;
}

.filter-group select {
    padding: 12px 36px 12px 16px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2386868b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: var(--transition);
    outline: none;
}

.filter-group select:focus {
    border-color: var(--primary);
}

/* Table */
.table-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.04),
        0 1px 2px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px var(--glass-border);
    border: none;
    overflow: hidden;
    margin-bottom: 24px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-light);
}

.data-table td {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.data-table tbody tr:hover td {
    background: var(--bg-tertiary);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table td.message-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table td.message-cell:hover {
    white-space: normal;
    word-break: break-all;
}

.btn-action {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    background: rgba(0, 113, 227, 0.1);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-action:hover {
    background: var(--primary);
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled) {
    background: var(--bg-secondary);
    border-color: var(--text-secondary);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Stats Filter Bar */
.stats-filter-bar {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.04),
        0 1px 2px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px var(--glass-border);
    border: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: var(--transition-smooth);
}

.stats-filter-bar:hover {
    background: var(--glass-bg-hover);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.06),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.stats-dimension {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stats-dimension label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.dimension-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dim-btn, .sub-dim-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.dim-btn:hover, .sub-dim-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.dim-btn.active, .sub-dim-btn.active {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, #005bb5 100%);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

.date-range {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.date-range input {
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
}

.date-range span {
    color: var(--text-secondary);
    font-size: 14px;
}

.btn-apply {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-apply:hover {
    background: var(--primary-hover);
}

/* Stats Overview */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.overview-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.04),
        0 1px 2px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px var(--glass-border);
    border: none;
    transition: var(--transition-smooth);
}

.overview-card:hover {
    transform: translateY(-6px) scale(1.03);
    background: var(--glass-bg-hover);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.08),
        0 4px 8px rgba(0, 0, 0, 0.03),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.overview-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
    transition: var(--transition-smooth);
}

.overview-card:hover .overview-value {
    transform: scale(1.1);
    text-shadow: 0 0 30px rgba(0, 113, 227, 0.3);
}

.overview-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Stats Tabs */
.stats-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.tab-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: var(--text-primary);
    transform: translateY(-1px);
}

.tab-btn.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.06),
        0 1px 2px rgba(0, 0, 0, 0.03),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

/* Distribution Grid */
.dist-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dist-grid {
        grid-template-columns: 1fr;
    }
}

.tab-content {
    display: none;
    opacity: 0;
}

.tab-content.active {
    display: block;
    animation: tabFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Ranking List */
.ranking-list {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.04),
        0 1px 2px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px var(--glass-border);
    border: none;
    overflow: hidden;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: var(--transition-smooth);
}

.ranking-item:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateX(12px);
    box-shadow: inset 4px 0 0 0 var(--primary);
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-rank {
    width: 36px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-secondary);
}

.ranking-item:nth-child(1) .ranking-rank {
    color: #ffb800;
}

.ranking-item:nth-child(2) .ranking-rank {
    color: #a8a8a8;
}

.ranking-item:nth-child(3) .ranking-rank {
    color: #cd7f32;
}

.ranking-name {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.ranking-count {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    padding: 6px 14px;
    background: rgba(0, 113, 227, 0.1);
    border-radius: 100px;
}

/* Import Section */
.import-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.04),
        0 1px 2px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px var(--glass-border);
    border: none;
    transition: var(--transition-smooth);
}

.import-card:hover {
    background: var(--glass-bg-hover);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.06),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.upload-area {
    border: 2px dashed rgba(0, 113, 227, 0.2);
    border-radius: var(--radius-lg);
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-bottom: 28px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.01);
    box-shadow: 0 8px 32px rgba(0, 113, 227, 0.1);
}

.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(0, 113, 227, 0.08);
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 113, 227, 0.15);
}

.upload-area svg {
    width: 48px;
    height: 48px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.upload-area p {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-area span {
    font-size: 13px;
    color: var(--text-secondary);
}

.import-config {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-group input {
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

.btn-primary {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, #005bb5 100%);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #0066cc 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.25);
}

/* Progress Bar */
.import-progress {
    margin-top: 24px;
}

.progress-bar {
    height: 6px;
    background: var(--border-light);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #34c759 100%);
    border-radius: 100px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 12px rgba(0, 113, 227, 0.4);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: var(--glass-bg-hover);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 
        0 24px 80px rgba(0, 0, 0, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-close:hover {
    background: var(--bg-secondary);
}

.btn-close svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 60vh;
}

.detail-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    width: 100px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.detail-value {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

/* Responsive - Mobile Optimizations */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-container {
        height: 250px;
    }
}

@media (max-width: 768px) {
    /* Navbar mobile */
    .navbar {
        height: 48px;
    }
    
    .nav-container {
        padding: 0 16px;
    }
    
    .nav-brand span {
        font-size: 16px;
    }
    
    .nav-links {
        display: none;
    }
    
    /* Mobile navigation menu */
    .nav-links.mobile-active {
        display: flex;
        position: fixed;
        top: 48px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: saturate(180%) blur(20px);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        border-bottom: 1px solid var(--border-light);
        box-shadow: var(--shadow-md);
        z-index: 999;
    }
    
    .nav-links.mobile-active .nav-link {
        padding: 12px 16px;
        border-radius: var(--radius-md);
    }
    
    /* Main content mobile */
    .main-content {
        padding: 72px 16px 24px;
    }
    
    /* Hero section mobile */
    .hero {
        margin-bottom: 24px;
    }
    
    .hero-title {
        font-size: 28px;
        margin-bottom: 8px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    /* Stats grid mobile */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 14px 16px;
        border-radius: var(--radius-md);
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
    }
    
    .stat-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    /* Chart section mobile */
    .chart-section {
        margin-bottom: 20px;
    }
    
    .chart-card {
        padding: 16px;
        border-radius: var(--radius-md);
    }
    
    .chart-card h3 {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .chart-container {
        height: 220px;
    }
    
    /* Trend tab mobile chart */
    #trendTab .chart-container {
        height: 260px;
    }
    
    /* Distribution chart mobile */
    #distributionTab .chart-container {
        height: 280px;
    }
    
    /* Recent section mobile */
    .recent-section {
        padding: 16px;
        border-radius: var(--radius-md);
    }
    
    .section-header {
        margin-bottom: 16px;
    }
    
    .section-header h3 {
        font-size: 16px;
    }
    
    .recent-item {
        padding: 12px 0;
        border-radius: var(--radius-sm);
    }
    
    .recent-route {
        min-width: auto;
        font-size: 13px;
    }
    
    .recent-sailor {
        font-size: 12px;
    }
    
    .recent-date {
        font-size: 11px;
    }
    
    /* Filter bar mobile */
    .filter-bar {
        flex-direction: column;
        gap: 12px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select {
        flex: 1;
        font-size: 14px;
        padding: 10px 14px;
    }
    
    /* Table mobile - card view */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        font-size: 13px;
        min-width: 600px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }
    
    .data-table th {
        font-size: 12px;
    }
    
    /* Pagination mobile */
    .pagination {
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
    }
    
    .page-btn {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 36px;
    }
    
    /* Stats filter bar mobile */
    .stats-filter-bar {
        padding: 16px;
        gap: 16px;
    }
    
    .dimension-tabs {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .dim-btn, .sub-dim-btn {
        padding: 8px 12px;
        font-size: 13px;
        flex: 1;
        min-width: 70px;
        white-space: nowrap;
    }
    
    /* Stats dimension label mobile */
    .stats-dimension label {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .date-range {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .date-range span {
        text-align: center;
    }
    
    .date-range input {
        width: 100%;
    }
    
    .btn-apply {
        width: 100%;
    }
    
    /* Stats overview mobile */
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .overview-card {
        padding: 14px 10px;
        border-radius: var(--radius-md);
    }
    
    .overview-value {
        font-size: 20px;
        margin-bottom: 2px;
    }
    
    .overview-label {
        font-size: 11px;
    }
    
    /* Stats tabs mobile */
    .stats-tabs {
        width: 100%;
        padding: 3px;
        gap: 4px;
        border-radius: var(--radius-sm);
    }
    
    .tab-btn {
        flex: 1;
        padding: 8px 4px;
        font-size: 12px;
        white-space: nowrap;
        min-width: 0;
    }
    
    .tab-btn.active {
        border-radius: var(--radius-sm);
    }
    
    /* Distribution grid mobile */
    .dist-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Ranking list mobile */
    .ranking-item {
        padding: 12px 14px;
    }
    
    .ranking-rank {
        width: 26px;
        font-size: 15px;
    }
    
    .ranking-name {
        font-size: 13px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 150px;
    }
    
    .ranking-count {
        font-size: 12px;
        padding: 3px 8px;
        border-radius: 20px;
    }
    
    /* Import section mobile */
    .import-card {
        padding: 24px 20px;
    }
    
    .upload-area {
        padding: 32px 20px;
    }
    
    .upload-area svg {
        width: 40px;
        height: 40px;
    }
    
    .import-config {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* Modal mobile */
    .modal-content {
        max-height: 90vh;
        margin: 16px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 4px;
        padding: 10px 0;
    }
    
    .detail-label {
        width: auto;
        font-size: 12px;
    }
    
    .detail-value {
        font-size: 14px;
    }
}

/* Chart Placeholder for unsupported dimensions */
.chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
    color: var(--text-secondary);
    padding: 40px;
}

.chart-placeholder p {
    margin: 8px 0;
    font-size: 14px;
}

.chart-placeholder p:first-child {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.chart-placeholder .btn-primary {
    margin-top: 20px;
    padding: 10px 24px;
}

/* Price Statistics Styles */
.price-dimension-bar {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.04),
        0 1px 2px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px var(--glass-border);
    border: none;
}

.price-dim-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.price-dim-btn:hover {
    color: var(--text-primary);
}

.price-dim-btn.active {
    color: var(--primary);
    background: rgba(0, 113, 227, 0.1);
}

.price-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.price-stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.price-chart-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.04),
        0 1px 2px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px var(--glass-border);
    border: none;
    transition: var(--transition-smooth);
}

.price-chart-card:hover {
    background: var(--glass-bg-hover);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.06),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.price-chart-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.price-chart-card .chart-container {
    height: 320px;
}

.price-ranking-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.04),
        0 1px 2px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px var(--glass-border);
    border: none;
    overflow: hidden;
}

.price-ranking-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.price-ranking-list {
    max-height: 320px;
    overflow-y: auto;
}

.price-ranking-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: var(--transition-smooth);
}

.price-ranking-item:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateX(8px);
    box-shadow: inset 4px 0 0 0 var(--primary);
}

.price-ranking-item:last-child {
    border-bottom: none;
}

.price-rank {
    width: 32px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
}

.price-ranking-item:nth-child(1) .price-rank {
    color: #ffb800;
}

.price-ranking-item:nth-child(2) .price-rank {
    color: #a8a8a8;
}

.price-ranking-item:nth-child(3) .price-rank {
    color: #cd7f32;
}

.price-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.price-detail {
    font-size: 12px;
    color: var(--text-secondary);
}

.price-amount {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.price-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.price-range {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Price stats mobile responsive */
@media (max-width: 1024px) {
    .price-stats-container {
        grid-template-columns: 1fr;
    }

    .price-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .price-chart-card .chart-container {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .price-dimension-bar {
        padding: 14px 16px;
        border-radius: var(--radius-md);
    }

    .price-dim-btn {
        padding: 8px 12px;
        font-size: 12px;
        flex: 1;
    }

    .price-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .price-overview .overview-card {
        padding: 12px 8px;
    }
    
    .price-overview .overview-value {
        font-size: 16px;
    }
    
    .price-overview .overview-label {
        font-size: 10px;
    }

    .price-stats-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .price-chart-card {
        padding: 14px;
        border-radius: var(--radius-md);
    }
    
    .price-chart-card h3 {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .price-chart-card .chart-container {
        height: 240px;
    }

    .price-ranking-card h3 {
        padding: 14px 16px;
        font-size: 14px;
    }

    .price-ranking-item {
        padding: 10px 14px;
    }

    .price-rank {
        width: 24px;
        font-size: 13px;
    }

    .price-name {
        font-size: 13px;
    }
    
    .price-detail {
        font-size: 11px;
    }

    .price-total {
        font-size: 13px;
    }
    
    .price-range {
        font-size: 10px;
    }
}

/* Small phones */
@media (max-width: 375px) {
    .hero-title {
        font-size: 24px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .overview-value {
        font-size: 20px;
    }
    
    .dim-btn, .sub-dim-btn {
        font-size: 12px;
        padding: 6px 8px;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .stat-card:hover,
    .chart-card:hover,
    .ranking-item:hover,
    .recent-item:hover,
    .overview-card:hover {
        transform: none;
    }
    
    .data-table tbody tr:hover {
        transform: none;
    }
    
    /* Better touch targets */
    .btn-action,
    .page-btn,
    .nav-link,
    .tab-btn,
    .dim-btn,
    .sub-dim-btn {
        min-height: 44px;
    }
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ==================== 推广轮播管理样式 ==================== */

/* 推广设置网格 */
.promo-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--glass-border);
}

.promo-config-grid .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.promo-config-grid .form-actions {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    grid-column: -1;
}

/* Toggle Switch 样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    background: var(--bg-secondary);
    border-radius: 34px;
    transition: var(--transition);
    width: 56px;
    height: 32px;
    padding: 4px;
}

.toggle-inner {
    position: absolute;
    left: 4px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-input:checked + .toggle-label {
    background: var(--primary);
}

.toggle-input:checked + .toggle-label .toggle-inner {
    transform: translateX(24px);
}

.toggle-switch-text {
    margin-left: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* 推广统计卡片 */
.promo-stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.promo-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.promo-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.promo-stat-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
}

.promo-stat-total {
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
    background: rgba(0, 113, 227, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.promo-stat-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.promo-stat-day {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: 12px;
}

.empty-text {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px;
    font-size: 14px;
}

/* 推广群组表格 */
.promo-groups .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

/* 推广设置区域 */
.promo-settings {
    margin-bottom: 30px;
}

.promo-settings .section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 推广统计区域 */
.promo-stats .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.promo-stats .section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .promo-config-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    
    .promo-config-grid .form-actions {
        grid-column: 1;
        flex-direction: column;
    }
    
    .promo-config-grid .form-actions button {
        width: 100%;
    }
    
    .promo-stat-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .promo-stat-detail {
        gap: 6px;
    }
    
    .promo-stat-day {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--border);
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 100px;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Apple-style Navigation Dropdown (Mega Menu) */
.nav-dropdown {
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(255, 255, 255, 0.8) 100%);
    backdrop-filter: saturate(200%) blur(40px);
    -webkit-backdrop-filter: saturate(200%) blur(40px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
    padding: 32px 0;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}

.nav-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 64px;
}

.dropdown-section {
    min-width: 200px;
}

.dropdown-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.dropdown-section a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(10px);
}

.nav-dropdown.active .dropdown-section a {
    opacity: 1;
    transform: translateY(0);
}

.nav-dropdown.active .dropdown-section a:nth-child(2) { transition-delay: 0.05s; }
.nav-dropdown.active .dropdown-section a:nth-child(3) { transition-delay: 0.1s; }
.nav-dropdown.active .dropdown-section a:nth-child(4) { transition-delay: 0.15s; }
.nav-dropdown.active .dropdown-section a:nth-child(5) { transition-delay: 0.2s; }

.dropdown-section a:hover {
    color: var(--primary);
    transform: translateX(8px);
}

.dropdown-icon {
    font-size: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-section a:hover .dropdown-icon {
    background: rgba(0, 113, 227, 0.1);
    transform: scale(1.1);
}

/* Navigation link hover state for dropdown */
.nav-link[data-dropdown] {
    position: relative;
}

.nav-link[data-dropdown]::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    transform: translateX(-50%) scale(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link[data-dropdown]:hover::after,
.nav-link[data-dropdown].dropdown-active::after {
    transform: translateX(-50%) scale(1);
}

/* Mobile dropdown adjustments */
@media (max-width: 768px) {
    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        padding: 16px;
        background: var(--bg-tertiary);
        border-bottom: 1px solid var(--border-light);
    }
    
    .nav-dropdown.mobile-active {
        display: block;
    }
    
    .dropdown-content {
        flex-direction: column;
        gap: 24px;
        padding: 0;
    }
    
    .dropdown-section a {
        opacity: 1;
        transform: none;
    }
}

/* Apple-style Hover Animations */

/* Navigation hover effect */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* Card hover effects - Glass enhanced */
.stat-card {
    transition: var(--transition-smooth);
    will-change: transform;
}

.stat-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.stat-icon {
    transition: var(--transition-bounce);
}

/* Chart card hover */
.chart-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Recent item hover - slide effect */
.recent-item {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.recent-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.recent-item:hover {
    background: var(--bg-secondary);
    transform: translateX(8px);
    padding-left: 20px;
}

.recent-item:hover::before {
    transform: scaleY(1);
}

/* Table row hover */
.data-table tbody tr {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.data-table tbody tr:hover {
    background: rgba(0, 113, 227, 0.04);
    transform: scale(1.01);
}

/* Button hover effects */
.btn-action, .page-btn, .dim-btn, .sub-dim-btn {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-action:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

.page-btn:not(:disabled):hover {
    background: var(--bg-secondary);
    transform: translateY(-1px);
}

.page-btn.active:hover {
    background: var(--primary);
}

/* Ranking item hover */
.ranking-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.ranking-item:hover {
    background: var(--bg-secondary);
    transform: translateX(12px);
}

.ranking-item:hover .ranking-rank {
    transform: scale(1.2);
    color: var(--primary);
}

.ranking-rank {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tab button hover */
.tab-btn {
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 113, 227, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.tab-btn:hover::before {
    width: 100%;
    height: 100%;
}

/* Upload area hover */
.upload-area {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(0, 113, 227, 0.02);
    transform: scale(1.01);
}

.upload-area:hover svg {
    transform: translateY(-4px);
    color: var(--primary);
}

.upload-area svg {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Overview card hover */
.overview-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.overview-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.overview-card:hover .overview-value {
    transform: scale(1.1);
}

.overview-value {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Filter select hover */
.filter-group select:hover,
.search-box input:hover {
    border-color: var(--primary);
}

.filter-group select:focus,
.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

/* Link hover animation */
.link {
    position: relative;
}

.link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.link:hover::after {
    width: 100%;
}

/* Stagger animation for list items */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ranking-item,
.recent-item,
.data-table tbody tr {
    animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.ranking-item:nth-child(1) { animation-delay: 0.05s; }
.ranking-item:nth-child(2) { animation-delay: 0.1s; }
.ranking-item:nth-child(3) { animation-delay: 0.15s; }
.ranking-item:nth-child(4) { animation-delay: 0.2s; }
.ranking-item:nth-child(5) { animation-delay: 0.25s; }

/* Error Message */
.error-message {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff3b30;
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    max-width: 80%;
    text-align: center;
}

/* API Settings Button */
#apiSettingsBtn {
    cursor: pointer;
}

#apiSettingsBtn:hover {
    color: var(--primary);
}
