/* komet2 - komet.space fonts (Jost, Roboto Mono) */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono&display=swap');

/* komet2 - Ozon Style Design */
:root {
    --ozon-blue: #005BFF;
    --ozon-blue-dark: #0047CC;
    --ozon-blue-light: #E6F0FF;
    --white: #FFFFFF;
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-400: #BDBDBD;
    --gray-500: #9E9E9E;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;
    --text-primary: #212121;
    --text-secondary: #616161;
    --border-color: #E0E0E0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --radius-lg: 12px;
}

/* Bootstrap Icons Font */
@font-face {
    font-family: 'bootstrap-icons';
    src: url('../fonts/bootstrap-icons.woff2') format('woff2'),
         url('../fonts/bootstrap-icons.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

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

body {
    font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text-primary);
    line-height: 1.5;
    background-color: var(--white);
}

code, pre, .mono {
    font-family: 'Roboto Mono', monospace;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    width: 100%;
    padding: 0 16px;
    margin: 0 auto;
}

/* Header — как на login: серый фон #f5f5f5 и тень Bootstrap shadow-lg */
.header {
    background: #f5f5f5;
    border-bottom: 1px solid #f5f5f5;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.header.landing {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 16px;
}

.header-wrapper .logo {
    margin-right: auto;
}

.header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.logo {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-primary);
}

.logo a {
    color: var(--text-primary);
    text-decoration: none;
}

.logo-text {
    color: var(--text-primary);
}

.main-nav ul {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.nav-link i {
    font-size: 16px;
}

.nav-link:hover {
    background: var(--gray-50);
    color: var(--ozon-blue);
}

.nav-link:hover i {
    color: var(--ozon-blue);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-icon {
    position: relative;
    color: var(--text-primary);
    font-size: 20px;
    padding: 8px;
}

.cart-counter {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--ozon-blue);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-primary);
    transition: all 0.2s;
    padding: 0;
}

.user-btn:hover {
    background: var(--gray-200);
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    min-width: 180px;
    display: none;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s;
    pointer-events: none;
}

.user-dropdown:hover .dropdown-content,
.user-dropdown.active .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-content a {
    display: block;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
    text-decoration: none;
}

.dropdown-content a:hover {
    background: var(--gray-50);
    color: var(--ozon-blue);
}

.auth-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.login-btn, .signup-btn {
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.login-btn {
    border: 1px solid var(--ozon-blue);
    color: white;
    background: var(--ozon-blue);
    padding: 10px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.login-btn:hover {
    background: var(--ozon-blue-dark);
    color: white;
}


.signup-btn {
    background: var(--ozon-blue);
    color: var(--white);
}

.signup-btn:hover {
    background: var(--ozon-blue-dark);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--ozon-blue);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--ozon-blue-dark);
}

.btn-outline {
    background: var(--white);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--ozon-blue);
    color: var(--ozon-blue);
}

.btn-block {
    width: 100%;
}

/* DLC Cards */
.dlcs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.dlc-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    cursor: pointer;
}

.dlc-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.dlc-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--gray-100);
    position: relative;
}

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

.dlc-info {
    padding: 16px;
}

