@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&family=Rock+Salt&display=swap');

/* GENERAL */
body {
    background-color: #2c3e50;
    font-family: 'Poppins', sans-serif;
    color: #ecf0f1;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 40px 20px;
    text-align: center;
}

/* HEADER */
header {
    background-color: #34495e;
    padding: 20px 0;
}

/* TABS */
.tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    margin-top: 5rem;
}

.tab-button {
    background-color: #34495e;
    color: #f39c12;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.tab-button.active, .tab-button:hover {
    background-color: #f39c12;
    color: #fff;
}

/* TAB CONTENT */
.tab-content {
    display: none;
}

.tab-content:not(.hidden) {
    display: block;
}

/* MAIN TITLE */
.main-title {
    font-family: 'Rock Salt', cursive;
    font-size: 40px;
    color: #f39c12;
    letter-spacing: 2px;
}

/* SEARCH INPUT */
.search-input {
    width: 100%;
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    font-size: 1.1rem;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
    transition: box-shadow 0.3s ease;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 15px #f39c12;
}

/* SEARCH RESULTS LIST */
.search-results {
    list-style: none;
    padding: 0;
    margin-top: 15px;
    max-height: 100%;
    overflow: visible; /* Sin scroll */
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* SEARCH RESULT ITEM (cada usuario) */
.search-result-item {
    background-color: #34495e;
    padding: 14px 20px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.search-result-item:hover {
    background-color: #f39c12;
    box-shadow: 0 6px 15px rgba(243, 156, 18, 0.7);
}

/* USERNAME TEXTO */
.username {
    font-weight: 600;
    font-size: 1.15rem;
    user-select: none;
}

/* BOTONES */
.add-friend-button,
.accept-friend-button,
.view-profile-button,
.remove-friend-button {
    border: none;
    color: white;
    padding: 8px 18px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    user-select: none;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.add-friend-button {
    background-color: #2ecc71;
    box-shadow: 0 3px 8px rgba(46, 204, 113, 0.6);
}

.add-friend-button:hover:not(:disabled) {
    background-color: #27ae60;
    transform: scale(1.05);
}

.add-friend-button:disabled {
    background-color: #95a5a6;
    cursor: default;
    box-shadow: none;
    transform: none;
}

.accept-friend-button {
    background-color: #3498db;
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.6);
}

.accept-friend-button:hover:not(:disabled) {
    background-color: #2980b9;
    transform: scale(1.05);
}

.accept-friend-button:disabled {
    cursor: default;
    box-shadow: none;
    transform: none;
    opacity: 0.7;
}

.view-profile-button,
.remove-friend-button {
    padding: 8px 14px;
    font-size: 0.9rem;
    margin-left: 8px;
}

.view-profile-button {
    background-color: #3498db;
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.6);
}

.view-profile-button:hover {
    background-color: #2980b9;
    transform: scale(1.05);
}

.remove-friend-button {
    background-color: #e74c3c;
    box-shadow: 0 3px 8px rgba(231, 76, 60, 0.6);
}

.remove-friend-button:hover {
    background-color: #c0392b;
    transform: scale(1.05);
}

/* MENSAJES DE ERROR O NO RESULTADOS */
.no-results, .error {
    color: #e74c3c;
    font-weight: 600;
    padding: 10px;
    background-color: #c0392b33;
    border-radius: 10px;
}

/* MEDIA QUERIES PARA RESPONSIVE */

@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
        gap: 15px;
        margin-top: 3rem;
    }

    .tab-button {
        width: 100%;
        font-size: 1.1rem;
        padding: 14px 10px;
    }

    .main-title {
        font-size: 32px;
    }

    .search-input {
        font-size: 1rem;
        padding: 10px 14px;
    }

    .search-result-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 16px;
        gap: 8px;
    }

    .username {
        font-size: 1rem;
    }

    .add-friend-button,
    .accept-friend-button,
    .view-profile-button,
    .remove-friend-button {
        font-size: 0.9rem;
        padding: 8px 12px;
        width: 100%;
        margin-left: 0;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 28px;
    }

    .tabs {
        margin-top: 2rem;
        gap: 10px;
    }

    .tab-button {
        font-size: 1rem;
        padding: 12px 8px;
    }

    .search-input {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .search-result-item {
        padding: 10px 14px;
    }

    .username {
        font-size: 0.9rem;
    }
}
