/* ============================================================
TOUT LE CSS - VERSION COMPLÈTE CORRIGÉE
============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --card-brightness: 0.9;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    padding-top: 20px;
    background: #0a0a1a;
    overflow-x: hidden;
}

.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, #0a0a1a, #1a0a2e, #0a1a2e, #0a0a1a);
    background-size: 400% 400%;
    animation: gradientMove 20s ease infinite;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.aurora {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.aurora .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    animation: orbFloat 25s ease-in-out infinite alternate;
}

.aurora .orb:nth-child(1) {
    width: 500px;
    height: 500px;
    background: #6c3ce0;
    top: -200px;
    left: -200px;
    animation-duration: 30s;
}
.aurora .orb:nth-child(2) {
    width: 400px;
    height: 400px;
    background: #e03c7a;
    bottom: -150px;
    right: -150px;
    animation-duration: 25s;
    animation-delay: -8s;
}
.aurora .orb:nth-child(3) {
    width: 300px;
    height: 300px;
    background: #3c8ce0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 35s;
    animation-delay: -15s;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(120px, -60px) scale(1.2); }
    66% { transform: translate(-60px, 120px) scale(0.8); }
    100% { transform: translate(60px, -120px) scale(1.1); }
}

/* ============================================================
HEADER
============================================================ */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    max-width: 420px;
    margin: 0 auto 20px auto;
    padding: 16px 20px 12px 20px;
    background: rgba(10, 10, 26, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.header-btn.undo {
    color: #fcc419;
    border-color: rgba(252, 196, 25, 0.15);
}

.header-btn.undo:hover:not(:disabled) {
    background: rgba(252, 196, 25, 0.1);
    border-color: rgba(252, 196, 25, 0.2);
}

.header-btn.undo:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none !important;
}
.app-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.app-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #c8b6ff 50%, #ffb6d9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.app-title .icon {
    font-size: 24px;
    -webkit-text-fill-color: initial;
}

.header-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.header-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

.header-btn.refresh {
    color: #4dd0e1;
    border-color: rgba(77, 208, 225, 0.15);
}
.header-btn.refresh:hover {
    background: rgba(77, 208, 225, 0.1);
    border-color: rgba(77, 208, 225, 0.2);
}

.new-cards-badge {
    background: #ff6b6b;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 30px;
    margin-left: 4px;
    animation: pulse-badge 1.5s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.brightness-control {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 30px;
    padding: 2px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.brightness-control:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.brightness-control .icon {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.3);
}

.brightness-control .slider-container {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    position: relative;
}

.brightness-control .slider-track {
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.5));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 87%;
}

.brightness-control .slider-thumb {
    position: absolute;
    top: 50%;
    left: 87%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.brightness-control .slider-thumb:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(255, 255, 255, 0.8);
}

/* ============================================================
RECHERCHE
============================================================ */
.search-bar {
    position: relative;
    width: 100%;
}

.search-bar input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 30px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 400;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.2);
    font-weight: 300;
}

.search-bar input:focus {
    border-color: rgba(108, 60, 224, 0.2);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 30px rgba(108, 60, 224, 0.05);
}

.search-bar .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.15);
    font-size: 16px;
    pointer-events: none;
}

.search-bar .clear-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.15);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
}

.search-bar .clear-btn.visible {
    display: block;
}
.search-bar .clear-btn:hover {
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================================
FILTRES DES CARTES - DROPDOWN
============================================================ */
.filters-dropdown {
    margin-top: 12px;
    position: relative;
}

.filters-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.filters-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.filters-toggle .filters-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    font-size: 10px;
}

.filters-toggle.open .filters-arrow {
    transform: rotate(180deg);
}

.filters-toggle .filters-active {
    font-size: 10px;
    color: #4dd0e1;
    background: rgba(77, 208, 225, 0.1);
    padding: 1px 10px;
    border-radius: 12px;
    margin-left: 4px;
}

.filters-panel {
    display: none;
    margin-top: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    animation: fadeIn 0.2s ease-out;
    max-height: 400px;
    overflow-y: auto;
}

.filters-panel.open {
    display: block;
}

.filters-search {
    margin-bottom: 10px;
}

