/* Achievements Page - NEW SKEUOMORPHIC DESIGN */

/* Main Container - Card-based Layout */
.achievements-header {
    background: linear-gradient(145deg, #e8e9eb, #d1d3d6);
    border-radius: 28px;
    padding: 35px 40px;
    margin-bottom: 30px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.2),
        inset 0 4px 8px rgba(255, 255, 255, 0.9),
        inset 0 -4px 8px rgba(0, 0, 0, 0.2),
        inset 2px 0 4px rgba(255, 255, 255, 0.7),
        inset -2px 0 4px rgba(0, 0, 0, 0.15);
    border: 4px solid #b8bcc0;
    position: relative;
    display: block;
    z-index: 1;
}

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

.header-text {
    text-align: center;
    margin-bottom: 25px;
}

.header-text h1 {
    font-size: 3.2rem;
    font-weight: 900;
    color: #1a1d29;
    margin: 0 0 12px 0;
    text-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.15),
        0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.3rem;
    color: #4a5568;
    margin: 0;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}

.achievements-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 25px;
}

.stat-card {
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(145deg, #5a9de8, #4a8dd8, #3a7dc8);
    border-radius: 20px;
    box-shadow: 
        0 15px 30px rgba(59, 130, 246, 0.5),
        0 8px 16px rgba(0, 0, 0, 0.3),
        inset 0 4px 8px rgba(255, 255, 255, 0.35),
        inset 0 -4px 8px rgba(0, 0, 0, 0.25),
        inset 2px 0 4px rgba(255, 255, 255, 0.4),
        inset -2px 0 4px rgba(0, 0, 0, 0.2);
    border: 3px solid #2c6bb8;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,255,255,0.6), rgba(255,255,255,0.3));
    border-radius: 17px 17px 0 0;
}

.stat-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 18px 36px rgba(59, 130, 246, 0.6),
        0 10px 20px rgba(0, 0, 0, 0.35),
        inset 0 4px 8px rgba(255, 255, 255, 0.35),
        inset 0 -4px 8px rgba(0, 0, 0, 0.25);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
    display: block;
}

