/* Attack Shark Mini App - Gaming Style Dark Theme */
:root {
    --bg-dark: #0d0d0d;
    --bg-card: #1a1a1a;
    --bg-card-hover: #252525;
    --primary: #ff4444;
    --primary-glow: rgba(255, 68, 68, 0.3);
    --accent: #00ff88;
    --accent-blue: #00b4ff;
    --text: #ffffff;
    --text-secondary: #888888;
    --text-muted: #555555;
    --border: #333333;
    --gradient-primary: linear-gradient(135deg, #ff4444 0%, #ff0066 100%);
    --gradient-accent: linear-gradient(135deg, #00ff88 0%, #00b4ff 100%);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px var(--primary-glow);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

#app {
    padding-bottom: 80px;
}

/* ===================== HERO BANNER ===================== */
.hero-banner {
    position: relative;
    padding: 32px 20px;
    background: linear-gradient(135deg, #1a0000 0%, #0d0d0d 50%, #000a0a 100%);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255, 68, 68, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(0, 255, 136, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: linear-gradient(45deg, transparent 0%, rgba(255,255,255,0.03) 50%, transparent 100%);
    animation: shimmer 4s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 12px;
}

.shark-icon {
    font-size: 48px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.brand-name {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.brand-sub {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 6px;
    margin-top: 2px;
}

.hero-tagline {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.hero-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===================== CATEGORIES ===================== */
.categories-section {
    padding: 16px 0 8px;
    position: sticky;
    top: 0;
    background: var(--bg-dark);
    z-index: 50;
}

.categories-scroll {
    display: flex;
    gap: 10px;
    padding: 0 20px 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    color: var(--text);
    font-size: 14px;
}

.category-chip:active {
    transform: scale(0.95);
}

.category-chip.active {
    background: var(--gradient-primary);
    border-color: var(--primary);
}

.chip-icon {
    font-size: 16px;
}

.chip-text {
    font-weight: 600;
}

.chip-count {
    font-size: 11px;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.category-chip.active .chip-count {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* ===================== SECTIONS ===================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 12px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 700;
    position: relative;
    padding-left: 14px;
}

.section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.products-count {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===================== PRODUCTS ===================== */
.products-section {
    padding-bottom: 8px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 20px 20px;
}

.product-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    position: relative;
}

.product-card:active {
    transform: scale(0.98);
}

.product-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-placeholder {
    font-size: 48px;
    opacity: 0.8;
}

.product-info {
    padding: 12px;
}

.product-name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.product-badge {
    position: absolute;
    top: 8px;
    right: 8px;
}

.badge-hot {
    font-size: 14px;
}

/* ===================== CONTENT ===================== */
.content-section {
    padding-bottom: 8px;
}

.content-tabs {
    display: flex;
    gap: 8px;
    padding: 0 20px 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.content-tabs::-webkit-scrollbar {
    display: none;
}

.content-tab {
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.content-tab.active {
    background: var(--gradient-primary);
    border-color: var(--primary);
}

.content-tab:active {
    transform: scale(0.95);
}

.content-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 20px;
}

.content-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.content-card:hover {
    border-color: var(--accent-blue);
}

.content-card:active {
    transform: scale(0.99);
}

.content-thumbnail {
    width: 120px;
    height: 90px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.content-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-icon {
    font-size: 32px;
    opacity: 0.8;
}

.content-play {
    position: absolute;
    width: 36px;
    height: 36px;
    background: rgba(255, 68, 68, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
}

.content-info {
    padding: 12px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.content-type {
    font-size: 10px;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.content-title {
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===================== DRIVERS ===================== */
.drivers-section {
    padding: 20px;
}

.drivers-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.drivers-icon {
    font-size: 32px;
}

.drivers-info {
    flex: 1;
}

.drivers-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.drivers-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-driver {
    background: var(--bg-dark);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

.btn-driver:hover {
    background: var(--accent);
    color: var(--bg-dark);
}

/* ===================== PROMO ===================== */
.promo-section {
    padding: 0 20px 20px;
}

.promo-card {
    background: var(--bg-card);
    border: 2px solid var(--primary);
    padding: 28px 24px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.promo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, var(--primary-glow) 0%, transparent 70%);
    pointer-events: none;
}

.promo-badge {
    display: inline-block;
    background: var(--gradient-primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
}

.promo-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    position: relative;
}

.promo-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
    position: relative;
}

.btn-promo {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.btn-promo:active {
    transform: scale(0.95);
}

/* ===================== BOTTOM NAVIGATION ===================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(13, 13, 13, 0.9) 0%, rgba(13, 13, 13, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 16px 20px;
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--border);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    padding: 6px 16px;
    background: none;
    border: none;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item:active {
    transform: scale(0.95);
}

.nav-icon {
    font-size: 20px;
}

.nav-label {
    font-size: 10px;
    font-weight: 600;
}

/* ===================== MODAL ===================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    align-items: flex-end;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-dark);
    width: 100%;
    max-height: 90vh;
    border-radius: 24px 24px 0 0;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:active {
    transform: scale(0.9);
}

.modal-product {
    display: flex;
    flex-direction: column;
}

.modal-image {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-placeholder {
    font-size: 80px;
    opacity: 0.8;
}

.modal-details {
    padding: 24px 20px 40px;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.modal-price {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.modal-price small {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.modal-badges {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.modal-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.modal-badge.new {
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.9), rgba(0, 150, 60, 0.9));
    color: white;
}

.modal-badge.promo {
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.9), rgba(255, 68, 68, 0.9));
    color: white;
}

.modal-desc {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
    font-size: 14px;
}

.buy-section {
    margin-bottom: 20px;
}

.buy-section h4 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 500;
}

.buy-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-buy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    color: white;
}

.btn-buy:active {
    transform: scale(0.98);
}

.btn-buy.site {
    background: var(--gradient-primary);
}

.btn-buy.ozon {
    background: #005bff;
}

.btn-buy.wb {
    background: #cb11ab;
}

.btn-buy.dns {
    background: #ff6600;
}

.btn-icon {
    font-size: 18px;
}

.btn-text {
    flex: 1;
    text-align: left;
}

.driver-link {
    text-align: center;
}

.driver-link .btn-driver {
    width: 100%;
    text-align: center;
}

/* ===================== LOADING ===================== */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 13, 13, 0.95);
    z-index: 300;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}

.loading.active {
    display: flex;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===================== TOAST ===================== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    color: var(--text);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 400;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ===================== EMPTY STATE ===================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    grid-column: 1 / -1;
}

.empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 15px;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

/* ===================== SAFE AREA ===================== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
    #app {
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
}

/* ===================== ANIMATIONS ===================== */
.product-card,
.content-card {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