.filters-search input {
    width: 100%;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.filters-search input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.filters-search input:focus {
    border-color: rgba(77, 208, 225, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.filters-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 2px 0;
}

.filters-tag {
    padding: 3px 10px 3px 8px;
    border-radius: 16px;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.3);
    user-select: none;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.filters-tag:hover {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
}

.filters-tag.state-include {
    background: rgba(46, 213, 115, 0.15);
    border-color: rgba(46, 213, 115, 0.25);
    color: #2ed573;
}

.filters-tag.state-include .dot {
    background: #2ed573;
    box-shadow: 0 0 12px rgba(46, 213, 115, 0.3);
}

.filters-tag.state-exclude {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.25);
    color: #ff6b6b;
}

.filters-tag.state-exclude .dot {
    background: #ff6b6b;
    box-shadow: 0 0 12px rgba(255, 107, 107, 0.3);
}

.filters-tag .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.filters-tag .state-icon {
    font-size: 9px;
    margin-left: 2px;
}

.filters-tag .tag-count {
    font-size: 8px;
    opacity: 0.4;
    background: rgba(255, 255, 255, 0.03);
    padding: 0 6px;
    border-radius: 10px;
}

.filters-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
}

.filters-reset {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.2);
    padding: 3px 14px;
    border-radius: 16px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filters-reset:hover {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.4);
}

.filters-panel::-webkit-scrollbar {
    width: 3px;
}
.filters-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
    border-radius: 10px;
}
.filters-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.filters-no-results {
    text-align: center;
    padding: 12px;
    color: rgba(255, 255, 255, 0.1);
    font-size: 11px;
    width: 100%;
}

/* ============================================================
CARTE
============================================================ */
.container {
    position: relative;
    width: 100%;
    max-width: 380px;
    min-height: 560px;
    margin: 0 auto;
    z-index: 2;
    padding-bottom: 5px;
}

.card {
    position: relative;
    width: 100%;
    height: 520px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 20px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    cursor: grab;
    user-select: none;
    will-change: transform, opacity;
    overflow: hidden;
}

.card:active { cursor: grabbing; }
.card.dragging { transition: none; }

.card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(108, 60, 224, 0.15), rgba(224, 60, 122, 0.15));
    z-index: -1;
    opacity: 0.3;
    filter: blur(30px);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    background: radial-gradient(ellipse at 30% 20%, rgba(108, 60, 224, 0.04), transparent 60%);
    z-index: 1;
    pointer-events: none;
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
    z-index: 0;
    opacity: var(--card-brightness, 0.9);
    transition: opacity 0.3s ease;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.05) 30%,
        rgba(0,0,0,0.2) 60%,
        rgba(0,0,0,0.4) 85%,
        rgba(0,0,0,0.6) 100%
    );
    z-index: 1;
}

.card-blur {
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    object-fit: cover;
    border-radius: 35px;
    z-index: -1;
    filter: blur(40px) brightness(0.5);
    transform: scale(1.1);
    opacity: 0.4;
}

.card-info {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 16px 10px 6px 10px;
    text-align: center;
    flex: 0 0 auto;
}

.card h2 {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #c8b6ff 60%, #ffb6d9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
    line-height: 1.3;
    max-height: 70px;
    overflow: hidden;
    letter-spacing: -0.3px;
}

.card .sub {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.5px;
    max-height: 50px;
    overflow: hidden;
    line-height: 1.5;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.card .rating-badge {
    display: inline-block;
    background: rgba(108, 60, 224, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(108, 60, 224, 0.1);
    color: #c8b6ff;
    padding: 2px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

.card-counter {
    position: absolute;
    top: 14px;
    right: 14px;
    color: rgba(255, 255, 255, 0.61);
    font-size: 11px;
    font-weight: 500;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 3px 12px;
    border-radius: 30px;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.02);
    letter-spacing: 0.5px;
}

.swipe-hint {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.06);
    font-size: 10px;
    animation: pulse 3s ease-in-out infinite;
    z-index: 2;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 300;
}

@keyframes pulse {
    0%, 100% { opacity: 0.2; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.6; transform: translateX(-50%) translateY(-3px); }
}

.badge {
    position: absolute;
    font-size: 32px;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
    z-index: 10;
    text-shadow: 0 4px 30px rgba(0,0,0,0.5);
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    border: 2px solid;
    letter-spacing: 1px;
}

.badge.left { top: 40%; left: 8px; color: #ff6b6b; border-color: rgba(255, 107, 107, 0.3); transform: rotate(-12deg); }
.badge.right { top: 40%; right: 8px; color: #51cf66; border-color: rgba(81, 207, 102, 0.3); transform: rotate(12deg); }
.badge.up { top: 12px; left: 50%; transform: translateX(-50%); color: #fcc419; border-color: rgba(252, 196, 25, 0.3); font-size: 26px; }
.badge.down { bottom: 18%; left: 50%; transform: translateX(-50%); color: #4dd0e1; border-color: rgba(77, 208, 225, 0.3); font-size: 26px; }

/* ============================================================
STATS
============================================================ */
.stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 20px;
    padding: 10px 0 8px 0;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
}

.stats span {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.02);
    padding: 4px 12px;
    border-radius: 30px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    font-size: 10px;
    letter-spacing: 0.3px;
}

.stats span:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.04);
}

.stats span span {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    color: inherit !important;
    font-weight: inherit !important;
    border-radius: 0 !important;
}

.stats .paslu { color: #ff6b6b; border-color: rgba(255, 107, 107, 0.08); }
.stats .drop { color: #fcc419; border-color: rgba(252, 196, 25, 0.08); }
.stats .lu { color: #51cf66; border-color: rgba(81, 207, 102, 0.08); }
.stats .wish { color: #4dd0e1; border-color: rgba(77, 208, 225, 0.08); }

.view-toggle-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.3);
    padding: 3px 12px;
    border-radius: 30px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 4px;
}

.view-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
}

.view-toggle-btn.active {
    color: #c8b6ff;
    border-color: rgba(108, 60, 224, 0.1);
    background: rgba(108, 60, 224, 0.05);
}

/* ============================================================
CONTROLS
============================================================ */
.controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
    padding-bottom: 10px;
    position: relative;
}

.controls button {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.4);
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.controls button:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
}

