/* ============================================================
   PROFILE.CSS - Dùng chung cho profile.html, favorites.html, history.html
   ============================================================ */

.profile-page,
.list-page {
    padding: 40px 24px 60px;
    min-height: 60vh;
}

/* ================= GUARD (chưa đăng nhập) ================= */
.profile-guard {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}
.profile-guard p {
    margin-bottom: 18px;
    font-size: 15px;
}

/* ================= PROFILE HEADER ================= */
.profile-header {
    display: flex;
    align-items: center;
    gap: 22px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 26px 28px;
    margin-bottom: 28px;
}

.profile-header img {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.profile-header__info {
    flex: 1;
}

.profile-header__info h1 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
}

.profile-joined {
    color: var(--text-secondary);
    font-size: 13px;
}

/* ================= STATS ================= */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 22px;
    text-align: center;
}

.stat-card__value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 6px;
}

.stat-card__label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ================= EDIT FORM ================= */
.profile-edit {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 26px 28px;
    margin-bottom: 32px;
}

.profile-edit h2 {
    font-size: 17px;
    margin-bottom: 18px;
}

.profile-edit form {
    max-width: 420px;
}

/* ================= SHORTCUTS ================= */
.profile-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.shortcut-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 22px;
    transition: all var(--transition);
}
.shortcut-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}
.shortcut-card h3 {
    margin-bottom: 6px;
    font-size: 16px;
}
.shortcut-card p {
    color: var(--text-secondary);
    font-size: 13px;
}

/* ================= LIST PAGE HEADER (favorites/history) ================= */
.list-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.list-page__header h1 {
    font-size: 24px;
    font-weight: 800;
}

/* ================= FAVORITE CARD (with remove button) ================= */
.fav-card {
    position: relative;
}

.fav-remove-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    opacity: 0;
    transition: all var(--transition);
}
.movie-card:hover .fav-remove-btn {
    opacity: 1;
}
.fav-remove-btn:hover {
    background-color: var(--primary);
}

/* ================= HISTORY LIST ================= */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    transition: border-color var(--transition);
}
.history-item:hover {
    border-color: var(--primary);
}

.history-item img {
    width: 60px;
    height: 88px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
}

.history-item__info {
    flex: 1;
    cursor: pointer;
}

.history-item__info h3 {
    font-size: 15px;
    margin-bottom: 6px;
}

.history-item__info span {
    font-size: 12px;
    color: var(--text-secondary);
}

.history-item__actions {
    display: flex;
    gap: 8px;
}

.history-delete-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.06);
    font-size: 14px;
    transition: all var(--transition);
}
.history-delete-btn:hover {
    background-color: var(--primary);
    color: #fff;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

@media (max-width: 700px) {
    .profile-header { flex-direction: column; text-align: center; }
    .profile-stats { grid-template-columns: 1fr; }
    .profile-shortcuts { grid-template-columns: 1fr; }
    .history-item { flex-wrap: wrap; }
}