.dlc-platform {
    font-size: 12px;
    font-weight: 600;
    color: var(--ozon-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.dlc-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dlc-game {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.dlc-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.dlc-actions {
    display: flex;
    gap: 8px;
}

.btn-cart {
    flex: 1;
    background: var(--ozon-blue);
    color: var(--white);
    border: none;
    padding: 10px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cart:hover {
    background: var(--ozon-blue-dark);
}

/* Footer */
.footer {
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer .logo-text {
    color: var(--ozon-blue);
}

.footer p {
    color: var(--ozon-blue);
}

.footer-column h4 {
    color: var(--ozon-blue);
}

.footer-column ul li a {
    color: var(--ozon-blue);
}

.footer-column ul li a:hover {
    color: var(--ozon-blue-dark);
}

.footer-bottom {
    color: var(--ozon-blue);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-logo {
    margin-bottom: 16px;
}

.footer-logo .logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--ozon-blue);
    margin-bottom: 8px;
    display: block;
}

.footer-logo p {
    font-size: 13px;
    color: var(--text-secondary);
}

.footer-column h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column ul li a {
    font-size: 13px;
    color: var(--text-secondary);
}

.footer-column ul li a:hover {
    color: var(--ozon-blue);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-secondary);
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.flash-message {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px 16px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.flash-message.success {
    border-left: 4px solid #4CAF50;
}

.flash-message.error {
    border-left: 4px solid #F44336;
}

.flash-message.info {
    border-left: 4px solid var(--ozon-blue);
}

.close-flash {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    order: -1;
}

.desktop-only {
    display: block;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85%;
    height: 100vh;
    background: var(--white);
    z-index: 2000;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-nav-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-list li a {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
}

.mobile-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 12px;
}

.mobile-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.2s;
    text-decoration: none;
}

.mobile-sidebar-item.active {
    background: var(--gray-100);
    color: var(--text-primary);
}

/* Auth Forms */
.auth-section {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}

.auth-container {
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-of-type {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 15px;
    color: var(--text-primary);
    background: var(--white);
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--ozon-blue);
    box-shadow: 0 0 0 3px var(--ozon-blue-light);
}

.form-group .h-captcha {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

.form-group .h-captcha iframe {
    border-radius: var(--radius);
}

.form-actions {
    margin-top: 24px;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-links a {
    color: var(--ozon-blue);
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

.flash-messages-local {
    margin-bottom: 20px;
}

.flash-messages-local .flash-message {
    position: relative;
    animation: none;
}

/* Profile */
.profile-section {
    padding: 24px 0;
    background: var(--gray-50);
    min-height: calc(100vh - 200px);
}

.profile-header {
    margin-bottom: 24px;
}

.profile-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--white);
    padding: 4px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--ozon-blue);
    color: var(--white);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Admin Panel */
.admin-section {
    padding: 24px 0;
    background: var(--gray-50);
    min-height: calc(100vh - 200px);
}

.admin-header {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.admin-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.admin-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.admin-tabs {
    display: flex;
    gap: 8px;
    background: var(--white);
    padding: 4px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.admin-tabs .tab-btn {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.admin-tabs .tab-btn.active {
    background: var(--ozon-blue);
    color: var(--white);
}

.admin-tabs .tab-btn:hover:not(.active) {
    background: var(--gray-50);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.admin-actions {
    margin-bottom: 20px;
}

.admin-table {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: var(--gray-50);
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-primary);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover {
    background: var(--gray-50);
}

.badge {
    padding: 4px 10px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.badge.verified {
    background: var(--ozon-blue-light);
    color: var(--ozon-blue-dark);
}

.badge.pending {
    background: #fff3cd;
    color: #856404;
}

.badge.rejected {
    background: #f8d7da;
    color: #721c24;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-success {
    background: #4CAF50;
    color: var(--white);
}

.btn-success:hover {
    background: #45a049;
}

.btn-danger {
    background: #F44336;
    color: var(--white);
}

.btn-danger:hover {
    background: #da190b;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 20px;
    top: 100px;
    width: 220px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 0;
    z-index: 100;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 140px);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 12px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.2s;
    text-decoration: none;
}

.sidebar-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    color: white;
}

.sidebar-icon.blue {
    background: #005BFF;
}

.sidebar-icon.orange {
    background: #FF9800;
}

.sidebar-icon.purple {
    background: #9C27B0;
}

.sidebar-icon.red {
    background: #F44336;
}

.sidebar-icon.green {
    background: #4CAF50;
}

.sidebar-icon.teal {
    background: #009688;
}

.sidebar-item:hover {
    background: var(--gray-50);
}

.sidebar-item.active {
    background: var(--gray-100);
    color: var(--text-primary);
}

.sidebar-item.active .sidebar-icon {
    opacity: 0.9;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 10px 12px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border-color);
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    color: var(--text-secondary);
    font-size: 11px;
    text-decoration: none;
    transition: all 0.2s;
    flex: 1;
    max-width: 80px;
    position: relative;
}

.bottom-nav-item i {
    font-size: 24px;
    margin-bottom: 2px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.bottom-nav-item span {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.bottom-nav-item:hover {
    color: var(--text-secondary);
}

.bottom-nav-item.active {
    color: var(--ozon-blue);
}

.bottom-nav-item.active i {
    color: var(--ozon-blue);
}

.bottom-nav-item.active span {
    color: var(--ozon-blue);
    font-weight: 500;
}

/* Main Content with Sidebar — фон белый как область контента на login */
.main-content {
    margin-left: 0;
    transition: margin-left 0.3s;
    min-height: calc(100vh - 60px);
    background: #ffffff;
}

.main-content.with-sidebar {
    margin-left: 0;
    padding-left: 260px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav.desktop-only {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .sidebar {
        display: none !important;
    }
    
    .bottom-nav {
        display: flex !important;
    }
    
    .main-content.with-sidebar {
        margin-left: 0;
        padding-left: 0;
        padding-bottom: 80px;
    }
    
    .dlcs-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .container {
        padding: 0 12px;
    }
    
    .auth-container {
        padding: 24px;
    }
    
    .cart-section > .container > div:first-child {
        grid-template-columns: 1fr !important;
    }
    
    .checkout-section > .container > div:first-child {
        grid-template-columns: 1fr !important;
    }
    
    .admin-table {
        overflow-x: auto;
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
    }
    
    .bottom-nav {
        display: none !important;
    }
    
    .main-content.with-sidebar {
        padding-bottom: 0;
    }
}