.stat-card:hover .stat-value {
    transform: scale(1.1);
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Category Filters - NEW DESIGN */
.category-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    position: relative;
    z-index: 0;
    padding: 8px;
    background: linear-gradient(145deg, #f0f1f3, #e0e2e5);
    border-radius: 20px;
    box-shadow: 
        inset 0 3px 6px rgba(0, 0, 0, 0.12),
        inset 0 -3px 6px rgba(255, 255, 255, 0.9),
        inset 2px 0 4px rgba(255, 255, 255, 0.7),
        inset -2px 0 4px rgba(0, 0, 0, 0.1);
    border: 3px solid #c8cacd;
}

.category-tab {
    padding: 14px 24px;
    border: 3px solid #a8abb0;
    border-radius: 14px;
    background: linear-gradient(145deg, #e8eaed, #d8dadd, #c8cacd);
    color: #2d3748;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 
        0 5px 10px rgba(0, 0, 0, 0.2),
        inset 0 3px 6px rgba(255, 255, 255, 0.8),
        inset 0 -3px 6px rgba(0, 0, 0, 0.15),
        inset 2px 0 4px rgba(255, 255, 255, 0.6),
        inset -2px 0 4px rgba(0, 0, 0, 0.1);
    position: relative;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

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

.category-tab:active {
    transform: translateY(2px);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 3px 6px rgba(0, 0, 0, 0.15),
        inset 0 -2px 4px rgba(255, 255, 255, 0.6);
}

.category-tab:hover {
    background: linear-gradient(145deg, #d8dadd, #c8cacd, #b8babc);
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 
        0 7px 14px rgba(0, 0, 0, 0.25),
        inset 0 3px 6px rgba(255, 255, 255, 0.8),
        inset 0 -3px 6px rgba(0, 0, 0, 0.15);
}

.category-tab.active {
    background: linear-gradient(145deg, #5a9de8, #4a8dd8, #3a7dc8);
    color: white;
    border-color: #2563eb;
    box-shadow: 
        0 5px 10px rgba(59, 130, 246, 0.4),
        inset 0 3px 6px rgba(255, 255, 255, 0.35),
        inset 0 -3px 6px rgba(0, 0, 0, 0.25);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.category-tab.active::before {
    background: linear-gradient(90deg, rgba(255,255,255,0.5), rgba(255,255,255,0.3));
}

/* Sort Options - NEW DESIGN */
.sort-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 18px 22px;
    background: linear-gradient(145deg, #f0f1f3, #e0e2e5);
    border-radius: 20px;
    box-shadow: 
        inset 0 3px 6px rgba(0, 0, 0, 0.1),
        inset 0 -3px 6px rgba(255, 255, 255, 0.9),
        inset 2px 0 4px rgba(255, 255, 255, 0.7),
        inset -2px 0 4px rgba(0, 0, 0, 0.1);
    border: 3px solid #c8cacd;
}

#sort-select {
    padding: 12px 20px;
    border: 3px solid #a8abb0;
    border-radius: 14px;
    background: linear-gradient(145deg, #ffffff, #f9fafb, #f0f1f3);
    color: #2d3748;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 
        0 3px 6px 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.08);
    transition: all 0.2s ease;
    font-family: 'Baloo 2', cursive;
    touch-action: manipulation;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

#sort-select:hover {
    border-color: #3b82f6;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.18),
        inset 0 2px 4px rgba(255, 255, 255, 0.9);
}

#sort-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.18),
        inset 0 2px 4px rgba(255, 255, 255, 0.9),
        0 0 0 4px rgba(59, 130, 246, 0.15);
}

.show-locked-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 700;
    color: #4a5568;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.show-locked-toggle input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: #3b82f6;
    border-radius: 6px;
}

/* Achievements Grid - NEW CARD DESIGN */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    position: relative;
    z-index: 0;
}

/* Achievement Card - ENHANCED SKEUOMORPHIC */
.achievement-card {
    background: linear-gradient(145deg, #f0f2f5, #e8eaed, #e0e2e5);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.25),
        0 6px 12px rgba(0, 0, 0, 0.15),
        inset 0 3px 6px rgba(255, 255, 255, 0.9),
        inset 0 -3px 6px rgba(0, 0, 0, 0.15),
        inset 2px 0 4px rgba(255, 255, 255, 0.7),
        inset -2px 0 4px rgba(0, 0, 0, 0.1);
    border: 4px solid #b0b4b8;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(255,255,255,0.7), rgba(255,255,255,0.3), rgba(255,255,255,0.7));
    border-radius: 20px 20px 0 0;
}

.achievement-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 16px 32px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.2),
        inset 0 3px 6px rgba(255, 255, 255, 0.9),
        inset 0 -3px 6px rgba(0, 0, 0, 0.15);
}

.achievement-card:active {
    transform: translateY(-2px) scale(1.01);
}

.achievement-card.locked {
    opacity: 0.7;
    filter: grayscale(35%);
    background: linear-gradient(145deg, #e0e2e5, #d0d2d5, #c0c2c5);
}

.achievement-card.locked::after {
    content: '🔒';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.6;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.achievement-card.unlocked {
    border-color: #fbbf24;
    background: linear-gradient(145deg, #fffbeb, #fef3c7, #fde68a);
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.25),
        0 6px 12px rgba(0, 0, 0, 0.15),
        inset 0 3px 6px rgba(255, 255, 255, 0.95),
        inset 0 -3px 6px rgba(0, 0, 0, 0.12),
        inset 0 0 25px rgba(251, 191, 36, 0.15);
}

.achievement-card.unlocked::after {
    content: '✓';
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(145deg, #10b981, #059669);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.4rem;
    box-shadow: 
        0 5px 10px rgba(16, 185, 129, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.25);
    border: 3px solid #059669;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

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

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

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

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

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

.achievement-card[data-rarity="legendary"].unlocked {
    background: linear-gradient(145deg, #fffbeb, #fde68a, #fcd34d);
    border-color: #d97706;
    animation: legendary-pulse 4s ease-in-out infinite;
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.25),
        0 6px 12px rgba(0, 0, 0, 0.15),
        inset 0 3px 6px rgba(255, 255, 255, 0.95),
        inset 0 -3px 6px rgba(0, 0, 0, 0.12),
        inset 0 0 35px rgba(245, 158, 11, 0.25);
}

.achievement-card[data-rarity="legendary"]::before {
    animation: legendary-shine 3s ease-in-out infinite;
}

@keyframes legendary-pulse {
    0%, 100% { 
        box-shadow: 
            0 12px 24px rgba(245, 158, 11, 0.35),
            0 6px 12px rgba(0, 0, 0, 0.15),
            inset 0 3px 6px rgba(255, 255, 255, 0.95),
            inset 0 -3px 6px rgba(0, 0, 0, 0.12),
            inset 0 0 35px rgba(245, 158, 11, 0.25);
    }
    50% { 
        box-shadow: 
            0 16px 32px rgba(245, 158, 11, 0.5),
            0 8px 16px rgba(0, 0, 0, 0.2),
            inset 0 3px 6px rgba(255, 255, 255, 0.95),
            inset 0 -3px 6px rgba(0, 0, 0, 0.12),
            inset 0 0 45px rgba(245, 158, 11, 0.35);
    }
}

@keyframes legendary-shine {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

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

.achievement-icon {
    font-size: 2.5rem;
    min-width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f3f4f6, #e5e7eb, #d1d5db);
    border-radius: 16px;
    box-shadow: 
        0 4px 8px 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: 3px solid #c8cacd;
    position: relative;
    font-weight: 700;
    color: #1a1d29;
    text-shadow: 
        0 2px 3px rgba(255,255,255,0.9),
        0 1px 1px rgba(0,0,0,0.2);
}

.achievement-icon::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.7), rgba(255,255,255,0.4));
    border-radius: 13px 13px 0 0;
}

/* Skeuomorphic Icon Classes */
/* Skeuomorphic Icon Classes - Using Unicode symbols with emoji font support */
.achievement-icon[class*="icon-"] {
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', sans-serif;
}

.icon-project::after { content: '📁'; }
.icon-follower::after { content: '👥'; }
.icon-following::after { content: '🔗'; }
.icon-comment::after { content: '💬'; }
.icon-like::after { content: '❤'; }
.icon-view::after { content: '👁'; }
.icon-sticker::after { content: '🎭'; }
.icon-calendar::after { content: '📅'; }
.icon-aero-earn::after { content: '💰'; }
.icon-aero-spend::after { content: '💸'; }
.icon-xp::after { content: '⭐'; }
.icon-message-send::after { content: '📤'; }
.icon-message-receive::after { content: '📥'; }
.icon-game::after { content: '🎮'; }
.icon-art::after { content: '🎨'; }
.icon-music::after { content: '🎵'; }
.icon-article::after { content: '📝'; }
.icon-report::after { content: '🚨'; }
.icon-shopping::after { content: '🛒'; }
.icon-theme::after { content: '🎨'; }
.icon-boost::after { content: '⚡'; }
.icon-eye::after { content: '👀'; }
.icon-globe::after { content: '🌐'; }
.icon-star::after { content: '★'; }
.icon-fire::after { content: '🔥'; }
.icon-thumbs-up::after { content: '👍'; }
.icon-viral::after { content: '📈'; }
.icon-default::after { content: '🏆'; }

.achievement-icon[class*="icon-"]::after {
    position: relative;
    z-index: 1;
    display: block;
    font-size: 2.5rem;
    line-height: 1;
    text-shadow: 
        0 2px 3px rgba(255,255,255,0.9),
        0 1px 1px rgba(0,0,0,0.2);
}

.achievement-card.unlocked .achievement-icon {
    background: linear-gradient(145deg, #fbbf24, #f59e0b, #d97706);
    box-shadow: 
        0 6px 12px rgba(251, 191, 36, 0.5),
        inset 0 2px 4px rgba(255,255,255,0.5),
        inset 0 -2px 4px rgba(0,0,0,0.25);
    border-color: #d97706;
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1a1d29;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 3px rgba(255, 255, 255, 0.9);
    line-height: 1.3;
}

.achievement-rarity {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 8px;
    display: inline-block;
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.15),
        inset 0 2px 3px rgba(255,255,255,0.7),
        inset 0 -1px 2px rgba(0,0,0,0.1);
    border: 2px solid rgba(0,0,0,0.1);
    letter-spacing: 0.5px;
}

.achievement-rarity.common {
    background: linear-gradient(145deg, #e5e7eb, #d1d5db);
    color: #6b7280;
}

.achievement-rarity.rare {
    background: linear-gradient(145deg, #dbeafe, #bfdbfe);
    color: #2563eb;
}

.achievement-rarity.epic {
    background: linear-gradient(145deg, #f3e8ff, #e9d5ff);
    color: #a855f7;
}

.achievement-rarity.legendary {
    background: linear-gradient(145deg, #fde68a, #fcd34d);
    color: #d97706;
}

/* Achievement Meta Container */
.achievement-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Level Badge */
.level-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 8px;
    display: inline-block;
    background: linear-gradient(145deg, #fbbf24, #f59e0b);
    color: #78350f;
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.15),
        inset 0 2px 3px rgba(255,255,255,0.7),
        inset 0 -1px 2px rgba(0,0,0,0.1);
    border: 2px solid #d97706;
    letter-spacing: 0.5px;
}

/* Achievement Description */
.achievement-description {
    font-size: 0.95rem;
    color: #4a5568;
    margin-bottom: 18px;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}

/* Progress Bar - ENHANCED SKEUOMORPHIC */
.achievement-progress {
    margin-bottom: 12px;
}

.progress-bar {
    height: 12px;
    background: linear-gradient(145deg, #e5e7eb, #d1d5db, #cbd5e1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 6px;
    box-shadow: 
        inset 0 3px 6px rgba(0,0,0,0.15),
        inset 0 -2px 4px rgba(255,255,255,0.6);
    border: 2px solid #cbd5e1;
    position: relative;
}

.progress-bar::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.3));
    border-radius: 6px 6px 0 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb, #1d4ed8);
    border-radius: 6px;
    transition: width 0.6s ease;
    box-shadow: 
        0 2px 4px rgba(59,130,246,0.4),
        inset 0 2px 3px rgba(255,255,255,0.4);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.4), transparent);
    border-radius: 6px 6px 0 0;
}

.achievement-card.unlocked .progress-fill {
    background: linear-gradient(90deg, #10b981, #059669, #047857);
    box-shadow: 
        0 2px 4px rgba(16,185,129,0.4),
        inset 0 2px 3px rgba(255,255,255,0.4);
}

.progress-text {
    font-size: 0.85rem;
    color: #4a5568;
    text-align: right;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}

/* Achievement Reward */
.achievement-reward {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 3px solid #e5e7eb;
    box-shadow: 0 -2px 2px rgba(255,255,255,0.7);
}

.reward-aeros {
    font-size: 1rem;
    font-weight: 700;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}

.reward-aeros::before {
    content: '💰';
    font-size: 1.4rem;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15));
}

.unlocked-date {
    font-size: 0.8rem;
    color: #718096;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}

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

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    margin-bottom: 25px;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.15),
        inset 0 2px 4px rgba(255,255,255,0.9);
}

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