.controls .reset {
    background: rgba(252, 196, 25, 0.05);
    border-color: rgba(252, 196, 25, 0.06);
    color: #fcc419;
}

.controls .reset:hover {
    background: rgba(252, 196, 25, 0.08);
    border-color: rgba(252, 196, 25, 0.12);
}

.controls .export-btn {
    background: rgba(77, 208, 225, 0.05);
    border-color: rgba(77, 208, 225, 0.06);
    color: #4dd0e1;
}

.controls .export-btn:hover {
    background: rgba(77, 208, 225, 0.08);
    border-color: rgba(77, 208, 225, 0.12);
}

.controls .import-btn {
    background: rgba(46, 213, 115, 0.05);
    border-color: rgba(46, 213, 115, 0.06);
    color: #2ed573;
}

.controls .import-btn:hover {
    background: rgba(46, 213, 115, 0.08);
    border-color: rgba(46, 213, 115, 0.12);
}

/* ============================================================
LIENS MOBILES - DANS LE FLUX (caché sur PC)
============================================================ */
.mobile-links {
    display: none;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 5px 14px 5px 12px;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 10px;
}

.mobile-link:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.06);
}

.mobile-link .discord-icon {
    width: 14px;
    height: 14px;
    fill: rgba(255, 255, 255, 0.5);
}

.mobile-link .link-name {
    color: rgba(255, 255, 255, 0.5);
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.mobile-link .discord-status {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #2b8a3e;
    display: inline-block;
    animation: pulse-dot 2s ease-in-out infinite;
}

.mobile-link .kofi-icon {
    font-size: 13px;
    line-height: 1;
}

.mobile-link .kofi-heart {
    color: #ff6b6b;
    font-size: 9px;
    animation: heartBeat 1.5s ease-in-out infinite;
}

/* ============================================================
LIENS FLOTTANTS (PC)
============================================================ */
.discord-link {
    position: fixed;
    bottom: 80px;
    right: 16px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    background:rgba(88, 101, 242, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 6px 14px 6px 10px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.discord-link:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.3);
}

.discord-link .discord-icon {
    width: 18px;
    height: 18px;
    fill: #5865F2;
    transition: fill 0.3s ease;
}

.discord-link .discord-name {
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

.discord-link:hover .discord-name {
    color: rgba(0, 0, 0, 0.9);
}

.discord-link .discord-status {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #2b8a3e;
    display: inline-block;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.2; transform: scale(0.7); }
}

.kofi-link {
    position: fixed;
    bottom: 130px;
    right: 16px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(88, 101, 242, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 6px 14px 6px 10px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.kofi-link:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.3);
}

.kofi-link .kofi-icon {
    font-size: 16px;
    line-height: 1;
}

.kofi-link .kofi-name {
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

.kofi-link:hover .kofi-name {
    color: rgba(0, 0, 0, 0.9);
}

.kofi-link .kofi-heart {
    color: #ff6b6b;
    font-size: 10px;
    animation: heartBeat 1.5s ease-in-out infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.3); }
    30% { transform: scale(1); }
    45% { transform: scale(1.2); }
    60% { transform: scale(1); }
}

