/* ===== Professional Futuristic Perps Tracker Styles ===== */
:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #1a1f3a;
    --bg-card: #141829;
    --border: #2a3f5f;
    --text-primary: #ffffff;
    --text-secondary: #8892b0;
    --text-muted: #64748b;
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gradient: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    --gradient-green: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(180deg, #0a0e27 0%, #1a1f3a 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.05) 0%, transparent 50%),
                      radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    z-index: -1;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(50px, 50px); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== Header & Navigation ===== */
header {
    background: rgba(26, 31, 58, 0.8);
    border-bottom: 1px solid rgba(42, 63, 95, 0.5);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, padding 0.3s ease;
}

/* Collapsible header styles */
header.collapsed {
    transform: translateY(-100%);
}

header.collapsed + .header-expand-bar,
.header-expand-bar.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.header-expand-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 32px;
    background: rgba(26, 31, 58, 0.95);
    border-bottom: 1px solid rgba(42, 63, 95, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    cursor: pointer;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-expand-bar:hover {
    background: rgba(26, 31, 58, 1);
}

.header-expand-bar .expand-icon {
    color: var(--text-muted);
    font-size: 1rem;
    transition: transform 0.3s ease, color 0.2s ease;
}

.header-expand-bar:hover .expand-icon {
    color: var(--primary);
}

.header-collapse-btn {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 24px;
    background: rgba(26, 31, 58, 0.95);
    border: 1px solid rgba(42, 63, 95, 0.5);
    border-radius: 0 0 8px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    transition: background 0.2s ease;
}

.header-collapse-btn:hover {
    background: rgba(42, 63, 95, 0.8);
}

.header-collapse-btn .collapse-icon {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: transform 0.3s ease, color 0.2s ease;
}

.header-collapse-btn:hover .collapse-icon {
    color: var(--primary);
}

header.collapsed .header-collapse-btn {
    display: none;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    background: var(--gradient);
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(14, 165, 233, 0.6); }
}

nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(14, 165, 233, 0.1);
    transition: left 0.3s ease;
    z-index: -1;
}

.nav-link:hover::before,
.nav-link.active::before {
    left: 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    transform: translateY(-2px);
}

/* ===== Dropdown Menu ===== */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-toggle {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-dropdown-toggle::after {
    content: '▾';
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle::after {
    transform: rotate(180deg);
}

.nav-dropdown-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(14, 165, 233, 0.1);
    transition: left 0.3s ease;
    z-index: -1;
}

.nav-dropdown-toggle:hover::before,
.nav-dropdown-toggle.active::before {
    left: 0;
}

.nav-dropdown-toggle:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(26, 31, 58, 0.98);
    border: 1px solid rgba(42, 63, 95, 0.8);
    border-radius: 10px;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-top: 0.5rem;
}

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

.nav-dropdown-item {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.875rem 1.25rem;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(42, 63, 95, 0.3);
}

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

.nav-dropdown-item:hover {
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary);
    padding-left: 1.5rem;
}

.nav-dropdown-item.active {
    color: var(--primary);
    background: rgba(14, 165, 233, 0.05);
}

/* ===== Navigation Container ===== */
.nav-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    justify-content: space-between;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

/* ===== Auth Buttons ===== */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-signin-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-signin-link:hover {
    color: var(--primary);
}

.btn-signup {
    background: var(--gradient);
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
    white-space: nowrap;
}

.btn-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
}

