﻿/* ============================================
   СТИЛИ ИНВЕНТАРЯ И ПРОФИЛЯ
   ============================================ */

/* Контейнер профиля */
#inventory-section .profile-container {
    width: 100%;
    padding: 10px 0;
}

/* Шапка профиля */
#inventory-section .profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 15px;
    background: linear-gradient(145deg, var(--color-bg-tertiary), var(--color-bg-primary));
    border-radius: var(--border-radius-card);
    border: 2px solid var(--color-border-default);
}

#inventory-section .profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--color-text-accent);
    box-shadow: var(--shadow-card);
    background: var(--color-bg-tertiary);
}

    #inventory-section .profile-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

#inventory-section .profile-info {
    flex: 1;
}

#inventory-section .profile-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--color-text-accent);
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#inventory-section .profile-bonus-level {
    font-size: 14px;
    color: var(--color-text-secondary);
}

    #inventory-section .profile-bonus-level span {
        color: var(--color-text-accent);
        font-weight: 700;
    }

/* Трейд ссылка */
#inventory-section .trade-link-section {
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--border-radius-card);
    border: 2px solid var(--color-border-default);
}

    #inventory-section .trade-link-section label {
        display: block;
        font-size: 14px;
        color: var(--color-text-secondary);
        margin-bottom: 8px;
    }

#inventory-section .trade-link-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--color-border-default);
    border-radius: var(--border-radius-button);
    background: var(--color-bg-input);
    color: var(--color-text-primary);
    font-size: 14px;
    transition: var(--transition-default);
    margin-bottom: 10px;
}

    #inventory-section .trade-link-input:focus {
        outline: none;
        border-color: var(--color-border-hover);
        box-shadow: var(--shadow-card);
    }

    #inventory-section .trade-link-input::placeholder {
        color: var(--color-text-placeholder);
    }

#inventory-section .trade-link-buttons {
    display: flex;
    gap: 10px;
}

#inventory-section .trade-link-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: var(--border-radius-button);
    background: var(--color-bg-tertiary);
    border: 2px solid var(--color-border-default);
    color: var(--color-text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-default);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    #inventory-section .trade-link-btn:hover {
        border-color: var(--color-border-hover);
        transform: translateY(-2px);
        box-shadow: var(--shadow-card);
    }

    #inventory-section .trade-link-btn.save-btn:hover {
        box-shadow: var(--shadow-card-hover);
    }

#inventory-section .trade-link-status {
    margin-top: 10px;
    font-size: 12px;
    color: var(--color-text-accent);
    min-height: 20px;
}

.steam-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Статистика */
#inventory-section .stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

#inventory-section .stat-card {
    background: linear-gradient(145deg, var(--color-bg-tertiary), var(--color-bg-primary));
    border-radius: var(--border-radius-card);
    padding: 15px 5px;
    text-align: center;
    border: 2px solid var(--color-border-default);
    transition: var(--transition-default);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

    #inventory-section .stat-card:hover {
        transform: translateY(-2px);
        border-color: var(--color-border-hover);
        box-shadow: var(--shadow-card);
    }

#inventory-section .stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--color-text-accent);
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#inventory-section .stat-label {
    font-size: 11px;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Лучший дроп - центрирование */
.best-drop-card {
    padding: 15px 5px;
    background: linear-gradient(145deg, #1a1a2a, #0f0f1a);
    border-color: var(--color-border-accent);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.best-drop-preview {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-card);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-card);
    border: 2px solid;
    transition: var(--transition-default);
    margin: 8px auto;
}

    .best-drop-preview:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-card-hover);
    }

.best-drop-image {
    width: 60px;
    height: 60px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.best-drop-info {
    text-align: center;
    width: 100%;
    padding: 0 5px;
}

    .best-drop-info h3,
    #best-drop-name,
    .best-drop-name {
        white-space: pre-line;
        text-align: center;
        line-height: 1.4;
        word-break: break-word;
        margin: 10px auto;
        font-size: 14px;
        max-width: 90%;
    }

/* Заголовок инвентаря */
#inventory-section .inventory-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

#inventory-section .inventory-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-text-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#inventory-section .sell-all-profile-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: var(--color-border-default);
    color: var(--color-text-disabled);
    transform: none;
    box-shadow: none;
}