/* ============================================================
MODAL - AVEC DROPDOWN DE FILTRES
============================================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active { display: flex; }

.modal-content {
    background: rgba(15, 20, 40, 0.7);
    backdrop-filter: blur(60px);
    -webkit-backdrop-filter: blur(60px);
    border-radius: 30px;
    padding: 28px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.02);
    box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

.modal-header h2 {
    color: rgba(255,255,255,0.7);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.modal-header .header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.modal-header .header-actions button {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.02);
    color: rgba(255,255,255,0.3);
    padding: 3px 12px;
    border-radius: 30px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.modal-header .header-actions button:hover {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.5);
}

.modal-header .header-actions button.danger {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.1);
}

.modal-header .header-actions button.danger:hover {
    background: rgba(255, 107, 107, 0.08);
    border-color: rgba(255, 107, 107, 0.15);
}

.modal-header .close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.08);
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0 6px;
}

.modal-header .close-btn:hover {
    color: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.modal-filter-dropdown {
    position: relative;
    margin-bottom: 12px;
}

.modal-filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.modal-filter-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.modal-filter-toggle .modal-filter-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    font-size: 10px;
}

.modal-filter-toggle.open .modal-filter-arrow {
    transform: rotate(180deg);
}

.modal-filter-toggle .modal-filter-active {
    font-size: 10px;
    color: #4dd0e1;
    background: rgba(77, 208, 225, 0.1);
    padding: 1px 10px;
    border-radius: 12px;
    margin-left: 4px;
}

.modal-filter-panel {
    display: none;
    margin-top: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    animation: fadeIn 0.2s ease-out;
}

.modal-filter-panel.open {
    display: block;
}

.modal-filter-search {
    margin-bottom: 10px;
}

.modal-filter-search input {
    width: 100%;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.modal-filter-search input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.modal-filter-search input:focus {
    border-color: rgba(77, 208, 225, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.modal-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 180px;
    overflow-y: auto;
    padding: 2px 0;
}

.modal-filter-tags::-webkit-scrollbar {
    width: 3px;
}
.modal-filter-tags::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
    border-radius: 10px;
}
.modal-filter-tags::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.modal-filter-tag {
    padding: 3px 10px 3px 8px;
    border-radius: 16px;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.3);
    user-select: none;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.modal-filter-tag:hover {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
}

.modal-filter-tag.active {
    background: rgba(77, 208, 225, 0.1);
    border-color: rgba(77, 208, 225, 0.15);
    color: #4dd0e1;
}

.modal-filter-tag .tag-count {
    font-size: 8px;
    opacity: 0.4;
    background: rgba(255, 255, 255, 0.03);
    padding: 0 6px;
    border-radius: 10px;
}

.modal-filter-tag.active .tag-count {
    opacity: 0.7;
}

.modal-filter-tag.zero {
    opacity: 0.3;
}

.modal-filter-tag.zero:hover {
    opacity: 0.6;
}

.modal-filter-no-results {
    text-align: center;
    padding: 12px;
    color: rgba(255, 255, 255, 0.1);
    font-size: 11px;
}

/* ============================================================
MODAL - VUE GRILLE
============================================================ */
.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    padding: 8px 0;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-grid::-webkit-scrollbar {
    width: 3px;
}
.modal-grid::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.01);
    border-radius: 10px;
}
.modal-grid::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.modal-grid-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.modal-grid-item:hover {
    transform: scale(1.03);
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    z-index: 2;
}

.modal-grid-item img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    background: rgba(255,255,255,0.01);
}

.modal-grid-item .modal-grid-title {
    padding: 6px 8px 8px 8px;
    font-size: 10px;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    text-align: center;
    line-height: 1.2;
    max-height: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.modal-grid-item .modal-grid-tags {
    padding: 0 8px 6px 8px;
    font-size: 7px;
    color: rgba(255,255,255,0.2);
    text-align: center;
    line-height: 1.2;
    max-height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#modalViewToggle {
    background: rgba(77, 208, 225, 0.05);
    border-color: rgba(77, 208, 225, 0.1);
    color: #4dd0e1;
}

#modalViewToggle:hover {
    background: rgba(77, 208, 225, 0.1);
}

/* ============================================================
MODAL - LISTE
============================================================ */
.modal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    margin-bottom: 2px;
    background: rgba(255,255,255,0.01);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: default;
    border: 1px solid rgba(255,255,255,0.01);
}

.modal-item:hover {
    background: rgba(255,255,255,0.02);
    border-color: rgba(255,255,255,0.02);
}