/* Achievement Notification */
.achievement-notification {
    position: fixed;
    top: 25px;
    right: 25px;
    background: linear-gradient(145deg, #ffd700, #ffed4e, #fde047);
    border: 4px solid #f59e0b;
    border-radius: 22px;
    padding: 25px;
    box-shadow: 
        0 15px 30px rgba(245, 158, 11, 0.5),
        0 8px 16px rgba(0, 0, 0, 0.25),
        inset 0 3px 6px rgba(255, 255, 255, 0.9),
        inset 0 -3px 6px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateX(450px);
    opacity: 0;
    transition: all 0.4s ease;
    max-width: 380px;
}

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

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

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

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

.notification-icon {
    font-size: 3rem;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
}

.notification-text {
    flex: 1;
}

.notification-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #92400e;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.9);
}

.notification-achievement {
    font-size: 1.05rem;
    font-weight: 700;
    color: #b45309;
    margin-bottom: 4px;
}

.notification-reward {
    font-size: 0.95rem;
    color: #d97706;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .achievements-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .achievements-header {
        padding: 30px;
    }
    
    .header-text h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .achievements-header {
        padding: 25px 20px;
    }

    .header-text h1 {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }

    .achievements-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-card {
        padding: 20px 15px;
    }

    .stat-value {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }

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

    .category-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 6px;
        gap: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .category-filters::-webkit-scrollbar {
        height: 6px;
    }
    
    .category-filters::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.05);
        border-radius: 3px;
    }
    
    .category-filters::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.2);
        border-radius: 3px;
    }

    .category-tab {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 12px 18px;
        font-size: 0.9rem;
    }

    .sort-options {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 15px;
    }

    #sort-select {
        width: 100%;
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    .show-locked-toggle {
        font-size: 0.95rem;
    }
    
    .achievement-card {
        padding: 22px;
    }
    
    .achievement-icon {
        font-size: 3rem;
        min-width: 60px;
        height: 60px;
    }
    
    .achievement-name {
        font-size: 1.1rem;
    }
    
    .achievement-notification {
        max-width: calc(100% - 40px);
        right: 20px;
        left: 20px;
        top: 20px;
    }
}