/* ===== Hero Section ===== */
.hero {
    text-align: center;
    padding: 8rem 2rem;
    background: linear-gradient(135deg, rgba(30, 42, 74, 0.6) 0%, rgba(15, 23, 41, 0.6) 100%);
    border-radius: 24px;
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(42, 63, 95, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.hero h1 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
    line-height: 1.2;
    text-shadow: 0 0 40px rgba(14, 165, 233, 0.3);
}

.hero p {
    font-size: 1.4rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 3rem;
    position: relative;
    z-index: 1;
    line-height: 1.8;
}

.cta-button {
    display: inline-block;
    background: var(--gradient);
    color: #fff;
    padding: 1.25rem 3rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.5);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.cta-button:hover::before {
    left: 0;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(14, 165, 233, 0.6);
}

/* ===== Cards ===== */
.card {
    background: rgba(20, 24, 41, 0.6);
    border: 1px solid rgba(42, 63, 95, 0.5);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.card:hover {
    border-color: var(--primary);
    box-shadow: 0 12px 35px rgba(14, 165, 233, 0.2);
    transform: translateY(-5px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(42, 63, 95, 0.5);
}

.card-header h2, .card-header h5 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-body {
    color: var(--text-secondary);
}

/* ===== Feature Cards (Modern Grid) ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.feature-card {
    background: linear-gradient(135deg, rgba(20, 24, 41, 0.8) 0%, rgba(26, 31, 58, 0.8) 100%);
    border: 1px solid rgba(42, 63, 95, 0.5);
    border-radius: 16px;
    padding: 1.8rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 50px rgba(14, 165, 233, 0.3);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    animation: float-icon 3s ease-in-out infinite;
}

@keyframes float-icon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

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

.stat-card {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.6) 0%, rgba(20, 24, 41, 0.6) 100%);
    border: 1px solid rgba(42, 63, 95, 0.5);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.2);
    border-color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Table ===== */
.table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: rgba(26, 31, 58, 0.8);
    color: var(--text-secondary);
    font-weight: 600;
    text-align: left;
    padding: 1.25rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--primary);
}

td {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(42, 63, 95, 0.3);
    color: var(--text-secondary);
}

tr:hover td {
    background: rgba(14, 165, 233, 0.05);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.rank-1 { background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%); color: #000; }
.rank-2 { background: linear-gradient(135deg, #C0C0C0 0%, #808080 100%); color: #000; }
.rank-3 { background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%); color: #fff; }

.positive { color: var(--success); }
.negative { color: var(--danger); }

/* ===== Loading & Empty States ===== */
.loading {
    text-align: center;
    padding: 4rem;
    color: var(--text-muted);
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

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

/* ===== Pricing Page ===== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin: 3rem 0;
}

.pricing-card {
    background: linear-gradient(135deg, rgba(20, 24, 41, 0.8) 0%, rgba(26, 31, 58, 0.8) 100%);
    border: 2px solid rgba(42, 63, 95, 0.5);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.pricing-card:hover::before {
    opacity: 1;
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 0 50px rgba(14, 165, 233, 0.4);
    transform: scale(1.05);
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(14, 165, 233, 0.3);
}

.plan-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-price {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.plan-price span {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.features-list {
    list-style: none;
    margin: 2.5rem 0;
    text-align: left;
}

.features-list li {
    padding: 1rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(42, 63, 95, 0.3);
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list li::before {
    content: "";
    margin-right: 0;
}

/* ===== Footer ===== */
footer {
    background: rgba(26, 31, 58, 0.8);
    border-top: 1px solid rgba(42, 63, 95, 0.5);
    padding: 4rem 0 2rem;
    margin-top: 5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary);
    transform: translateX(5px);
    display: inline-block;
}

.footer-bottom {
    text-align: center;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(42, 63, 95, 0.5);
    color: var(--text-muted);
}

/* ===== Social Media Links ===== */
.social-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-icon {
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(26, 31, 58, 0.6);
    border: 1px solid rgba(42, 63, 95, 0.5);
}

.social-icon:hover {
    color: var(--primary);
    background: rgba(14, 165, 233, 0.1);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.footer-social {
    margin-top: 1.5rem;
}

.footer-social .social-links {
    justify-content: flex-start;
    gap: 1.25rem;
}

.footer-social .social-icon {
    width: 40px;
    height: 40px;
}

/* ===== Mobile Hamburger Menu ===== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
    background: rgba(14, 165, 233, 0.1);
    outline: none;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span:nth-child(1) {
    margin-bottom: 6px;
}

.mobile-menu-toggle span:nth-child(3) {
    margin-top: 6px;
}

/* Hamburger animation when open */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.9);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    /* Show hamburger menu */
    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-overlay {
        display: block;
        pointer-events: none;
    }

    .mobile-menu-overlay.active {
        pointer-events: auto;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 1rem;
    }

    /* Hide desktop nav, show when mobile menu active */
    .nav-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: rgba(26, 31, 58, 0.98);
        flex-direction: column;
        justify-content: flex-start;
        padding: 5rem 1.5rem 2rem;
        z-index: 999;
        transition: right 0.3s ease;
        overflow-y: auto;
        border-left: 1px solid rgba(42, 63, 95, 0.5);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .nav-container.active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    nav {
        flex-direction: column;
        width: 100%;
    }

    .nav-link {
        text-align: left;
        padding: 1rem;
        width: 100%;
        min-height: 44px;
        display: flex;
        align-items: center;
        border-bottom: 1px solid rgba(42, 63, 95, 0.3);
        font-size: 1rem;
    }

    .nav-link:hover,
    .nav-link:active {
        background: rgba(14, 165, 233, 0.1);
        transform: none;
    }

    /* Mobile dropdown styles */
    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown-toggle {
        width: 100%;
        min-height: 44px;
        padding: 1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid rgba(42, 63, 95, 0.3);
        font-size: 1rem;
    }

    .nav-dropdown-toggle:hover,
    .nav-dropdown-toggle:active {
        transform: none;
        background: rgba(14, 165, 233, 0.1);
    }

    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(20, 24, 41, 0.6);
        border: none;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-dropdown.open .nav-dropdown-menu {
        max-height: 500px;
    }

    .nav-dropdown-item {
        padding: 0.875rem 1.25rem 0.875rem 2rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        font-size: 0.95rem;
    }

    .nav-dropdown-item:hover,
    .nav-dropdown-item:active {
        padding-left: 2.25rem;
    }

    /* Auth buttons mobile */
    .auth-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(42, 63, 95, 0.5);
    }

    .btn-signin-link {
        width: 100%;
        text-align: center;
        padding: 0.875rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(42, 63, 95, 0.5);
    }

    .btn-signup {
        width: 100%;
        text-align: center;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Social links in mobile menu */
    .header-content > .social-links {
        display: none;
    }

    .nav-container .social-links {
        display: flex;
        justify-content: center;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(42, 63, 95, 0.5);
    }

    .nav-container .social-icon {
        width: 44px;
        height: 44px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .pricing-card.featured {
        transform: scale(1);
    }

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

    /* Touch-friendly tap targets */
    .cta-button {
        min-height: 44px;
        padding: 0.875rem 1.5rem;
    }

    .social-icon {
        width: 44px;
        height: 44px;
    }

    /* Larger font sizes for mobile readability */
    body {
        font-size: 16px;
    }

    .card-body,
    .feature-card p,
    .stat-card p {
        font-size: 1rem;
        line-height: 1.7;
    }

    .footer-section a,
    .footer-section p,
    .footer-section li {
        font-size: 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .footer-section ul {
        margin: 0;
    }

    /* ===== Mobile Spacing Reductions ===== */

    /* Container padding - tighter on mobile */
    .container {
        padding: 0 0.75rem;
    }

    /* Hero section mobile - reduced padding */
    .hero {
        padding: 2.5rem 1rem;
        margin: 1rem 0;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    /* Cards - tighter padding */
    .card {
        padding: 1.25rem;
        margin-bottom: 1rem;
        border-radius: 10px;
    }

    .card-header {
        padding-bottom: 0.75rem;
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 0;
    }

    /* Feature cards */
    .feature-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }

    .feature-card h3 {
        margin-bottom: 0.5rem;
        font-size: 1.1rem;
    }

    /* Stat cards */
    .stat-card {
        padding: 1.25rem;
    }

    /* Section spacing */
    section {
        padding: 2rem 0;
    }

    .section-title {
        margin-bottom: 1.5rem;
        font-size: 1.5rem;
    }

    /* Grids - reduced gaps */
    .feature-grid,
    .stats-grid,
    .pricing-grid {
        gap: 1rem;
        margin: 1.5rem 0;
    }

    /* Pricing cards */
    .pricing-card {
        padding: 1.5rem;
    }

    .pricing-card h3 {
        font-size: 1.25rem;
    }

    .pricing-card .price {
        font-size: 2rem;
        margin: 1rem 0;
    }

    .pricing-card ul {
        margin: 1rem 0;
    }

    .pricing-card li {
        padding: 0.4rem 0;
    }

    /* Footer - reduced spacing */
    footer {
        padding: 2.5rem 0 1.5rem;
        margin-top: 3rem;
    }

    .footer-content {
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .footer-section {
        margin-bottom: 1rem;
    }

    .footer-section h3 {
        margin-bottom: 0.75rem;
        font-size: 1rem;
    }

    /* Header - tighter padding */
    header {
        padding: 0.75rem 0;
    }

    .header-content {
        gap: 0.5rem;
    }

    /* Logo size on mobile */
    .logo {
        font-size: 1.1rem;
    }

    .logo-icon {
        font-size: 1.25rem;
    }

    /* Buttons - slightly smaller padding */
    .cta-button,
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }

    /* Form elements - tighter spacing */
    .form-group {
        margin-bottom: 1rem;
    }

    .form-group label {
        margin-bottom: 0.4rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
    }

    /* Lists and text */
    ul, ol {
        padding-left: 1.25rem;
    }

    p {
        margin-bottom: 0.75rem;
    }

    h1 { font-size: 1.75rem; margin-bottom: 0.75rem; }
    h2 { font-size: 1.5rem; margin-bottom: 0.6rem; }
    h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
    h4 { font-size: 1.1rem; margin-bottom: 0.4rem; }

    /* Alerts and notifications */
    .alert,
    .notification {
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
    }

    /* Modal/Dialog spacing */
    .modal-content {
        padding: 1.25rem;
        margin: 1rem;
    }

    /* Tab spacing */
    .tabs {
        gap: 0.25rem;
    }

    .tab-btn {
        padding: 0.6rem 1rem;
    }

    /* ===== Mobile Table Horizontal Scrolling ===== */
    .table-container {
        position: relative;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--primary) var(--bg-secondary);
    }

    /* Visual scroll indicator gradient on right edge */
    .table-container::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 30px;
        background: linear-gradient(to left, rgba(10, 14, 39, 0.9), transparent);
        pointer-events: none;
        opacity: 1;
        transition: opacity 0.3s ease;
    }

    /* Hide gradient when scrolled to end */
    .table-container.scrolled-end::after {
        opacity: 0;
    }

    /* Left gradient when not at start */
    .table-container.scrolled-start::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 30px;
        background: linear-gradient(to right, rgba(10, 14, 39, 0.9), transparent);
        pointer-events: none;
        z-index: 5;
    }

    table {
        min-width: 600px;
    }

    th, td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    /* Sticky first column for context */
    .table-sticky-first th:first-child,
    .table-sticky-first td:first-child {
        position: sticky;
        left: 0;
        background: var(--bg-secondary);
        z-index: 2;
        border-right: 1px solid var(--border);
    }

    .table-sticky-first td:first-child {
        background: var(--bg-card);
    }

    /* Touch-friendly row height */
    tbody tr {
        min-height: 44px;
    }

    /* Scroll hint on first visit */
    .table-scroll-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.5rem;
        font-size: 0.75rem;
        color: var(--text-muted);
        background: rgba(14, 165, 233, 0.1);
        border-radius: 4px;
        margin-bottom: 0.5rem;
    }

    .table-scroll-hint svg {
        animation: scrollHint 1.5s ease-in-out infinite;
    }

    @keyframes scrollHint {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(5px); }
    }
}