.modal-item .item-title {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    flex: 1;
    margin-right: 6px;
    padding: 3px 0;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.modal-item .item-actions {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.modal-item .item-actions button {
    padding: 2px 8px;
    border: 1px solid rgba(255,255,255,0.02);
    border-radius: 10px;
    font-size: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.modal-item .item-actions button:hover {
    transform: scale(1.06);
}

.btn-move-paslu { background: rgba(255, 107, 107, 0.06); color: #ff6b6b; border-color: rgba(255, 107, 107, 0.04); }
.btn-move-paslu:hover { background: rgba(255, 107, 107, 0.12); }
.btn-move-drop { background: rgba(252, 196, 25, 0.06); color: #fcc419; border-color: rgba(252, 196, 25, 0.04); }
.btn-move-drop:hover { background: rgba(252, 196, 25, 0.12); }
.btn-move-lu { background: rgba(81, 207, 102, 0.06); color: #51cf66; border-color: rgba(81, 207, 102, 0.04); }
.btn-move-lu:hover { background: rgba(81, 207, 102, 0.12); }
.btn-move-wish { background: rgba(77, 208, 225, 0.06); color: #4dd0e1; border-color: rgba(77, 208, 225, 0.04); }
.btn-move-wish:hover { background: rgba(77, 208, 225, 0.12); }
.btn-move-pile { background: rgba(255,255,255,0.01); color: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.02); }
.btn-move-pile:hover { background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.3); }

.modal-empty {
    color: rgba(255,255,255,0.05);
    text-align: center;
    padding: 30px 20px;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 1px;
}

/* ============================================================
RECHERCHE - RÉSULTATS
============================================================ */
.search-results {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.search-results.active { display: flex; }

.search-results .modal-content {
    background: rgba(15, 20, 40, 0.7);
    backdrop-filter: blur(60px);
    -webkit-backdrop-filter: blur(60px);
    border-radius: 30px;
    padding: 28px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.02);
    box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}

.search-results .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

.search-results .modal-header h2 {
    color: rgba(255,255,255,0.7);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.search-results .modal-header .close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.08);
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0 6px;
}

.search-results .modal-header .close-btn:hover {
    color: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.result-category {
    margin-bottom: 16px;
}

.result-category .category-title {
    color: rgba(255,255,255,0.3);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 10px;
    margin-bottom: 2px;
    background: rgba(255,255,255,0.01);
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: default;
    border: 1px solid rgba(255,255,255,0.01);
}

.result-item:hover {
    background: rgba(255,255,255,0.02);
    border-color: rgba(255,255,255,0.02);
}

.result-item .item-title {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    flex: 1;
    padding: 3px 0;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.result-item .item-actions {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.result-item .item-actions button {
    padding: 2px 8px;
    border: 1px solid rgba(255,255,255,0.02);
    border-radius: 10px;
    font-size: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.result-item .item-actions button:hover {
    transform: scale(1.06);
}

.result-empty {
    color: rgba(255,255,255,0.05);
    text-align: center;
    padding: 20px;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 1px;
}

/* ============================================================
WALL
============================================================ */
.wall-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.wall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-auto-rows: 280px;
    gap: 6px;
    padding: 6px;
    width: 100%;
    height: 100%;
    opacity: 0.08;
    transition: opacity 0.8s ease;
}

.wall-item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.5s ease;
    animation: wallAppear 0.5s ease-out;
    will-change: transform, opacity;
}

.wall-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(0px) brightness(0.4) saturate(0.4);
    transition: filter 0.3s ease;
}

.wall-item:hover img {
    filter: blur(0px) brightness(0.6) saturate(0.6);
}

@keyframes wallAppear {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

.wall-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.15) 100%);
}

.wall-counter {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.03);
    font-size: 10px;
    z-index: 1;
    pointer-events: none;
    background: rgba(0,0,0,0.1);
    padding: 3px 14px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    font-weight: 300;
    letter-spacing: 2px;
}

/* ============================================================
TOAST
============================================================ */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255,255,255,0.02);
    color: rgba(255,255,255,0.6);
    padding: 8px 22px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 400;
    z-index: 2000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    pointer-events: none;
    letter-spacing: 0.5px;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================================
SAVE INDICATOR
============================================================ */
.save-indicator {
    position: fixed;
    top: 12px;
    right: 12px;
    color: rgba(255,255,255,0.03);
    font-size: 9px;
    z-index: 100;
    background: rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    padding: 2px 10px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.01);
    transition: all 0.3s ease;
    pointer-events: none;
    letter-spacing: 0.5px;
    font-weight: 300;
}

.save-indicator.saved {
    color: rgba(81, 207, 102, 0.15);
    border-color: rgba(81, 207, 102, 0.03);
}

.key-hint {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.01);
    font-size: 9px;
    z-index: 1;
    pointer-events: none;
    letter-spacing: 4px;
    font-weight: 300;
    text-transform: uppercase;
}

/* ============================================================
LOADING / ERROR / FIN
============================================================ */
.loading {
    color: rgba(255,255,255,0.3);
    text-align: center;
    font-size: 16px;
    background: rgba(255,255,255,0.01);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.02);
    padding: 30px;
    border-radius: 30px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    font-weight: 300;
}