#inventory-section .sell-all-profile-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

#inventory-section .inventory-separator {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-text-accent), transparent);
    margin: 20px 0;
}

/* Сетка дропов */
.drops-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
    padding: 5px;
}

/* Карточка предмета в инвентаре */
.drop-card {
    background: var(--color-bg-tertiary);
    border: 2px solid var(--color-border-default);
    border-radius: var(--border-radius-card);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-default);
    min-height: 160px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

    .drop-card:hover {
        border-color: var(--color-border-hover);
        transform: translateY(-2px);
        box-shadow: var(--shadow-card);
    }

.drop-card-image {
    width: 80px;
    height: 80px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.drop-card-name {
    white-space: pre-line;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
    padding: 8px 5px;
    font-size: 0.9rem;
}

.drop-card-value {
    font-size: 12px;
    color: var(--color-text-price);
    font-weight: bold;
    flex-shrink: 0;
    margin-top: auto;
}

/* Бейджи статуса */
.status-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    color: var(--color-text-primary);
    padding: 4px 6px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    min-width: 24px;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid;
}

.status-sold {
    background: linear-gradient(145deg, #4caf50, #2e7d32);
    border-color: #81c784;
}

.status-upgraded {
    background: linear-gradient(145deg, #ff9800, #f57c00);
    border-color: #ffb74d;
}

.status-withdrawn {
    background: linear-gradient(145deg, #2196f3, #1976d2);
    border-color: #64b5f6;
}

.drop-card[data-status="sold"],
.drop-card[data-status="upgraded"],
.drop-card[data-status="withdrawn"] {
    opacity: 0.5;
    filter: grayscale(0.8);
    pointer-events: none;
}

/* Steam авторизация */
#inventory-section .steam-auth-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--border-radius-button);
    background: linear-gradient(145deg, #1b2838, #0f1a24);
    color: var(--color-text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-default);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 2px solid #66c0f4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-top: 10px;
}

    #inventory-section .steam-auth-btn:hover {
        background: linear-gradient(145deg, #2a3f54, #1b2a38);
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(102, 192, 244, 0.3);
    }

#inventory-section .steam-icon {
    margin-right: 8px;
}

/* ============================================
   МОДАЛЬНОЕ ОКНО ДЕТАЛЕЙ ПРЕДМЕТА
   ============================================ */
.item-detail-content {
    position: relative;
    max-width: 90%;
    width: 340px;
    padding: 25px 20px 20px;
}

.item-detail-header {
    text-align: center;
    width: 100%;
    padding: 5px 40px 15px 40px;
    margin: 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
}

    .item-detail-header h2 {
        white-space: pre-line;
        line-height: 1.4;
        word-break: break-word;
        text-align: center;
        font-size: 1.2rem;
        margin: 0;
        width: 100%;
        display: block;
        font-weight: 600;
    }

/* Кнопка закрытия */
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #b8a9c9;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1001;
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1;
    pointer-events: auto;
}

    .modal-close-btn:hover {
        color: var(--color-text-accent);
        transform: scale(1.1);
    }

.item-detail-image-container {
    width: 160px;
    height: 160px;
    margin: 0 auto 20px;
    border-radius: var(--border-radius-card);
    background: var(--color-bg-tertiary);
    border: 3px solid var(--color-border-default);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.item-detail-image {
    width: 140px;
    height: 140px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.item-detail-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--color-text-accent);
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* МОДАЛЬНОЕ ОКНО ДЕТАЛЕЙ ПРЕДМЕТА - КНОПКИ */
.item-detail-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    width: 100%;
}

.item-detail-btn {
    flex: 0 1 auto;
    min-width: 90px;
    padding: 12px 4px;
    border: none;
    border-radius: var(--border-radius-button);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-default);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--color-bg-tertiary);
    border: 2px solid var(--color-border-default);
    color: var(--color-text-primary);
    text-align: center;
    white-space: nowrap;
}

    .item-detail-btn:hover {
        border-color: var(--color-border-hover);
        transform: translateY(-2px);
        box-shadow: var(--shadow-card);
    }

    .item-detail-btn.sell-btn:hover {
        border-color: #4caf50;
        box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
    }

    .item-detail-btn.upgrade-btn:hover {
        border-color: #ff9800;
        box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
    }

    .item-detail-btn.withdraw-btn:hover {
        border-color: #2196f3;
        box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
    }

