/* ==========================================================================
   CrossPlayMC — Thème Sombre Bedrock & Glassmorphism Moderne
   ========================================================================== */

:root {
    --bg-main: #0c0e12;
    --bg-card: rgba(21, 25, 33, 0.78);
    --bg-card-hover: rgba(28, 33, 44, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --border-color: rgba(255, 255, 255, 0.09);
    --border-highlight: rgba(34, 197, 94, 0.45);
    
    --primary: #22c55e;
    --primary-hover: #16a34a;
    --primary-glow: rgba(34, 197, 94, 0.28);
    
    --secondary: #334155;
    --secondary-hover: #475569;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #64748b;
    
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #38bdf8;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-soft: 0 10px 30px -5px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(34, 197, 94, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(34, 197, 94, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(56, 189, 248, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* --- CONTENEUR GLOBAL --- */
.app-container {
    max-width: 1240px;
    margin: 0 auto;
    width: 100%;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    gap: 1.5rem;
}

/* --- HEADER PRINCIPAL --- */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.6));
}

.brand-title {
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.5px;
}

.brand-highlight {
    color: var(--primary);
}

.brand-sub {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.vps-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4ade80;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; filter: drop-shadow(0 0 6px var(--primary)); }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* User Pill dans Header */
.user-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
}

.header-avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    image-rendering: pixelated;
    background: #202632;
}

.user-pill-info {
    display: flex;
    flex-direction: column;
}

.user-pill-name {
    font-size: 0.85rem;
    font-weight: 700;
}

.user-pill-tag {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* --- NAVIGATION DES ONGLETS --- */
.app-nav {
    display: flex;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    overflow-x: auto;
}

.nav-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.nav-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
    color: var(--primary);
    background: rgba(34, 197, 94, 0.12);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.15);
}

/* --- PANES DE CONTENU --- */
.tab-pane {
    display: none;
    animation: fadeIn 0.25s ease forwards;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- CARTES & GRID LAYOUT --- */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.card-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.card-body {
    padding: 1.5rem;
}

/* --- DASHBOARD GRID (PROFIL) --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
}

.skin-preview-card {
    grid-row: span 2;
    align-items: center;
}

.skin-viewer-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 1rem;
}

.skin-canvas-box {
    width: 240px;
    height: 320px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.08) 0%, rgba(12, 14, 18, 0.8) 80%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.skin-canvas-box.large {
    width: 320px;
    height: 420px;
}

.skin-controls-bar {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}

/* Profil Hero */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-large-avatar {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    image-rendering: pixelated;
    background: #202632;
    border: 2px solid var(--border-highlight);
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.2);
}

.profile-display-name {
    font-size: 1.4rem;
    font-weight: 800;
}

.profile-fulltag {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.profile-since {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Présence Activity Box */
.presence-activity-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-sm);
    margin: 1.25rem 0;
}

.activity-icon {
    font-size: 1.6rem;
}

.activity-title {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.activity-desc {
    font-size: 0.95rem;
    font-weight: 600;
    color: #38bdf8;
}

/* Mini Grid Stats */
.stats-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.85rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-icon {
    font-size: 1.4rem;
}

.stat-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Comptes Liés */
.linked-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.linked-account-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.linked-account-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.account-info-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.account-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    image-rendering: pixelated;
    background: #181d26;
}

.account-name-block {
    display: flex;
    flex-direction: column;
}

.account-mc-username {
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.account-uuid {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: monospace;
}

.account-actions {
    display: flex;
    gap: 0.5rem;
}

/* --- ONGLET SOCIAL & AMIS --- */
.social-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    flex: 1;
    gap: 0.65rem;
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-main);
    width: 100%;
    outline: none;
    font-size: 0.9rem;
}

.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.friend-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.friend-card:hover {
    border-color: var(--border-highlight);
    background: rgba(34, 197, 94, 0.04);
    transform: translateY(-2px);
}

.friend-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.friend-card-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.friend-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    image-rendering: pixelated;
    background: #202632;
}

.friend-name {
    font-weight: 700;
    font-size: 1rem;
}

.friend-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.friend-presence-box {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.friend-presence-box strong {
    color: var(--text-main);
}

.friend-card-actions {
    display: flex;
    gap: 0.5rem;
}

/* --- ONGLET ATELIER SKIN 3D --- */
.workshop-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 1.5rem;
}