.loading .spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 2px solid rgba(108, 60, 224, 0.05);
    border-top-color: #6c3ce0;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

.fin {
    color: rgba(255,255,255,0.6);
    text-align: center;
    font-size: 18px;
    background: rgba(255,255,255,0.01);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.02);
    padding: 30px 20px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
}

.fin .emoji-big { font-size: 40px; display: block; margin-bottom: 8px; }

.fin button {
    padding: 8px 24px;
    border-radius: 30px;
    border: 1px solid rgba(252, 196, 25, 0.05);
    background: rgba(252, 196, 25, 0.02);
    color: #fcc419;
    font-weight: 500;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    font-size: 13px;
}

.fin button:hover {
    background: rgba(252, 196, 25, 0.04);
    transform: scale(1.04);
}

.error-msg {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.02);
    backdrop-filter: blur(40px);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid rgba(255, 107, 107, 0.03);
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    font-weight: 300;
    font-size: 14px;
}

.error-msg button {
    padding: 6px 18px;
    border-radius: 20px;
    border: 1px solid rgba(252, 196, 25, 0.05);
    background: rgba(252, 196, 25, 0.02);
    color: #fcc419;
    font-weight: 500;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.3s ease;
    font-size: 12px;
}

.error-msg button:hover {
    background: rgba(252, 196, 25, 0.04);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.card.active { animation: fadeIn 0.3s ease-out; }

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================
POPUP DE BIENVENUE
============================================================ */
.welcome-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: popupIn 0.4s ease-out;
}

.welcome-popup.active { display: flex; }

@keyframes popupIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.welcome-popup .popup-content {
    background: rgba(15, 20, 40, 0.9);
    backdrop-filter: blur(60px);
    -webkit-backdrop-filter: blur(60px);
    border-radius: 30px;
    padding: 40px 35px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}

.welcome-popup .popup-content::-webkit-scrollbar { width: 3px; }
.welcome-popup .popup-content::-webkit-scrollbar-track { background: rgba(255,255,255,0.01); border-radius: 10px; }
.welcome-popup .popup-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.03); border-radius: 10px; }

.welcome-popup .popup-header {
    text-align: center;
    margin-bottom: 20px;
}

.welcome-popup .popup-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
}

.welcome-popup h2 {
    color: rgba(255,255,255,0.9);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.welcome-popup .subtitle {
    color: rgba(255,255,255,0.3);
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 1px;
}

.welcome-popup .tutorial-section {
    margin: 16px 0;
}

.welcome-popup .tutorial-section h3 {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.welcome-popup .tutorial-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.welcome-popup .tutorial-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.welcome-popup .tutorial-item:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.06);
}

.welcome-popup .tutorial-item .emoji {
    font-size: 22px;
    flex-shrink: 0;
}

.welcome-popup .tutorial-item .text {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
}

.welcome-popup .tutorial-item .text .highlight {
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    font-weight: 300;
}

.welcome-popup .tutorial-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.welcome-popup .tutorial-tags .tag-example {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    font-weight: 300;
    letter-spacing: 0.3px;
}

.welcome-popup .tutorial-tags .tag-example.include {
    border-color: rgba(46, 213, 115, 0.15);
    color: #2ed573;
}

.welcome-popup .tutorial-tags .tag-example.exclude {
    border-color: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}

.welcome-popup .popup-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.02);
}

.welcome-popup .popup-actions button {
    padding: 10px 28px;
    border-radius: 30px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.welcome-popup .popup-actions .btn-primary {
    background: linear-gradient(135deg, #6c3ce0, #e03c7a);
    color: white;
    box-shadow: 0 4px 20px rgba(108, 60, 224, 0.3);
}

.welcome-popup .popup-actions .btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 30px rgba(108, 60, 224, 0.4);
}

.welcome-popup .popup-actions .btn-secondary {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.05);
}

.welcome-popup .popup-actions .btn-secondary:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
}

.welcome-popup .popup-actions .btn-dismiss {
    background: transparent;
    color: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.03);
    font-size: 12px;
    font-weight: 400;
    padding: 8px 20px;
}

.welcome-popup .popup-actions .btn-dismiss:hover {
    background: rgba(255,255,255,0.02);
    color: rgba(255,255,255,0.3);
}

/* ============================================================
VUE GRILLE - CATÉGORIES AVEC COVERS
============================================================ */
.gallery-section {
    margin-top: 16px;
    padding: 12px 0 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    animation: fadeIn 0.3s ease-out;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px 10px 4px;
    flex-wrap: wrap;
    gap: 6px;
}

.gallery-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    font-weight: 600;
}

.gallery-title .gallery-count {
    background: rgba(255, 255, 255, 0.05);
    padding: 0 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.3);
}