/* Статус вывода */
#withdraw-status-message {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
}

    #withdraw-status-message p {
        margin-bottom: 15px;
        font-size: 16px;
        color: var(--color-text-secondary);
        line-height: 1.4;
    }

#withdraw-timer {
    font-size: 32px;
    font-weight: bold;
    color: var(--color-text-accent);
    margin: 15px 0;
    font-family: 'Space Grotesk', monospace;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Кнопка принятия трейда */
.accept-trade-btn {
    background: var(--gradient-button-pink);
    border: none;
    color: white;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 280px;
    letter-spacing: 1px;
    border: 1px solid rgba(255,255,255,0.2);
}

    .accept-trade-btn:hover {
        background: linear-gradient(45deg, #45a049, #4CAF50);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    }

    .accept-trade-btn:active {
        transform: translateY(0);
        box-shadow: 0 2px 10px rgba(76, 175, 80, 0.3);
    }

/* ============================================
   МОДАЛЬНОЕ ОКНО ДЕТАЛЕЙ ЛУЧШЕГО ДРОПА
   ============================================ */
.drop-detail-content {
    position: relative;
    max-width: 90%;
    width: 340px;
    padding: 25px 20px 20px;
}

.drop-detail-header {
    margin-bottom: 20px;
    text-align: center;
    padding: 5px 40px 15px 40px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
}

    .drop-detail-header h2 {
        font-size: 20px;
        font-weight: 800;
        color: var(--color-text-accent);
        text-transform: uppercase;
        letter-spacing: 1px;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        word-break: break-word;
        line-height: 1.3;
        margin: 0;
        width: 100%;
        text-align: center;
    }

.drop-detail-image-container {
    width: 160px;
    height: 160px;
    margin: 0 auto 20px;
    border-radius: var(--border-radius-card);
    background: var(--color-bg-tertiary);
    border: 3px solid var(--color-border-default);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.drop-detail-image {
    width: 140px;
    height: 140px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.drop-detail-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--color-text-accent);
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.drop-detail-source-label {
    font-size: 12px;
    color: var(--color-text-secondary);
    text-align: center;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.drop-detail-source {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    background: var(--color-bg-tertiary);
    border: 2px solid var(--color-border-default);
    border-radius: var(--border-radius-card);
    cursor: pointer;
    transition: var(--transition-default);
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

    .drop-detail-source:hover {
        border-color: var(--color-border-hover);
        transform: translateY(-2px);
        box-shadow: var(--shadow-card);
    }

.drop-source-image {
    width: 50px;
    height: 50px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    background-color: var(--color-bg-tertiary);
    flex-shrink: 0;
}

.drop-source-name {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-accent);
    text-align: left;
    word-break: break-word;
}

/* Кнопка "Показать ещё" */
.load-more-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.load-more-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-button);
    background: var(--color-bg-tertiary);
    border: 2px solid var(--color-border-default);
    color: var(--color-text-accent);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-default);
    text-transform: uppercase;
    letter-spacing: 1px;
}

    .load-more-btn:hover {
        border-color: var(--color-border-hover);
        transform: translateY(-2px);
        box-shadow: var(--shadow-card);
    }

    .load-more-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }
