/* Achievements Page Styling - SKEUOMORPHIC */

.achievements-header {
    background: linear-gradient(145deg, #f0f2f5, #e8eaed, #ddd);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.25),
        0 5px 15px rgba(0, 0, 0, 0.12),
        inset 0 3px 6px rgba(255, 255, 255, 0.9),
        inset 0 -3px 6px rgba(0, 0, 0, 0.15),
        inset 1px 0 2px rgba(255, 255, 255, 0.7),
        inset -1px 0 2px rgba(0, 0, 0, 0.1);
    border: 3px solid #c0c4c8;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

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

.header-text h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.2rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

.achievements-stats {
    display: flex;
    gap: 20px;
}

.stat-card {
    text-align: center;
    padding: 20px 25px;
    background: linear-gradient(145deg, #4a90e2, #357abd, #2c5aa0);
    border-radius: 16px;
    box-shadow: 
        0 12px 25px rgba(59, 130, 246, 0.4),
        0 6px 12px rgba(0, 0, 0, 0.2),
        inset 0 3px 6px rgba(255, 255, 255, 0.3),
        inset 0 -3px 6px rgba(0, 0, 0, 0.2),
        inset 1px 0 2px rgba(255, 255, 255, 0.4),
        inset -1px 0 2px rgba(0, 0, 0, 0.15);
    border: 2px solid #2c5aa0;
    min-width: 100px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* Category Filters - SKEUOMORPHIC */
.category-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 12px 20px;
    border: 2px solid #b0b4b8;
    border-radius: 12px;
    background: linear-gradient(145deg, #e8eaed, #d8dadd);
    color: #374151;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.7),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.category-tab:hover {
    background: linear-gradient(145deg, #d8dadd, #c8cacd);
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.7),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.category-tab.active {
    background: linear-gradient(145deg, #4a90e2, #357abd);
    color: white;
    border-color: #2563eb;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

/* Sort Options */
.sort-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

#sort-select {
    padding: 8px 15px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    background: linear-gradient(145deg, #ffffff, #f9fafb);
    color: #374151;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.show-locked-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #6b7280;
}

.show-locked-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Achievements Grid */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Achievement Card - SKEUOMORPHIC */
.achievement-card {
    background: linear-gradient(145deg, #f0f2f5, #e8eaed);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.2),
        0 4px 8px 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.1);
    border: 2px solid #b0b4b8;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.6), rgba(255,255,255,0.2), rgba(255,255,255,0.6));
}

.achievement-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.25),
        0 6px 12px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.8),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

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

.achievement-card.unlocked {
    border-color: #fbbf24;
    background: linear-gradient(145deg, #fffbeb, #fef3c7);
}

.achievement-card.unlocked::before {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #10b981;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Rarity Border Colors */
.achievement-card[data-rarity="common"] {
    border-color: #9ca3af;
}

.achievement-card[data-rarity="rare"] {
    border-color: #3b82f6;
}

.achievement-card[data-rarity="rare"].unlocked {
    background: linear-gradient(145deg, #eff6ff, #dbeafe);
}

.achievement-card[data-rarity="epic"] {
    border-color: #a855f7;
}

.achievement-card[data-rarity="epic"].unlocked {
    background: linear-gradient(145deg, #faf5ff, #f3e8ff);
}

.achievement-card[data-rarity="legendary"] {
    border-color: #f59e0b;
}

.achievement-card[data-rarity="legendary"].unlocked {
    background: linear-gradient(145deg, #fffbeb, #fde68a);
    animation: legendary-pulse 3s infinite;
}

@keyframes legendary-pulse {
    0%, 100% { box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3); }
    50% { box-shadow: 0 8px 24px rgba(245, 158, 11, 0.6); }
}

/* Achievement Header */
.achievement-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.achievement-icon {
    font-size: 3rem;
    min-width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f3f4f6, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.achievement-card.unlocked .achievement-icon {
    background: linear-gradient(145deg, #fbbf24, #f59e0b);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #374151;
    margin: 0 0 5px 0;
}

.achievement-rarity {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.achievement-rarity.common {
    background: #e5e7eb;
    color: #6b7280;
}

.achievement-rarity.rare {
    background: #dbeafe;
    color: #2563eb;
}

.achievement-rarity.epic {
    background: #f3e8ff;
    color: #a855f7;
}

.achievement-rarity.legendary {
    background: #fde68a;
    color: #d97706;
}

/* Achievement Description */
.achievement-description {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* Progress Bar */
.achievement-progress {
    margin-bottom: 10px;
}

.progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.achievement-card.unlocked .progress-fill {
    background: linear-gradient(90deg, #10b981, #059669);
}

.progress-text {
    font-size: 0.8rem;
    color: #6b7280;
    text-align: right;
}

/* Achievement Reward */
.achievement-reward {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.reward-aeros {
    font-size: 0.9rem;
    font-weight: 600;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 5px;
}

.reward-aeros::before {
    content: '💰';
    font-size: 1.2rem;
}

.unlocked-date {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Achievement Notification */
.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(145deg, #ffd700, #ffed4e);
    border: 3px solid #f59e0b;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 
        0 10px 25px rgba(245, 158, 11, 0.4),
        0 5px 15px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.8);
    z-index: 1000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 350px;
}

.achievement-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.achievement-notification.hide {
    transform: translateX(400px);
    opacity: 0;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.notification-text {
    flex: 1;
}

.notification-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.notification-achievement {
    font-size: 1rem;
    font-weight: 600;
    color: #b45309;
    margin-bottom: 3px;
}

.notification-reward {
    font-size: 0.9rem;
    color: #d97706;
    font-weight: 500;
}


/* Responsive Design */
@media (max-width: 1200px) {
    .achievements-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .achievements-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .achievements-stats {
        width: 100%;
        justify-content: space-between;
    }

    .stat-card {
        flex: 1;
        padding: 12px 15px;
        min-width: auto;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .category-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }

    .category-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .sort-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    #sort-select {
        width: 100%;
    }
}

