/* ======================= */
/* ESTILOS BASE - AMIGOS */
/* ======================= */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #e0e0e0;
    color: #14171a;
    transition: background-color 0.5s, color 0.5s;
}

body.modo-oscuro {
    background-color: #1d1c1c;
    color: #ffffff;
}

/* Header */
header {
    background-color: #1DA1F2;
    color: #fff;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.contenedor-quimii {
    flex: 1;
    display: flex;
    justify-content: center;
}

.Quimii {
    width: 50px;
    transform: scale(2.0);
    transform-origin: center center;
    filter: none;
    transition: filter 0.25s ease;
}

body.modo-oscuro .Quimii {
    filter: brightness(0) invert(1) !important;
}

html.tema-oscuro-init .Quimii {
    filter: brightness(0) invert(1) !important;
}

.header-center {
    flex: 2;
    display: flex;
    justify-content: center;
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    width: 300px;
}

.search-bar i {
    color: white;
    margin-right: 10px;
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: white;
    font-size: 14px;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.header-btn {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.header-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* ======================= */
/* CONTENIDO PRINCIPAL */
/* ======================= */
.amigos-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.friends-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.friends-tab {
    border: 1px solid rgba(29, 161, 242, 0.4);
    background: rgba(29, 161, 242, 0.1);
    color: #1DA1F2;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.friends-tab:hover {
    background: rgba(29, 161, 242, 0.2);
}

.friends-tab.active {
    background: #1DA1F2;
    color: #fff;
    border-color: #1DA1F2;
}

.friends-section {
    margin-bottom: 40px;
}

.friends-section h2 {
    color: #1DA1F2;
    border-bottom: 2px solid #1DA1F2;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

body.modo-oscuro .friends-section h2 {
    color: #0d8ddb;
    border-bottom-color: #0d8ddb;
}

/* ======================= */
/* GRID DE AMIGOS */
/* ======================= */
.friends-grid,
.suggestions-grid,
.requests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.friend-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    position: relative;
}

body.modo-oscuro .friend-card {
    background: #2d2d2d;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.friend-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.friend-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #1DA1F2;
    margin-bottom: 10px;
}

.friend-name {
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0 5px 0;
    color: #14171a;
}

body.modo-oscuro .friend-name {
    color: #ffffff;
}

.friend-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 5px 0;
    font-size: 14px;
}

.status-online {
    color: #00ba7c;
}

.status-offline {
    color: #657786;
}

.friend-relation {
    margin: 6px 0 2px;
}

.friend-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.friend-badge-amigo {
    color: #0b6b3b;
    background: rgba(0, 186, 124, 0.16);
    border: 1px solid rgba(0, 186, 124, 0.35);
}

.friend-badge-seguir {
    color: #1DA1F2;
    background: rgba(29, 161, 242, 0.14);
    border: 1px solid rgba(29, 161, 242, 0.35);
}

.status-away {
    color: #f59e0b;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-online .status-dot {
    background: #00ba7c;
}

.status-offline .status-dot {
    background: #ccc;
}

.status-away .status-dot {
    background: #f59e0b;
}

.friend-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.friend-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-chat {
    background: #1DA1F2;
    color: white;
}

.btn-chat:hover {
    background: #0d8ddb;
}

.btn-profile {
    background: #657786;
    color: white;
}

.btn-profile:hover {
    background: #545b62;
}

.btn-remove {
    background: #e74c3c;
    color: white;
}

.btn-remove:hover {
    background: #c0392b;
}

/* ======================= */
/* SUGERENCIAS */
/* ======================= */
.suggestion-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

body.modo-oscuro .suggestion-card {
    background: #2d2d2d;
}

.suggestion-stats {
    font-size: 12px;
    color: #657786;
    margin: 10px 0;
}

body.modo-oscuro .suggestion-stats {
    color: #888;
}

.btn-follow {
    background: #00ba7c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}

.btn-follow:hover {
    background: #00a371;
}

/* ======================= */
/* SOLICITUDES */
/* ======================= */
.request-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

body.modo-oscuro .request-card {
    background: #2d2d2d;
}

.request-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-accept {
    background: #00ba7c;
    color: white;
}

.btn-accept:hover {
    background: #00a371;
}

.btn-decline {
    background: #e74c3c;
    color: white;
}

.btn-decline:hover {
    background: #c0392b;
}

/* ======================= */
/* MODAL */
/* ======================= */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

body.modo-oscuro .modal-content {
    background-color: #2d2d2d;
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
}

.close-modal:hover {
    color: #000;
}

body.modo-oscuro .close-modal:hover {
    color: #fff;
}

/* ======================= */
/* RESPONSIVE */
/* ======================= */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 10px;
    }

    .search-bar {
        width: 100%;
        max-width: 300px;
    }

    .friends-grid,
    .suggestions-grid,
    .requests-grid {
        grid-template-columns: 1fr;
    }

    .friend-actions {
        flex-direction: column;
    }
}

.loading {
    text-align: center;
    padding: 20px;
    color: #657786;
}

body.modo-oscuro .loading {
    color: #888;
}

.suggestion-reasons {
    font-size: 12px;
    color: #657786;
    margin-top: 8px;
    line-height: 1.4;
    min-height: 34px;
}

body.modo-oscuro .suggestion-reasons {
    color: #b1b6bb;
}

.btn-follow-suggested {
    background: #1DA1F2;
    color: #fff;
}

.btn-follow-suggested:hover {
    background: #0d8ddb;
}