.workshop-viewer-card {
    align-items: center;
}

.layers-toggles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.layers-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.toggle-checkbox {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

.drop-zone {
    border: 2px dashed rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.03);
    border-radius: var(--radius-md);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(34, 197, 94, 0.08);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.15);
}

.drop-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

.drop-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.drop-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-input-hidden {
    display: none;
}

.radio-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.radio-card {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.radio-card input {
    display: none;
}

.radio-card.active {
    border-color: var(--primary);
    background: rgba(34, 197, 94, 0.08);
}

.radio-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.radio-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.skin-file-info {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    font-size: 0.8rem;
}

.file-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
}

.action-buttons-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.tip-box {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #bae6fd;
}

/* --- ONGLET STATS SERVEUR --- */
.server-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-card-highlight {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-soft);
}

.stat-card-icon {
    font-size: 2.2rem;
}

.stat-card-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.stat-card-name {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.health-table-responsive {
    overflow-x: auto;
}

.health-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.health-table th, .health-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.health-table th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.uptime-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- BOUTONS & BADGES --- */
.btn {
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.65rem 1.2rem;
}

.btn-primary {
    background: var(--primary);
    color: #0c0e12;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    box-shadow: 0 0 16px var(--primary-glow);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text-main);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--secondary-hover);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn-large {
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.4rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-icon-small {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.badge {
    padding: 0.25rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
}

.badge-emerald {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-primary {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #64748b;
}

.status-indicator.online .status-dot {
    background: var(--primary);
    box-shadow: 0 0 6px var(--primary);
}

/* --- MODALES NATIVES (<dialog>) --- */
dialog.app-modal {
    margin: auto;
    border: 1px solid var(--border-color);
    background: #15181f;
    color: var(--text-main);
    border-radius: var(--radius-md);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    width: 90%;
    max-width: 440px;
    padding: 0;
    overflow: hidden;
}

dialog.app-modal.modal-large {
    max-width: 680px;
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-dialog-content {
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem;
    border-radius: var(--radius-sm);
}

.auth-subtab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
}

.auth-subtab.active {
    background: var(--bg-card);
    color: var(--text-main);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.9rem;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--primary);
}

.input-code {
    text-align: center;
    font-size: 1.6rem !important;
    letter-spacing: 6px;
    font-weight: 800;
}

.form-error {
    color: var(--danger);
    font-size: 0.8rem;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.form-success {
    color: #4ade80;
    font-size: 0.8rem;
    background: rgba(34, 197, 94, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Modal Ami Layout */
.friend-modal-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
}

.friend-stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1rem;
}

.friend-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-color);
}

.hidden {
    display: none !important;
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .workshop-layout {
        grid-template-columns: 1fr;
    }
    .server-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .stats-mini-grid {
        grid-template-columns: 1fr 1fr;
    }
    .friend-modal-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .app-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    .server-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* --- STYLES MICROSOFT OAUTH & PROTECTION CRACK --- */
.btn-microsoft {
    background: #0078d4;
    color: #ffffff;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-microsoft:hover {
    background: #005a9e;
}

.ms-code-display {
    font-family: monospace, monospace;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: #22c55e;
    background: rgba(0, 0, 0, 0.4);
    border: 2px dashed #22c55e;
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin: 1rem auto;
    width: fit-content;
    user-select: all;
}

.account-link-subform {
    margin-top: 0.5rem;
}

/* --- GALERIE COMMUNAUTAIRE DE SKINS --- */
.gallery-hero-card {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.gallery-hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.gallery-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filter-pills {
    display: flex;
    gap: 0.5rem;
}

.pill-btn {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-main);
}

.pill-btn.active {
    background: var(--primary);
    color: #0c0e12;
    border-color: var(--primary);
    font-weight: 700;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.gallery-skin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.gallery-skin-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-highlight);
}

.gallery-skin-preview-box {
    width: 100%;
    height: 180px;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.gallery-skin-img {
    height: 80%;
    image-rendering: pixelated;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.gallery-skin-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.gallery-skin-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.gallery-skin-author {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.gallery-skin-desc {
    font-size: 0.8rem;
    color: var(--text-dark);
    margin-top: 0.25rem;
    line-height: 1.3;
    flex: 1;
}

.gallery-skin-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    gap: 0.5rem;
}

.btn-like {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-like:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--danger);
}

