/* ============ RESET & BASE ============ */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    text-rendering: optimizeLegibility;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #060a14;
}

::-webkit-scrollbar-thumb {
    background: #2a3b57;
    border-radius: 5px;
    border: 2px solid #060a14;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a4d6e;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #2a3b57 #060a14;
}

/* ============ SELECTION ============ */
::selection {
    background: rgba(245, 158, 11, 0.3);
    color: #fff;
}

/* ============ GLASS EFFECT ============ */
.glass {
    background: rgba(13, 20, 36, 0.7);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(42, 59, 87, 0.5);
}

.glass-strong {
    background: rgba(13, 20, 36, 0.9);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(58, 77, 110, 0.6);
}

.glass-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-hover:hover {
    background: rgba(17, 27, 48, 0.85);
    border-color: rgba(245, 158, 11, 0.3);
    transform: translateY(-2px);
}

/* ============ GRADIENT TEXT ============ */
.gradient-brand {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-brand-vivid {
    background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 25%, #f59e0b 50%, #ef4444 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}

.gradient-success {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============ BUTTONS ============ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #060a14;
    font-weight: 700;
    font-size: 0.9375rem;
    border-radius: 0.75rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.5);
    background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 100%);
}

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

.btn-primary-lg {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
    border-radius: 0.875rem;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(17, 27, 48, 0.6);
    color: #e6ecf5;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(58, 77, 110, 0.5);
    backdrop-filter: blur(10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: rgba(26, 37, 64, 0.9);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fff;
    transform: translateY(-1px);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #a8b3c7;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

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

/* ============ BADGES ============ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem;
    line-height: 1;
    white-space: nowrap;
}

.badge-tier-aplus {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.2));
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.badge-tier-a {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-tier-b {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-win {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-loss {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-live {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    position: relative;
}

.badge-live::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    animation: pulse 1.5s ease-in-out infinite;
}

/* ============ CARDS ============ */
.card {
    background: rgba(13, 20, 36, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(42, 59, 87, 0.5);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover {
    cursor: pointer;
}

.card-hover:hover {
    border-color: rgba(245, 158, 11, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5), 0 0 30px rgba(245, 158, 11, 0.1);
}

.card-featured {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(13, 20, 36, 0.8));
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 60px rgba(245, 158, 11, 0.1);
}

/* ============ TICKER ============ */
.ticker-container {
    overflow: hidden;
    white-space: nowrap;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.ticker-track {
    display: inline-flex;
    animation: ticker 60s linear infinite;
    gap: 3rem;
    padding-right: 3rem;
}

.ticker-track:hover {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #a8b3c7;
}

/* ============ ANIMATIONS ============ */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.animate-shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.03) 50%,
        transparent 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 3s linear infinite;
}

/* ============ REVEAL ON SCROLL ============ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ============ NAV BLUR ============ */
.nav-blur {
    background: rgba(6, 10, 20, 0.7);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(42, 59, 87, 0.4);
}

/* ============ STAT NUMBERS ============ */
.stat-number {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* ============ DIVIDER ============ */
.divider-gradient {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(58, 77, 110, 0.5), transparent);
}

/* ============ GLOW EFFECTS ============ */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    pointer-events: none;
}

/* ============ FOCUS STATES ============ */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
    border-radius: 0.375rem;
}

/* ============ UTILITY ============ */
.text-balance {
    text-wrap: balance;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ============ MOBILE ADJUSTMENTS ============ */
@media (max-width: 640px) {
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
    
    .btn-primary-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* ============ LOADING SKELETON ============ */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(42, 59, 87, 0.3) 0%,
        rgba(58, 77, 110, 0.4) 50%,
        rgba(42, 59, 87, 0.3) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
    border-radius: 0.5rem;
}

/* ============ NUMBER COUNTERS ============ */
.counter-digit {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}


/* ============ GLOBAL INPUTS (высший приоритет) ============ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea,
select {
    background: #0d1424 !important;
    color: #e6ecf5 !important;
    -webkit-text-fill-color: #e6ecf5 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    caret-color: #fbbf24 !important;
}

input::placeholder,
textarea::placeholder {
    color: #4a5670 !important;
    -webkit-text-fill-color: #4a5670 !important;
    opacity: 1 !important;
}

input:focus,
textarea:focus,
select:focus {
    background: #111b30 !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15) !important;
    outline: none !important;
}

/* Chrome autofill fix */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: #e6ecf5 !important;
    -webkit-box-shadow: 0 0 0 30px #0d1424 inset !important;
    transition: background-color 5000s ease-in-out 0s;
    caret-color: #fbbf24 !important;
}

/* Отключаем встроенные Firefox стили */
input:-moz-autofill {
    background: #0d1424 !important;
    color: #e6ecf5 !important;
}
