.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 223, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 223, 0, 0.4);
    border-radius: 50px;
    text-decoration: none;
    color: #ffdf00;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-button:hover {
    transform: translateX(-5px) scale(1.05);
    background: rgba(255, 223, 0, 0.3);
    box-shadow: 0 6px 20px rgba(255, 223, 0, 0.5);
}

.back-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.back-button:hover .back-icon {
    transform: translateX(-3px);
}

.friends {
    padding: 60px 40px;
    animation: fadeInUp 1s ease 0.3s both;
}

.coming-soon-note {
    text-align: center;
    margin-top: 40px;
    font-size: 0.95rem;
    color: #6b7280;
    font-style: italic;
    opacity: 0.7;
}

.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 0 20px;
}

.friend-card {
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(10px);
    padding: 35px;
    border-radius: 25px;
    border: 2px solid rgba(255, 223, 0, 0.3);
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInScale 0.6s ease forwards;
}

.friend-card:nth-child(1) { animation-delay: 0.1s; }
.friend-card:nth-child(2) { animation-delay: 0.2s; }
.friend-card:nth-child(3) { animation-delay: 0.3s; }
.friend-card:nth-child(4) { animation-delay: 0.4s; }
.friend-card:nth-child(5) { animation-delay: 0.5s; }
.friend-card:nth-child(6) { animation-delay: 0.6s; }

.friend-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ffdf00 0%, #ff6b6b 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.friend-card:hover::before {
    transform: scaleX(1);
}

.friend-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(255, 223, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 107, 107, 0.6);
    background: rgba(17, 24, 39, 0.8);
}

.friend-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    position: relative;
}

.avatar-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(255, 223, 0, 0.5);
    box-shadow: 0 0 30px rgba(255, 223, 0, 0.4);
    transition: all 0.4s ease;
    object-fit: cover;
}

.friend-card:hover .avatar-image {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 40px rgba(255, 223, 0, 0.6);
}

.discord-status-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid rgba(17, 24, 39, 0.9);
    z-index: 10;
}

.discord-status-badge.status-online {
    background: #3ba55d;
    box-shadow: 0 0 10px #3ba55d;
}

.discord-status-badge.status-idle {
    background: #faa81a;
    box-shadow: 0 0 10px #faa81a;
}

.discord-status-badge.status-dnd {
    background: #ed4245;
    box-shadow: 0 0 10px #ed4245;
}

.discord-status-badge.status-offline {
    background: #747f8d;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 223, 0, 0.3) 0%, rgba(255, 107, 107, 0.3) 100%);
    border: 3px solid rgba(255, 223, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: #ffdf00;
    text-shadow: 0 0 20px rgba(255, 223, 0, 0.8);
    box-shadow: 0 0 30px rgba(255, 223, 0, 0.4);
    transition: all 0.4s ease;
}

.friend-card:hover .avatar-placeholder {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 40px rgba(255, 223, 0, 0.6);
}

.friend-info {
    margin-bottom: 20px;
}

.friend-name {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffdf00 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.friend-username {
    font-size: 1.1rem;
    color: #9ca3af;
    margin-bottom: 5px;
    font-family: 'Courier New', monospace;
}

.friend-aka {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 5px;
    font-style: italic;
}

.friend-role {
    display: inline-block;
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(255, 223, 0, 0.3) 0%, rgba(255, 107, 107, 0.3) 100%);
    border: 1px solid rgba(255, 223, 0, 0.5);
    border-radius: 15px;
    font-size: 0.85rem;
    color: #ffdf00;
    font-weight: 600;
    margin-bottom: 8px;
    box-shadow: 0 2px 10px rgba(255, 223, 0, 0.3);
}

.friend-pronouns {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 223, 0, 0.2);
    border: 1px solid rgba(255, 223, 0, 0.4);
    border-radius: 20px;
    font-size: 0.9rem;
    color: #ffdf00;
    font-weight: 600;
    margin-top: 8px;
}

.friend-activity {
    margin-top: 12px;
    min-height: 24px;
}

.activity-text {
    font-size: 0.95rem;
    color: #9ca3af;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 223, 0, 0.2);
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.friend-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.friend-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 223, 0, 0.2);
    border: 2px solid rgba(255, 223, 0, 0.4);
    border-radius: 50%;
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.friend-link:hover {
    transform: scale(1.15) rotate(10deg);
    background: rgba(255, 223, 0, 0.3);
    box-shadow: 0 0 20px rgba(255, 223, 0, 0.6);
}

.friend-link-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
    opacity: 0.6;
}

body.light-mode .friend-card {
    background: rgba(255, 255, 255, 0.85);
    border: 2px solid rgba(255, 223, 0, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

body.light-mode .friend-username,
body.light-mode .friend-aka {
    color: #4a4a4a;
}

body.light-mode .friend-pronouns {
    background: rgba(255, 223, 0, 0.3);
    color: #ff6b6b;
}

body.light-mode .friend-role {
    background: linear-gradient(135deg, rgba(255, 223, 0, 0.4) 0%, rgba(255, 107, 107, 0.4) 100%);
    color: #ff6b6b;
}

body.light-mode .activity-text {
    color: #4a4a4a;
    background: rgba(255, 223, 0, 0.1);
}

body.light-mode .discord-status-badge {
    border-color: rgba(255, 255, 255, 0.9);
}

body.light-mode .coming-soon-note {
    color: #4a4a4a;
}

body.light-mode .back-button {
    background: rgba(255, 223, 0, 0.3);
    border: 2px solid rgba(255, 223, 0, 0.5);
    color: #ff6b6b;
}

body.light-mode .back-button:hover {
    background: rgba(255, 223, 0, 0.4);
}

@media (max-width: 768px) {
    .back-button {
        top: 15px;
        left: 15px;
        padding: 10px 16px;
        font-size: 1rem;
    }
    
    .back-text {
        display: none;
    }
    
    .back-icon {
        font-size: 1.8rem;
    }
    
    .friends {
        padding: 40px 20px;
    }
    
    .friends-grid {
        grid-template-columns: 1fr;
        margin: 0;
    }
    
    header {
        padding: 80px 20px 60px;
    }
    
    header h1 {
        font-size: 3rem;
    }
}
