:root {
    /* Цветовая палитра - Gaming Dark Theme */
    --bg-primary: var(--tg-theme-bg-color, #0D0D0F);
    --bg-secondary: var(--tg-theme-secondary-bg-color, #1A1A1E);
    --bg-elevated: #252529;
    --bg-card: #1E1E22;

    --text-primary: var(--tg-theme-text-color, #FFFFFF);
    --text-secondary: var(--tg-theme-hint-color, #8E8E93);
    --text-muted: #5A5A5E;

    /* Акценты - Gaming Style */
    --accent: var(--tg-theme-link-color, #00D4FF);
    --accent-dimmed: color-mix(in srgb, var(--accent), transparent 80%);
    --accent-glow: rgba(0, 212, 255, 0.3);
    --button-color: var(--tg-theme-button-color, #00D4FF);

    /* Семантические цвета */
    --danger: #FF453A;
    --warning: #FF9F0A;
    --success: #30D158;
    --premium: #FF6B9D;

    /* Градиенты */
    --gradient-primary: linear-gradient(135deg, #00D4FF 0%, #7B61FF 100%);
    --gradient-glow: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);

    /* Safe Area для iPhone */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);

    /* Анимации */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* Тени */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px var(--accent-glow);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    position: relative;
    margin: 0;
    z-index: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    box-sizing: border-box;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

input, textarea {
    -webkit-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

img {
    -webkit-user-drag: none;
    pointer-events: none;
}

a {
    text-decoration: none;
    color: inherit;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

.card-list img {
    pointer-events: auto;
}

/* === К О Н Т Е Н Т === */
.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px calc(16px + var(--safe-left)) calc(80px + var(--safe-bottom)) calc(16px + var(--safe-right));
    width: 100%;
    gap: 24px;
    z-index: 10;
    min-height: 100vh;
}

/* === Т И П О Г Р А Ф И К А === */
h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin: 0;
}

p {
    margin: 0;
    line-height: 1.5;
}

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

/* === Н А В И Г А Ц И Я === */
.navigation {
    position: fixed;
    display: flex;
    flex-direction: row;
    height: calc(56px + var(--safe-bottom));
    width: 100%;
    bottom: 0;
    justify-content: space-evenly;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background-color: color-mix(in srgb, var(--bg-primary), transparent 10%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding-top: 8px;
    padding-bottom: var(--safe-bottom);
    padding-left: 8px;
    padding-right: 8px;
    z-index: 100;
    gap: 4px;
}

.navigation .nav-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    outline: none;
    padding: 8px 16px;
    border-radius: 16px;
    transition: all var(--transition-base);
    flex: 1;
    max-width: 100px;
    color: var(--text-secondary);
    cursor: pointer;
    border: none;
    background: transparent;
}

.navigation .nav-link:visited {
    color: var(--text-secondary);
}

.navigation .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.navigation .nav-link:active {
    transform: scale(0.95);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Active state - icon only with accent color */
.navigation .nav-link.active {
    background: transparent;
    color: var(--accent);
}

.navigation .nav-link.active .hint {
    color: var(--accent);
    opacity: 0.9;
}

.navigation .nav-link.active img {
    filter: none;
    opacity: 1;
}

/* Inactive state */
.navigation .nav-link:not(.active) {
    color: var(--text-secondary);
}

.navigation .nav-link:not(.active) .hint {
    color: var(--text-secondary);
}

.navigation .nav-link:not(.active) img {
    opacity: 0.6;
}

.navigation img {
    width: 22px;
    height: 22px;
    transition: all var(--transition-base);
    pointer-events: none;
}

.navigation .nav-link:active img {
    transform: scale(1.1);
}

.navigation .hint {
    font-size: 10px;
    font-weight: 600;
}

.navigation .nav-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    align-items: center;
    text-decoration: none;
    outline: none;
    opacity: 0.5;
    transition: all var(--transition-base);
    padding: 4px 16px;
    border-radius: 12px;
}

.navigation .nav-link:active {
    opacity: 1;
    transform: scale(0.95);
}

.navigation .nav-link.active {
    opacity: 1;
}

.navigation img {
    width: 22px;
    height: 22px;
    transition: transform var(--transition-base);
}

.navigation .nav-link:active img {
    transform: scale(1.1);
}

.navigation .hint {
    font-size: 10px;
    font-weight: 600;
}

/* === С Е К Ц И И === */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 2px;
}

.section-title .see-all {
    font-size: 14px;
    color: var(--accent);
    font-weight: 600;
}

/* === А Н И М А Ц И И === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.4s var(--transition-slow) forwards;
}

.animate-slide-up {
    animation: slideUp 0.3s var(--transition-slow) forwards;
}

/* === С К Р О Л Л Б А Р === */
::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* === Ф О К У С === */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* === D I S A B L E D === */
:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
