/* Friends Page - Clean Modern Design */

/* Override body styles for friends page */
body {
    overflow-y: auto !important;
    max-height: none !important;
    background: linear-gradient(135deg, #454343 0%, #000000 100%) !important;
    background-attachment: fixed !important;
    min-height: 100vh;
}

.friends-wrapper {
    width: 100%;
    min-height: 100vh;
    padding: 6rem 0 2rem 0;
}

.friends-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem 2rem;
}

/* Header */
.friends-header {
    text-align: center;
    margin-bottom: 3rem;
}

.friends-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ff6b00, #ff8c3a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.friends-header .subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    background: var(--card-bg);
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.tab-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.tab-btn i {
    width: 20px;
    height: 20px;
}

/* Tab Content */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Section */
.section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
}

.section.pending-section.hidden {
    display: none;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.section-header h2 i {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.badge {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.search-box i {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.search-box input {
    flex: 1;
    border: none;
    background: none;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

/* Section Content */
.section-content {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
}

.section-content::-webkit-scrollbar {
    width: 8px;
}

.section-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 8px;
}

.section-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 8px;
}

.section-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Friends Grid */
.friends-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Friend Card */
.friend-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.friend-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.15);
    transform: translateY(-2px);
}

/* Avatar */
.friend-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.friend-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Friend Info */
.friend-info {
    flex: 1;
    min-width: 0;
}

.friend-name {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2ecc71;
    box-shadow: 0 0 8px #2ecc71;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.friend-email {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.friend-email i {
    width: 14px;
    height: 14px;
}

.friend-stats {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stat-badge i {
    width: 14px;
    height: 14px;
    color: var(--primary-color);
}

.stat-badge strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Actions */
.friend-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn i {
    width: 18px;
    height: 18px;
}

.btn-accept {
    background: #2ecc71;
    color: white;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
}

.btn-accept:hover {
    background: #27ae60;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
}

.btn-decline {
    background: #e74c3c;
    color: white;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.btn-decline:hover {
    background: #c0392b;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.btn-remove {
    padding: 0.65rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-remove:hover {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
    transform: rotate(90deg) scale(1.1);
}

.btn-add {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
}

.btn-add:hover {
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.4);
}

.btn-pending {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1.05rem;
}

/* Responsive */
@media (max-width: 768px) {
    .friends-container {
        padding: 0 1rem 3rem 1rem;
    }

    .friends-header h1 {
        font-size: 2rem;
    }

    .tab-btn span {
        display: none;
    }

    .section {
        padding: 1.5rem;
    }

    .section-content {
        max-height: 500px;
    }

    .friend-card {
        gap: 1rem;
    }

    .friend-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .friend-actions {
        flex-direction: column;
    }

    .btn {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }
}