.gallery-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.gallery-actions button {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.3);
    padding: 3px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-actions button:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
}

.gallery-filter-btn {
    color: #4dd0e1 !important;
    border-color: rgba(77, 208, 225, 0.1) !important;
}

.gallery-filter-btn:hover {
    background: rgba(77, 208, 225, 0.05) !important;
}

.gallery-close-btn:hover {
    color: #ff6b6b !important;
}

.gallery-filters {
    padding: 8px 4px 12px 4px;
    animation: fadeIn 0.2s ease-out;
}

.gallery-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.gallery-filter-tag {
    padding: 2px 10px 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.3);
    user-select: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.gallery-filter-tag:hover {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
}

.gallery-filter-tag.active {
    background: rgba(77, 208, 225, 0.1);
    border-color: rgba(77, 208, 225, 0.15);
    color: #4dd0e1;
}

.gallery-filter-tag .tag-count {
    font-size: 8px;
    opacity: 0.5;
    background: rgba(255, 255, 255, 0.03);
    padding: 0 6px;
    border-radius: 10px;
}

.gallery-filter-reset {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.2);
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-filter-reset:hover {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.4);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    padding: 4px 0;
    max-height: 500px;
    overflow-y: auto;
}

.gallery-grid::-webkit-scrollbar {
    width: 3px;
}
.gallery-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
    border-radius: 10px;
}
.gallery-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.gallery-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.gallery-item:hover {
    transform: scale(1.03);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    background: rgba(255, 255, 255, 0.01);
}

.gallery-item .gallery-item-title {
    padding: 6px 8px 8px 8px;
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    line-height: 1.2;
    max-height: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.gallery-item .gallery-item-tags {
    padding: 0 8px 6px 8px;
    font-size: 7px;
    color: rgba(255, 255, 255, 0.2);
    text-align: center;
    line-height: 1.2;
    max-height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-empty {
    text-align: center;
    padding: 30px 10px;
    color: rgba(255, 255, 255, 0.1);
}

.gallery-empty .empty-emoji {
    font-size: 32px;
    display: block;
    margin-bottom: 6px;
}

.gallery-empty .empty-text {
    font-size: 13px;
    font-weight: 300;
}

.modal-content::-webkit-scrollbar { width: 3px; }
.modal-content::-webkit-scrollbar-track { background: rgba(255,255,255,0.01); border-radius: 10px; }
.modal-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.03); border-radius: 10px; }
.modal-content::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.05); }