/* ===== Touch Device Styles ===== */
/* Disable hover effects and use active states on touch devices */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover transforms and effects */
    .logo:hover,
    .nav-link:hover,
    .nav-dropdown-toggle:hover,
    .nav-dropdown-item:hover,
    .cta-button:hover,
    .btn-signin-link:hover,
    .btn-signup:hover,
    .btn-primary:hover,
    .btn-secondary:hover,
    .card:hover,
    .feature-card:hover,
    .stat-card:hover,
    .pricing-card:hover,
    .social-icon:hover,
    .footer-section a:hover,
    button:hover,
    a:hover {
        transform: none !important;
    }

    /* Disable hover background/color changes */
    .nav-link:hover::before,
    .nav-dropdown-toggle:hover::before,
    .cta-button:hover::before,
    .feature-card:hover::before,
    .pricing-card:hover::before {
        opacity: 0 !important;
    }

    /* Disable hover glow effects */
    .card:hover,
    .feature-card:hover,
    .stat-card:hover,
    .pricing-card:hover {
        box-shadow: none;
    }

    /* Disable table row hover */
    tr:hover td,
    tbody tr:hover {
        background: inherit !important;
    }

    /* ===== Enhanced Active States for Touch ===== */
    /* Buttons - clear tap feedback */
    .cta-button:active,
    .btn-primary:active,
    .btn-secondary:active,
    .btn-signup:active,
    .btn-signin-link:active,
    button:active {
        transform: scale(0.97) !important;
        opacity: 0.9;
        transition: transform 0.1s ease, opacity 0.1s ease;
    }

    /* Navigation links */
    .nav-link:active,
    .nav-dropdown-toggle:active,
    .nav-dropdown-item:active {
        background: rgba(14, 165, 233, 0.2) !important;
        transition: background 0.1s ease;
    }

    /* Cards - subtle press effect */
    .card:active,
    .feature-card:active,
    .stat-card:active,
    .pricing-card:active {
        transform: scale(0.99) !important;
        opacity: 0.95;
        transition: transform 0.1s ease, opacity 0.1s ease;
    }

    /* Social icons */
    .social-icon:active {
        transform: scale(0.9) !important;
        opacity: 0.8;
        transition: transform 0.1s ease, opacity 0.1s ease;
    }

    /* Footer links */
    .footer-section a:active {
        color: var(--primary) !important;
        transition: color 0.1s ease;
    }

    /* Table rows - tap highlight */
    tbody tr:active td {
        background: rgba(14, 165, 233, 0.1) !important;
    }

    /* Generic link tap state */
    a:active {
        opacity: 0.8;
    }

    /* Tab buttons */
    .tab-btn:active,
    .timeframe-btn:active {
        transform: scale(0.97) !important;
        opacity: 0.9;
    }

    /* Form elements */
    input:focus,
    select:focus,
    textarea:focus {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }

    /* Prevent text selection on tap */
    button,
    .nav-link,
    .nav-dropdown-toggle,
    .cta-button,
    .social-icon,
    .tab-btn {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        user-select: none;
    }

    /* Faster transitions for touch responsiveness */
    * {
        -webkit-tap-highlight-color: rgba(14, 165, 233, 0.2);
    }
}

