/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #252525;
    --bg-card: #1f1f1f;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-primary: #00d4ff;
    --accent-secondary: #ff4444;
    --accent-green: #44ff44;
    --border-color: #333333;
    --hover-color: #2a2a2a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Хедер */
.header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-primary);
    text-decoration: none;
    text-transform: uppercase;
}

.main-menu {
    display: flex;
    gap: 30px;
}

.menu-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
    position: relative;
}

.menu-item:hover {
    color: var(--text-primary);
}

.menu-item::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--accent-primary);
    transition: width 0.3s;
}

.menu-item:hover::after {
    width: 100%;
}

/* Пользовательская секция */
.user-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.balance {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--bg-tertiary);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 16px;
}

.balance i {
    color: var(--accent-primary);
}

.btn-deposit {
    background-color: var(--accent-green);
    color: var(--bg-primary);
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-deposit:hover {
    transform: scale(1.1);
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
}

.username {
    font-size: 16px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 200px;
    display: none;
    margin-top: 10px;
}

.user-menu:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
}

.dropdown-menu a:hover {
    background-color: var(--hover-color);
    color: var(--text-primary);
}

.btn-login {
    background-color: #171a21;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: #1b2838;
}

/* Промо баннер */
.promo-banner {
    background: linear-gradient(90deg, #ff4444 0%, #ff6666 100%);
    padding: 15px 0;
}

.promo-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    font-size: 18px;
    font-weight: bold;
}

.promo-code {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 5px 15px;
    border-radius: 5px;
}

/* Live выпадения */
.live-drops {
    background-color: var(--bg-secondary);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.live-drops h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 20px;
    color: var(--accent-primary);
}

.drops-slider {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: none;
}

.drops-slider::-webkit-scrollbar {
    display: none;
}

.drop-item {
    min-width: 120px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    position: relative;
    transition: transform 0.3s;
}

.drop-item:hover {
    transform: translateY(-5px);
}

.drop-item img {
    width: 80px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 5px;
}

.drop-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.drop-user {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drop-price {
    font-size: 14px;
    font-weight: bold;
}

/* Основной контент */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 300px);
}

/* Фильтры */
.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-categories {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}

.filter-search {
    position: relative;
    width: 300px;
}

.filter-search input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-primary);
    font-size: 14px;
}

.filter-search input::placeholder {
    color: var(--text-secondary);
}

.filter-search i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* Сетка кейсов */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.case-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.case-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

.case-badge.new {
    background-color: var(--accent-green);
    color: var(--bg-primary);
}

.case-badge.limited {
    background-color: var(--accent-secondary);
    color: white;
}

.case-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.case-image {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    position: relative;
    overflow: hidden;
}

.case-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s;
}

.case-card:hover .case-image img {
    transform: scale(1.1) rotate(5deg);
}

.back-image {
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s;
}

.case-card:hover .back-image {
    opacity: 0.3;
}

.case-info {
    padding: 15px;
    text-align: center;
}

.case-name {
    font-size: 16px;
    margin-bottom: 5px;
}

.case-items {
    font-size: 12px;
    color: var(--text-secondary);
}

.case-price {
    padding: 0 15px 15px;
    text-align: center;
}

.old-price {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: line-through;
    margin-right: 10px;
}

.current-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--accent-primary);
}

.case-actions {
    display: flex;
    gap: 5px;
    padding: 10px;
    background-color: var(--bg-secondary);
}

.btn-open-case {
    flex: 1;
    background-color: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-open-case:hover {
    background-color: #00a8cc;
}

.btn-favorite {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-favorite:hover,
.btn-favorite.active {
    background-color: var(--accent-secondary);
    color: white;
    border-color: var(--accent-secondary);
}

/* Футер */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-payments {
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-payments img {
    height: 30px;
    filter: grayscale(100%);
    transition: filter 0.3s;
}

.footer-payments img:hover {
    filter: grayscale(0%);
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 20px;
}

.modal-body h3 {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-weight: normal;
}

.login-terms {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.login-terms label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.login-terms input[type="checkbox"] {
    margin-top: 2px;
}

.login-terms a {
    color: var(--accent-primary);
    text-decoration: none;
}

.login-terms a:hover {
    text-decoration: underline;
}

.btn-steam-login {
    width: 100%;
    background-color: #171a21;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.3s;
}

.btn-steam-login:hover:not(:disabled) {
    background-color: #1b2838;
}

.btn-steam-login:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .cases-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .main-menu {
        order: 3;
        width: 100%;
        justify-content: center;
        overflow-x: auto;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-search {
        width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-payments {
        justify-content: center;
    }
}