/* ============================================================
RESPONSIVE - MOBILE (UNIQUE)
============================================================ */
@media (max-width: 480px) {
    .key-hint { display: none; }

    /* === CACHE LES LIENS FLOTTANTS PC === */
    .discord-link,
    .kofi-link {
        display: none !important;
    }

    /* === AFFICHE LES LIENS MOBILES === */
    .mobile-links {
        display: flex !important;
        justify-content: center;
        gap: 8px;
        margin-top: 10px;
        padding-bottom: 10px;
        flex-wrap: wrap;
    }

    .mobile-link {
        padding: 4px 12px 4px 10px;
        gap: 4px;
        font-size: 9px;
    }

    .mobile-link .discord-icon {
        width: 12px;
        height: 12px;
    }

    .mobile-link .link-name {
        font-size: 8px;
    }

    .mobile-link .kofi-icon {
        font-size: 11px;
    }

    .mobile-link .kofi-heart {
        font-size: 8px;
    }

    .mobile-link .discord-status {
        width: 3px;
        height: 3px;
    }

    /* === SUPPRIME L'ESPACE VIDE === */
    .container {
        min-height: auto;
        padding-bottom: 10px;
    }

    /* === STATS === */
    .stats {
        gap: 4px;
        padding: 6px 0 4px 0;
        margin-top: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .stats span {
        padding: 3px 8px;
        font-size: 9px;
        flex: 0 1 auto;
        white-space: nowrap;
    }

    /* === CONTROLS === */
    .controls {
        gap: 4px;
        margin-top: 4px;
        padding-bottom: 2px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .controls button {
        padding: 4px 10px;
        font-size: 9px;
        flex: 0 1 auto;
        white-space: nowrap;
    }

    /* === CARTE === */
    .card {
        height: 420px;
        border-radius: 20px;
        padding: 14px;
    }

    .card h2 {
        font-size: 17px;
        max-height: 50px;
    }

    .card .sub {
        font-size: 10px;
        max-height: 35px;
    }

    .card-counter {
        font-size: 9px;
        padding: 2px 10px;
        top: 10px;
        right: 10px;
    }

    .swipe-hint {
        font-size: 7px;
        bottom: 50px;
    }

    /* === BADGES === */
    .badge {
        font-size: 20px;
        padding: 4px 10px;
    }
    .badge.left { left: 4px; }
    .badge.right { right: 4px; }
    .badge.up { font-size: 18px; }
    .badge.down { font-size: 18px; bottom: 14%; }

    /* === APP HEADER === */
    .app-header {
        padding: 12px 14px 10px 14px;
        border-radius: 18px;
    }
    .app-title { font-size: 17px; }
    .header-btn { font-size: 10px; padding: 4px 10px; }

    /* === RECHERCHE === */
    .search-bar input {
        font-size: 12px;
        padding: 8px 14px 8px 36px;
    }
    .search-bar .search-icon {
        font-size: 14px;
        left: 12px;
    }
    .search-bar .clear-btn { font-size: 14px; }

    /* === FILTRES DROPDOWN === */
    .filters-toggle {
        padding: 6px 12px;
        font-size: 11px;
    }
    .filters-tag {
        font-size: 9px;
        padding: 2px 8px 2px 6px;
    }
    .filters-tag .tag-count {
        font-size: 7px;
    }

    /* === GALLERIE === */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 6px;
        max-height: 400px;
    }

    .gallery-item .gallery-item-title {
        font-size: 8px;
        padding: 4px 6px 6px 6px;
        max-height: 24px;
    }

    .gallery-item .gallery-item-tags {
        font-size: 6px;
        padding: 0 6px 4px 6px;
        max-height: 16px;
    }

    .gallery-title {
        font-size: 14px;
    }

    .gallery-actions button {
        font-size: 9px;
        padding: 2px 10px;
    }

    .view-toggle-btn {
        font-size: 8px;
        padding: 2px 8px;
    }

    /* === WALL === */
    .wall-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        grid-auto-rows: 80px;
        gap: 2px;
        opacity: 0.06;
    }
    .wall-counter {
        font-size: 8px;
        padding: 2px 10px;
        bottom: 8px;
    }

    /* === MODAL === */
    .modal-content {
        padding: 20px;
        border-radius: 20px;
    }
    .modal-header h2 { font-size: 16px; }
    .modal-header .header-actions button { font-size: 9px; padding: 2px 10px; }

    .modal-item { padding: 4px 8px; }
    .modal-item .item-title { font-size: 12px; }
    .modal-item .item-actions button {
        font-size: 7px;
        padding: 2px 6px;
    }

    /* === MODAL FILTRES === */
    .modal-filter-toggle {
        padding: 6px 12px;
        font-size: 11px;
    }
    .modal-filter-tag {
        font-size: 9px;
        padding: 2px 8px 2px 6px;
    }
    .modal-filter-tag .tag-count {
        font-size: 7px;
    }

    /* === MODAL GRID === */
    .modal-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 6px;
        max-height: 50vh;
    }

    .modal-grid-item .modal-grid-title {
        font-size: 8px;
        padding: 4px 6px 6px 6px;
        max-height: 24px;
    }

    .modal-grid-item .modal-grid-tags {
        font-size: 6px;
        padding: 0 6px 4px 6px;
        max-height: 16px;
    }

    /* === TOAST === */
    .toast {
        font-size: 11px;
        padding: 6px 16px;
        bottom: 70px;
    }

    /* === BRIGHTNESS === */
    .brightness-control .slider-container { width: 40px; }
    .brightness-control .icon { font-size: 12px; }

    /* === SEARCH RESULTS === */
    .search-results .modal-content { padding: 20px; border-radius: 20px; }
    .search-results .modal-header h2 { font-size: 16px; }
    .result-item { padding: 4px 8px; }
    .result-item .item-title { font-size: 12px; }
    .result-item .item-actions button {
        font-size: 7px;
        padding: 2px 6px;
    }

    /* === BADGE === */
    .new-cards-badge {
        font-size: 8px;
        padding: 1px 6px;
    }

    /* === WELCOME POPUP === */
    .welcome-popup .popup-content {
        padding: 25px 18px;
        border-radius: 20px;
        max-height: 95vh;
    }
    .welcome-popup h2 { font-size: 19px; }
    .welcome-popup .tutorial-grid { grid-template-columns: 1fr; }
    .welcome-popup .tutorial-item { padding: 10px 12px; }
    .welcome-popup .tutorial-item .text { font-size: 12px; }
    .welcome-popup .popup-actions button {
        padding: 8px 18px;
        font-size: 12px;
    }
    .welcome-popup .popup-actions .btn-dismiss {
        font-size: 11px;
        padding: 6px 14px;
    }

    /* === SAVE INDICATOR === */
    .save-indicator {
        font-size: 7px;
        padding: 2px 8px;
        top: 8px;
        right: 8px;
    }
}