@media (max-width: 480px) {
    .achievements-header {
        padding: 20px 15px;
        border-radius: 20px;
    }
    
    .header-text h1 {
        font-size: 1.9rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .stat-card {
        padding: 18px 12px;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .category-filters {
        padding: 5px;
        gap: 6px;
    }
    
    .category-tab {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    .sort-options {
        padding: 12px;
    }
    
    .achievement-card {
        padding: 20px;
        border-radius: 20px;
    }
    
    .achievement-header {
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .achievement-icon {
        font-size: 2.8rem;
        min-width: 55px;
        height: 55px;
    }
    
    .achievement-name {
        font-size: 1rem;
    }
    
    .achievement-description {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .progress-bar {
        height: 10px;
    }
    
    .achievement-notification {
        padding: 20px;
        border-radius: 16px;
    }
    
    .notification-icon {
        font-size: 2.5rem;
    }
    
    .notification-title {
        font-size: 1.1rem;
    }
    
    .notification-achievement {
        font-size: 1rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .category-tab:hover {
        transform: none;
    }
    
    .category-tab:active {
        transform: scale(0.97);
        background: linear-gradient(145deg, #c8cacd, #b8babc);
    }
    
    .achievement-card:hover {
        transform: none;
    }
    
    .achievement-card:active {
        transform: scale(0.98);
    }
    
    .stat-card:hover {
        transform: none;
    }
    
    .stat-card:active {
        transform: scale(0.98);
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .achievements-header {
        padding: 20px;
    }
    
    .achievements-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 15px 10px;
    }
}
