:root {
    --bg: #070913;
    --bg-soft: #0e1322;
    --card: #131b2e;
    --card-hover: #19233f;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(109, 94, 252, 0.4);
    --primary: #6d5efc;
    --primary-2: #00f2fe;
    --text: #f0f4ff;
    --text-dim: #94a3b8;
    --danger: #ff4757;
    --success: #2ed573;
    --radius: 16px;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --glow: 0 0 25px rgba(109, 94, 252, 0.25);
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: 
        radial-gradient(circle at 10% 10%, rgba(109, 94, 252, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(0, 242, 254, 0.06) 0%, transparent 40%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

a { color: inherit; text-decoration: none; transition: color 0.2s ease; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 0; border-bottom: 1px solid var(--border);
    background: rgba(7, 9, 19, 0.8); backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: sticky; top: 0; z-index: 50;
}

.brand { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.brand img { height: 40px; border-radius: 12px; box-shadow: var(--shadow); }
.brand span { 
    background: linear-gradient(135deg, var(--text) 30%, var(--primary-2)); 
    -webkit-background-clip: text; background-clip: text; color: transparent; 
}

.nav { display: flex; align-items: center; gap: 8px; }
.nav a, .nav .lang-btn { 
    padding: 10px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; 
    border: 1px solid transparent; color: var(--text-dim); transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav a:hover { background: var(--card); border-color: var(--border); color: var(--text); transform: translateY(-1px); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: 14px; border: 1px solid var(--border);
    background: var(--card); color: var(--text); font-weight: 700; font-size: 14px;
    cursor: pointer; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.btn:hover { transform: translateY(-2px); border-color: var(--border-hover); box-shadow: var(--glow); background: var(--card-hover); }
.btn:active { transform: translateY(0); }
.btn-primary { 
    background: linear-gradient(135deg, var(--primary), #5039fc); 
    border-color: rgba(255, 255, 255, 0.15); color: #fff; 
    box-shadow: 0 4px 20px rgba(109, 94, 252, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 25px rgba(109, 94, 252, 0.5); border-color: rgba(255, 255, 255, 0.3); }
.btn-danger { background: var(--danger); border-color: transparent; color: #fff; box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3); }
.btn-success { background: var(--success); border-color: transparent; color: #070913; font-weight: 800; box-shadow: 0 4px 15px rgba(46, 213, 115, 0.3); }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 10px; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: 12px; }

.card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; box-shadow: var(--shadow); transition: border-color 0.25s ease;
}
.card:hover { border-color: rgba(255, 255, 255, 0.15); }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } .nav { flex-wrap: wrap; } }

.product-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
}
.product-card:hover { border-color: var(--primary); transform: translateY(-6px); box-shadow: 0 16px 40px -10px rgba(109,94,252,0.3); }
.product-card img { width: 100%; height: 180px; object-fit: cover; border-bottom: 1px solid var(--border); transition: transform 0.5s ease; }
.product-card:hover img { transform: scale(1.03); }
.product-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.product-title { font-weight: 700; font-size: 17px; letter-spacing: -0.2px; }
.price-tag { font-weight: 800; color: var(--primary-2); font-size: 16px; }
.price-free { color: var(--success); font-weight: 800; font-size: 16px; }

.banner-slider {
    position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
    height: 360px; margin: 32px 0; box-shadow: var(--shadow);
}
.banner-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease; }
.banner-slide.active { opacity: 1; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-dots { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 5; }
.banner-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.3); cursor: pointer; transition: all 0.3s ease; }
.banner-dots span.active { background: #fff; width: 24px; border-radius: 6px; }
.banner-arrow { 
    position: absolute; top: 50%; transform: translateY(-50%); background: rgba(7, 9, 19, 0.6); 
    backdrop-filter: blur(8px); color: #fff; border: 1px solid var(--border); width: 44px; height: 44px; 
    border-radius: 50%; cursor: pointer; font-size: 18px; z-index: 5; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
}
.banner-arrow:hover { background: var(--primary); border-color: transparent; }
.banner-arrow.left { left: 16px; } .banner-arrow.right { right: 16px; }

.auth-wrap { max-width: 440px; margin: 80px auto; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.form-control {
    width: 100%; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--border);
    background: var(--bg-soft); color: var(--text); font-size: 15px; transition: all 0.25s ease;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(109, 94, 252, 0.15); background: var(--card); }

table { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
th, td { padding: 16px 18px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
tr:last-child td { border-bottom: none; }
th { background: var(--bg-soft); color: var(--text-dim); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; }
tr td { background: var(--card); transition: background 0.2s ease; }
tr:hover td { background: var(--card-hover); }

.badge { padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.badge-success { background: rgba(46, 213, 115, 0.12); color: var(--success); border: 1px solid rgba(46, 213, 115, 0.2); }
.badge-pending { background: rgba(255, 165, 2, 0.12); color: #ffa502; border: 1px solid rgba(255, 165, 2, 0.2); }
.badge-banned { background: rgba(255, 71, 87, 0.12); color: var(--danger); border: 1px solid rgba(255, 71, 87, 0.2); }
.badge-active { background: rgba(46, 213, 115, 0.12); color: var(--success); border: 1px solid rgba(46, 213, 115, 0.2); }

.footer { border-top: 1px solid var(--border); margin-top: 80px; padding: 40px 0; color: var(--text-dim); font-size: 14px; background: rgba(7, 9, 19, 0.5); }
.footer .contacts { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 14px; }

.gear-btn {
    width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border);
    background: var(--bg-soft); cursor: pointer; font-size: 16px; color: var(--text);
    display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s ease;
}
.gear-btn:hover { border-color: var(--primary); color: var(--primary-2); background: var(--card); transform: rotate(45deg); }

.modal-backdrop {
    position: fixed; inset: 0; background: rgba(7, 9, 19, 0.8); backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; z-index: 200;
    animation: fadeIn 0.2s ease;
}
.modal-backdrop.show { display: flex; }
.modal-box {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 28px; width: 400px; max-width: 92vw; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleUp { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.sidebar { width: 260px; background: var(--bg-soft); border-right: 1px solid var(--border); min-height: 100vh; padding: 24px 16px; position: fixed; }
.sidebar a { display: block; padding: 12px 16px; border-radius: 12px; margin-bottom: 6px; color: var(--text-dim); font-weight: 600; transition: all 0.2s ease; }
.sidebar a:hover, .sidebar a.active { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.admin-content { margin-left: 260px; padding: 40px; }
@media (max-width: 800px) { .sidebar { position: static; width: auto; min-height: auto; } .admin-content { margin-left: 0; padding: 20px; } }

.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat-card::after { content: ''; position: absolute; top: 0; right: 0; width: 80px; height: 80px; background: radial-gradient(circle, rgba(109,94,252,0.15) 0%, transparent 70%); pointer-events: none; }
.stat-card .num { font-size: 32px; font-weight: 800; letter-spacing: -1px; background: linear-gradient(135deg, #fff, var(--text-dim)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-card .label { color: var(--text-dim); font-size: 13px; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

.alert { padding: 16px 20px; border-radius: 14px; margin-bottom: 20px; font-size: 14px; display: flex; align-items: center; gap: 12px; }
.alert-error { background: rgba(255, 71, 87, 0.1); color: var(--danger); border: 1px solid rgba(255, 71, 87, 0.25); }
.alert-success { background: rgba(46, 213, 115, 0.1); color: var(--success); border: 1px solid rgba(46, 213, 115, 0.25); }

.upload-box { 
    border: 2px dashed var(--border); border-radius: var(--radius); padding: 40px 20px; 
    text-align: center; color: var(--text-dim); cursor: pointer; background: var(--bg-soft); 
    transition: all 0.25s ease; 
}
.upload-box:hover { border-color: var(--primary); color: var(--text); background: var(--card); box-shadow: var(--glow); }
