/* ===== 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);
}

.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;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }

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

    .nav-link {
        text-align: center;
        padding: 1rem;
    }

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

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

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

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