/* ===== Mobile-Optimized Form Styles ===== */
@media (max-width: 768px) {
    /* Base form input styles for mobile */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    input[type="url"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
        min-height: 48px;
        padding: 0.875rem 1rem;
        border-radius: 8px;
        -webkit-appearance: none;
        appearance: none;
    }

    /* Form input styling */
    .form-input,
    .form-select {
        width: 100%;
        font-size: 16px !important;
        min-height: 48px;
        padding: 0.875rem 1rem;
        background: rgba(26, 31, 58, 0.8);
        border: 1px solid rgba(42, 63, 95, 0.6);
        border-radius: 8px;
        color: var(--text-primary);
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .form-input:focus,
    .form-select:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
    }

    /* Placeholder styling */
    .form-input::placeholder {
        color: var(--text-muted);
        opacity: 0.7;
    }

    /* Select dropdown arrow */
    .form-select {
        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='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 1rem center;
        padding-right: 2.5rem;
    }

    /* Form group spacing */
    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group label,
    .form-label {
        display: block;
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
        font-weight: 500;
        color: var(--text-secondary);
    }

    /* Checkbox and radio inputs */
    input[type="checkbox"],
    input[type="radio"] {
        width: 20px;
        height: 20px;
        min-height: 20px;
        margin-right: 0.5rem;
        cursor: pointer;
        accent-color: var(--primary);
    }

    .form-checkbox {
        display: flex;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 1rem;
        min-height: 44px;
        padding: 0.5rem 0;
    }

    .form-checkbox label {
        font-size: 0.9rem;
        line-height: 1.5;
        color: var(--text-secondary);
        cursor: pointer;
    }

    /* Range slider styling */
    input[type="range"] {
        -webkit-appearance: none;
        appearance: none;
        height: 8px;
        background: rgba(42, 63, 95, 0.6);
        border-radius: 4px;
        outline: none;
    }

    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 24px;
        height: 24px;
        background: var(--primary);
        border-radius: 50%;
        cursor: pointer;
    }

    input[type="range"]::-moz-range-thumb {
        width: 24px;
        height: 24px;
        background: var(--primary);
        border-radius: 50%;
        cursor: pointer;
        border: none;
    }

    /* Textarea specific */
    textarea {
        min-height: 100px;
        resize: vertical;
        line-height: 1.5;
    }

    /* Form buttons */
    .auth-button,
    button[type="submit"],
    .form-button {
        width: 100%;
        min-height: 48px;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 8px;
        cursor: pointer;
    }

    /* Filter/control select elements */
    .filter-group select,
    .timeframe-select,
    .period-selector select {
        min-height: 44px;
        padding: 0.5rem 2rem 0.5rem 0.75rem;
        font-size: 14px !important;
    }

    /* Inline form controls (like in live-trades) */
    .form-select[style*="width: auto"] {
        min-width: 80px;
        min-height: 36px;
        padding: 0.25rem 1.5rem 0.25rem 0.5rem;
        font-size: 14px !important;
    }

    /* Auth pages specific */
    .auth-card {
        padding: 1.5rem;
        margin: 1rem;
    }

    .auth-header {
        margin-bottom: 1.5rem;
    }

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

    .auth-subtitle {
        font-size: 0.9rem;
    }

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

    .form-error {
        color: var(--error);
        font-size: 0.8rem;
        margin-top: 0.25rem;
    }

    /* Success state */
    .form-input.success,
    .form-select.success {
        border-color: var(--success);
    }
}
