/* INVENTORY PAGE - SKEUOMORPHIC DESIGN */

/* Fix for overlapping elements */
.main-content {
    position: relative;
    z-index: 1;
    overflow: visible;
    padding-top: 10px;
}

/* Ensure container has proper spacing */
.container {
    position: relative;
    z-index: 1;
}

/* Fix any potential layout issues */
.layout-wrapper {
    position: relative;
    z-index: 1;
}

/* Ensure proper spacing for all elements */
.inventory-title,
.inventory-stats,
.inventory-tabs,
.inventory-content {
    position: relative;
    z-index: 1;
}

/* Inventory icon styling */
.inventory-icon {
    display: inline-block;
    margin-right: 10px;
    font-size: 2rem;
    vertical-align: middle;
    line-height: 1;
}

/* Page Title - Skeuomorphic */
.inventory-title {
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    color: #333333;
    padding: 20px 30px;
    border-radius: 15px;
    margin: 0 0 30px 0;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.15),
        inset 0 2px 4px rgba(255,255,255,0.9),
        inset 0 -2px 4px rgba(0,0,0,0.1);
    border: 2px solid #d4d4d4;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
    position: relative;
    overflow: visible;
    z-index: 1;
}

.inventory-title::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4), rgba(255,255,255,0.8));
    border-radius: 15px 15px 0 0;
}

/* Inventory Stats */
.inventory-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.stat-card {
    background: linear-gradient(145deg, #f9fafb, #f3f4f6);
    border: 2px solid #d4d4d4;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 
        0 6px 12px rgba(0,0,0,0.12),
        inset 0 2px 4px rgba(255,255,255,0.8),
        inset 0 -2px 4px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
    position: relative;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.15),
        inset 0 2px 4px rgba(255,255,255,0.9),
        inset 0 -2px 4px rgba(0,0,0,0.1);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(255,255,255,0.5), rgba(255,255,255,0.9));
    border-radius: 12px 12px 0 0;
}

.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    border: 2px solid #d4d4d4;
    border-radius: 12px;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.1),
        inset 0 2px 4px rgba(255,255,255,0.8),
        inset 0 -2px 4px rgba(0,0,0,0.1);
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.stat-label {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

/* Inventory Tabs */
.inventory-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.inventory-tab {
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    border: 2px solid #d4d4d4;
    border-radius: 8px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    color: #333333;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.2),
        inset 0 2px 4px rgba(255,255,255,0.8),
        inset 0 -2px 4px rgba(0,0,0,0.1);
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.inventory-tab::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4), rgba(255,255,255,0.8));
    border-radius: 8px 8px 0 0;
}

.inventory-tab:hover {
    background: linear-gradient(145deg, #f0f0f0, #d9d9d9);
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.3),
        inset 0 2px 4px rgba(255,255,255,0.9),
        inset 0 -2px 4px rgba(0,0,0,0.1);
    transform: translateY(1px);
}

