:root {
    --bg-color: #0a0a0b;
    --card-bg: rgba(220, 38, 38, 0.05);
    --card-hover: rgba(220, 38, 38, 0.12);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent-color: #dc2626;
    --accent-hover: #b91c1c;
    --accent-glow: rgba(220, 38, 38, 0.4);
    --border-color: rgba(220, 38, 38, 0.2);
    --border-hover: rgba(220, 38, 38, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.bg-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(220, 38, 38, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(185, 28, 28, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(220, 38, 38, 0.05) 0%, transparent 70%);
    animation: glowPulse 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes glowPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.navbar {
    background: rgba(10, 10, 11, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.logo:hover {
    color: var(--accent-color);
}

.logo-icon {
    color: var(--accent-color);
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(185, 28, 28, 0.05) 100%);
    padding: 6px 18px 6px 6px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.user-pill:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.2);
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px;
    animation: fadeIn 0.6s ease-out;
    position: relative;
    z-index: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    margin-bottom: 50px;
    text-align: center;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #fff 0%, var(--accent-color) 50%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.header p {
    color: var(--text-secondary);
    font-size: 1.15rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.card {
    background: linear-gradient(145deg, rgba(220, 38, 38, 0.08) 0%, rgba(10, 10, 11, 0.9) 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    background: linear-gradient(145deg, rgba(220, 38, 38, 0.15) 0%, rgba(10, 10, 11, 0.95) 100%);
    border-color: var(--border-hover);
    box-shadow: 
        0 20px 40px -15px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(220, 38, 38, 0.15);
}

.card:hover::before {
    opacity: 1;
}

.guild-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a1b 0%, #0a0a0b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-secondary);
    overflow: hidden;
    border: 3px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.1);
}

.card:hover .guild-icon {
    border-color: var(--accent-color);
    box-shadow: 0 0 25px rgba(220, 38, 38, 0.3);
}

.guild-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guild-name {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn {
    padding: 12px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ef4444 0%, var(--accent-color) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

.btn-secondary {
    background: rgba(220, 38, 38, 0.1);
    color: white;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.2);
}

.logout-btn {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
}

.loader {
    color: var(--text-secondary);
    font-size: 1.1rem;
    grid-column: 1/-1;
    text-align: center;
    padding: 50px;
}

.loader i {
    color: var(--accent-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.stat-card {
    background: linear-gradient(145deg, rgba(220, 38, 38, 0.1) 0%, rgba(10, 10, 11, 0.9) 100%);
    border: 1px solid var(--border-color);
    padding: 28px;
    border-radius: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.15);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    margin-bottom: 5px;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 50px 0 25px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.section-title i {
    color: var(--accent-color);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.member-badge {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15) 0%, rgba(185, 28, 28, 0.1) 100%);
    color: #fca5a5;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 8px;
    border: 1px solid rgba(220, 38, 38, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.member-badge i {
    font-size: 0.75rem;
}

.card-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 30px 15px;
    }
}

/* Responsive Design */

/* Tablets et petits écrans (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        max-width: 900px;
        padding: 40px 20px;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .header p {
        font-size: 1rem;
    }
}

/* Tablettes en mode portrait (768px) */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
        flex-wrap: wrap;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
    
    .user-menu {
        gap: 10px;
    }
    
    .user-pill {
        padding: 5px 15px 5px 5px;
        font-size: 0.9rem;
    }
    
    .avatar {
        width: 30px;
        height: 30px;
    }
    
    .logout-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .header h1 {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }
    
    .header p {
        font-size: 0.95rem;
        padding: 0 10px;
    }
    
    .container {
        padding: 30px 15px;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        margin-bottom: 40px;
    }
    
    .stat-card {
        padding: 24px 20px;
    }
    
    .stat-value {
        font-size: 2.2rem;
    }
    
    .card {
        padding: 24px;
        gap: 18px;
    }
    
    .guild-icon {
        width: 80px;
        height: 80px;
        font-size: 1.3rem;
    }
    
    .guild-name {
        font-size: 1.15rem;
    }
    
    .btn {
        padding: 11px 24px;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.4rem;
        margin: 40px 0 20px 0;
    }
}

/* Smartphones (480px - 640px) */
@media (max-width: 640px) {
    .bg-glow {
        opacity: 0.7;
    }
    
    .navbar {
        padding: 0.85rem;
    }
    
    .logo {
        font-size: 1.2rem;
        gap: 8px;
    }
    
    .logo-icon {
        font-size: 1.3rem;
    }
    
    .user-pill {
        padding: 4px 12px 4px 4px;
        font-size: 0.85rem;
        gap: 8px;
    }
    
    .avatar {
        width: 28px;
        height: 28px;
        border-width: 1.5px;
    }
    
    .logout-btn {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }
    
    .header {
        margin-bottom: 35px;
    }
    
    .header h1 {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    
    .header p {
        font-size: 0.9rem;
    }
    
    .container {
        padding: 25px 12px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 35px;
    }
    
    .stat-card {
        padding: 20px;
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        gap: 15px;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        flex-shrink: 0;
    }
    
    .stat-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }
    
    .grid {
        gap: 15px;
    }
    
    .card {
        padding: 20px;
        gap: 15px;
        border-radius: 16px;
    }
    
    .guild-icon {
        width: 70px;
        height: 70px;
        font-size: 1.2rem;
        border-width: 2px;
    }
    
    .guild-name {
        font-size: 1.05rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
        border-radius: 10px;
    }
    
    .member-badge {
        padding: 5px 12px;
        font-size: 0.75rem;
        margin-top: 6px;
    }
    
    .section-title {
        font-size: 1.25rem;
        margin: 35px 0 18px 0;
        gap: 10px;
    }
    
    .card-actions {
        gap: 8px;
    }
}

/* Très petits smartphones (moins de 380px) */
@media (max-width: 380px) {
    .navbar {
        padding: 0.75rem;
        gap: 10px;
    }
    
    .logo {
        font-size: 1.1rem;
        gap: 6px;
    }
    
    .logo-icon {
        font-size: 1.2rem;
    }
    
    .user-pill {
        padding: 3px 10px 3px 3px;
        font-size: 0.8rem;
    }
    
    .avatar {
        width: 26px;
        height: 26px;
    }
    
    .logout-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .header p {
        font-size: 0.85rem;
    }
    
    .container {
        padding: 20px 10px;
    }
    
    .stat-card {
        padding: 18px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 18px;
        border-radius: 14px;
    }
    
    .guild-icon {
        width: 65px;
        height: 65px;
        font-size: 1.1rem;
    }
    
    .guild-name {
        font-size: 1rem;
    }
    
    .btn {
        padding: 9px 18px;
        font-size: 0.8rem;
    }
    
    .section-title {
        font-size: 1.15rem;
        margin: 30px 0 15px 0;
    }
}

/* Mode paysage pour smartphones */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        margin-bottom: 25px;
    }
    
    .header h1 {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }
    
    .header p {
        font-size: 0.85rem;
    }
    
    .container {
        padding: 20px 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        margin-bottom: 25px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .card {
        padding: 18px;
    }
    
    .guild-icon {
        width: 60px;
        height: 60px;
    }
    
    .section-title {
        margin: 25px 0 15px 0;
        font-size: 1.2rem;
    }
}