/* ===== TELA DE SELEÇÃO DE SKINS ===== */
#skin-selection-screen {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    position: relative;
    overflow: hidden;
}

#skin-selection-screen::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 50%, rgba(157, 78, 221, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 255, 204, 0.1) 0%, transparent 50%);
    animation: float 10s ease-in-out infinite;
}

.skin-selection-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 95%;
    height: 95vh;
    max-height: 95vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.6s ease-out;
    padding: 1rem 0;
    overflow: hidden;
}

.skin-selection-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.back-button {
    position: absolute;
    left: 0;
    background: rgba(26, 31, 58, 0.8);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.8rem 1.5rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-button:hover {
    border-color: var(--neon-cyan);
    background: rgba(26, 31, 58, 1);
    transform: translateX(-5px);
}

.skin-selection-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
}

.title-icon {
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
}

.skin-selection-content {
    background: rgba(26, 31, 58, 0.6);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-glow);
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Filtros de Categoria */
.category-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.category-btn {
    background: rgba(10, 14, 39, 0.8);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.8rem 1.5rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--text-primary);
}

.category-btn.active {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    border-color: var(--neon-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.4);
}

.category-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

.category-btn.active .category-count {
    background: rgba(0, 0, 0, 0.3);
}

/* Grid de Skins */
.skins-display-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    flex: 1;
    min-height: 200px;
    max-height: calc(100vh - 450px);
    margin-bottom: 1rem;
}

.skin-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: 22px;
    /* Borda arredondada estilo iOS/App */
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    background: rgba(15, 20, 45, 0.6);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.skin-card-preview {
    width: 100%;
    height: 100%;
    /* Ocupa tudo */
    position: absolute;
    /* Fica por baixo do nome */
    top: 0;
    left: 0;
    padding: 0;
    display: block;
}

.skin-preview-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    /* Ligeiramente menor que o card */
    transition: transform 0.3s ease;
}

.skin-card:hover .skin-preview-canvas {
    transform: scale(1.1);
}

.skin-card-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.skin-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.skin-card.selected {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 2px var(--bg-dark), 0 0 25px rgba(0, 255, 204, 0.5);
    transform: scale(1.05);
    z-index: 10;
}

.skin-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.skin-card.locked::before {
    content: '🔒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    z-index: 2;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.8));
}

.skin-card.locked:hover {
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Painel de Informações */
.skin-info-panel {
    background: rgba(10, 14, 39, 0.9);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
}

.skin-info-panel h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--neon-cyan);
    margin-bottom: 0.5rem;
}

.skin-info-panel p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.skin-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 25px;
    background: rgba(26, 31, 58, 0.8);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-green), var(--neon-cyan));
    border-radius: 12px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(6, 255, 165, 0.6);
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Scrollbar customizado para grid de skins */
.skins-display-grid::-webkit-scrollbar {
    width: 10px;
}

.skins-display-grid::-webkit-scrollbar-track {
    background: rgba(26, 31, 58, 0.5);
    border-radius: 10px;
}

.skins-display-grid::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 10px;
}

/* Responsividade para tela de skins */
@media (max-width: 768px) {
    .skin-selection-title {
        font-size: 1.8rem;
    }

    .title-icon {
        font-size: 2rem;
    }

    .skins-display-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 0.8rem;
    }

    .category-filters {
        gap: 0.5rem;
    }

    .category-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .skin-selection-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .skin-selection-header {
        flex-direction: column;
        gap: 1rem;
    }

    .back-button {
        position: static;
    }

    .skins-display-grid {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    }

    .skin-selection-title {
        font-size: 1.5rem;
    }
}