/**
 * NextBall - Inventory Styles
 */

/* Inventory Modal */
.inventory-panel {
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.inventory-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.inventory-tabs .tab-btn {
    flex: 1;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.inventory-tabs .tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.inventory-tabs .tab-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

#inventory-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    min-height: 400px;
}

/* Empty State */
.inventory-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    text-align: center;
    color: var(--text-secondary);
}

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

.inventory-empty h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
}

.inventory-empty p {
    margin-bottom: 16px;
}

/* Banner Grid (same as shop) */
.banner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* Titles Container */
.titles-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Title Tier */
.title-tier {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.tier-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

.tier-icon {
    font-size: 1.2rem;
}

.tier-name {
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Title Grid */
.title-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    padding: 12px;
}

/* Title Card */
.title-card {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    transition: all 0.2s;
}

.title-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.title-card.locked {
    opacity: 0.7;
}

.title-card.equipped {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.title-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-icon {
    font-size: 1.5rem;
    min-width: 32px;
    text-align: center;
}

.title-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.title-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.title-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Title Progress */
.title-progress {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: right;
}

/* Title Actions */
.title-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.title-actions .btn-equip,
.title-actions .btn-equipped {
    padding: 6px 14px;
    font-size: 0.75rem;
}

.title-actions .btn-equip {
    background: linear-gradient(135deg, var(--accent), #818cf8);
    border: none;
    color: white;
}

.title-actions .btn-equip:hover {
    transform: scale(1.05);
}

.title-actions .btn-equipped {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #22c55e;
    cursor: default;
}

/* Notifications */
.inventory-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    background: #1a1a24;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s;
}

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

.inventory-notification.notification-success {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.1);
}

.inventory-notification.notification-error {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.1);
}

/* Player Title Display in Lobby */
.player-item .player-title {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 600px) {
    .title-grid {
        grid-template-columns: 1fr;
    }

    .banner-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}