.inventory-tab:active {
    background: linear-gradient(145deg, #d9d9d9, #f0f0f0);
    box-shadow: 
        inset 0 2px 4px rgba(0,0,0,0.2),
        inset 0 -2px 4px rgba(255,255,255,0.8);
    transform: translateY(2px);
}

.inventory-tab.active {
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    color: #333333;
    border-color: #888888;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.2),
        inset 0 2px 4px rgba(255,255,255,0.8),
        inset 0 -2px 4px rgba(0,0,0,0.1);
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

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

.tab-text {
    font-size: 1rem;
}

/* Content Areas - Skeuomorphic */
.inventory-content {
    background: linear-gradient(145deg, #f9fafb, #f3f4f6);
    border: 2px solid #d4d4d4;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 
        0 6px 12px rgba(0,0,0,0.12),
        inset 0 2px 4px rgba(255,255,255,0.8),
        inset 0 -2px 4px rgba(0,0,0,0.08);
    position: relative;
    margin-top: 20px;
    z-index: 1;
}

.inventory-content::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(255,255,255,0.5), rgba(255,255,255,0.9));
    border-radius: 16px 16px 0 0;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.content-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #374151;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.content-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    color: #333333;
    border: 2px solid #d4d4d4;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.2),
        inset 0 2px 4px rgba(255,255,255,0.8),
        inset 0 -2px 4px rgba(0,0,0,0.1);
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.action-btn:hover {
    background: linear-gradient(145deg, #f0f0f0, #d9d9d9);
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.3),
        inset 0 2px 4px rgba(255,255,255,0.9),
        inset 0 -2px 4px rgba(0,0,0,0.1);
    transform: translateY(1px);
}

.action-btn:active {
    background: linear-gradient(145deg, #d9d9d9, #f0f0f0);
    box-shadow: 
        inset 0 2px 4px rgba(0,0,0,0.2),
        inset 0 -2px 4px rgba(255,255,255,0.8);
    transform: translateY(2px);
}

/* Grids */
.stickers-grid,
.projects-grid,
.themes-grid,
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Sticker Cards - Skeuomorphic */
.sticker-card {
    background: linear-gradient(145deg, #f9fafb, #f3f4f6);
    border: 2px solid #d4d4d4;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 
        0 6px 12px rgba(0,0,0,0.12),
        inset 0 2px 4px rgba(255,255,255,0.8),
        inset 0 -2px 4px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.sticker-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.15),
        inset 0 2px 4px rgba(255,255,255,0.9),
        inset 0 -2px 4px rgba(0,0,0,0.1);
    border-color: #888888;
}

.sticker-card::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(255,255,255,0.5), rgba(255,255,255,0.9));
    border-radius: 12px 12px 0 0;
}

.sticker-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.sticker-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.sticker-quantity {
    font-size: 0.9rem;
    color: #6b7280;
    background: linear-gradient(145deg, #e9ecef, #dee2e6);
    border: 1px solid #d1d5db;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.1),
        inset 0 1px 2px rgba(255,255,255,0.8);
}

/* Project Cards - Skeuomorphic */
.project-card {
    background: linear-gradient(145deg, #f9fafb, #f3f4f6);
    border: 2px solid #d4d4d4;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
    box-shadow: 
        0 6px 12px rgba(0,0,0,0.12),
        inset 0 2px 4px rgba(255,255,255,0.8),
        inset 0 -2px 4px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.15),
        inset 0 2px 4px rgba(255,255,255,0.9),
        inset 0 -2px 4px rgba(0,0,0,0.1);
}

.project-thumbnail {
    width: 100%;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-thumbnail img {
    transform: scale(1.05);
}

.project-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.project-category {
    font-size: 0.9rem;
    color: #6b7280;
    background: linear-gradient(145deg, #e9ecef, #dee2e6);
    border: 1px solid #d1d5db;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.1),
        inset 0 1px 2px rgba(255,255,255,0.8);
}

/* Theme Cards - Skeuomorphic */
.theme-card {
    background: linear-gradient(145deg, #f9fafb, #f3f4f6);
    border: 2px solid #d4d4d4;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 
        0 6px 12px rgba(0,0,0,0.12),
        inset 0 2px 4px rgba(255,255,255,0.8),
        inset 0 -2px 4px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.theme-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.15),
        inset 0 2px 4px rgba(255,255,255,0.9),
        inset 0 -2px 4px rgba(0,0,0,0.1);
}

.theme-preview {
    width: 100%;
    height: 100px;
    border-radius: 10px;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.theme-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.theme-status {
    font-size: 0.9rem;
    color: #6b7280;
    background: linear-gradient(145deg, #e9ecef, #dee2e6);
    border: 1px solid #d1d5db;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.1),
        inset 0 1px 2px rgba(255,255,255,0.8);
}

/* Achievement Cards - Skeuomorphic */
.achievement-card {
    background: linear-gradient(145deg, #f9fafb, #f3f4f6);
    border: 2px solid #d4d4d4;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 
        0 6px 12px rgba(0,0,0,0.12),
        inset 0 2px 4px rgba(255,255,255,0.8),
        inset 0 -2px 4px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.achievement-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.15),
        inset 0 2px 4px rgba(255,255,255,0.9),
        inset 0 -2px 4px rgba(0,0,0,0.1);
}

.achievement-card.unlocked {
    border-color: #10b981;
    background: linear-gradient(145deg, #d1fae5, #a7f3d0);
}

.achievement-card.locked {
    opacity: 0.6;
    filter: grayscale(50%);
}

.achievement-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.achievement-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.achievement-progress {
    font-size: 0.9rem;
    color: #6b7280;
    background: linear-gradient(145deg, #e9ecef, #dee2e6);
    border: 1px solid #d1d5db;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.1),
        inset 0 1px 2px rgba(255,255,255,0.8);
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Loading States */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #6c5ce7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    color: #495057;
}

.empty-state p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .inventory-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .inventory-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .stickers-grid,
    .projects-grid,
    .themes-grid,
    .achievements-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .content-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
}