:root {
    --primary-color: #FF7A00;
    /* Cam chủ đạo */
    --secondary-color: #007BFF;
    /* Xanh dương điểm nhấn */
    --bg-light: #F8F9FA;
    --text-dark: #333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #333;
    /* Nền tối cho desktop để nổi bật khung mobile */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Khung Mobile Cố Định */
.mobile-container {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background-color: var(--bg-light);
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

/* Header mượt mà */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.content-body {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 90px;
    /* Tránh bị đè bởi Bottom Nav */
}

/* Form & Bộ lọc kiểu Hiện đại */
.filter-section {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.tabs {
    display: flex;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: #E0E0E0;
    cursor: pointer;
    font-weight: bold;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.form-control {
    width: 100%;
    padding: 10px;
    margin: 5px 0 10px;
    border: 1px solid #DDD;
    border-radius: 8px;
}

.btn-search {
    width: 100%;
    padding: 12px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
}

/* Thẻ bài đăng danh sách */
.post-card {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 12px;
}

.avatar-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.post-info {
    flex: 1;
}

.badge-tag {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    background: #FFF0E0;
    color: var(--primary-color);
    margin-right: 5px;
}

.badge-blue {
    background: #E6F0FA;
    color: var(--secondary-color);
}

/* Bottom Navigation Bar chuẩn App */
.bottom-nav {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60px;
    background: white;
    display: flex;
    border-top: 1px solid #EEE;
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #777;
    text-decoration: none;
    font-size: 0.8rem;
}

.nav-item.active {
    color: var(--primary-color);
}

/* Toast Notification System */
.toast-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 90%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    border-left: 4px solid #28a745;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-icon {
    font-size: 1.1rem;
}

/* Card Styling for forms */
.auth-card, .post-form-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 1.15rem;
    font-weight: 700;
    border-bottom: 2px solid #F0F0F0;
    padding-bottom: 8px;
}

.auth-desc {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

.btn-orange {
    background: var(--primary-color) !important;
}

.btn-orange:hover {
    background: #e06c00 !important;
}

/* Profile Card Styling */
.profile-card {
    background: white;
    padding: 25px 20px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    animation: fadeIn 0.4s ease;
}

.profile-header {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
}

.profile-header h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-major {
    font-size: 0.85rem;
    color: #666;
}

.profile-details {
    background: #F8F9FA;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #EFEFEF;
    font-size: 0.9rem;
    color: #444;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    color: #555;
}

.detail-item a {
    text-decoration: none;
    font-weight: 600;
}

/* Fix mobile height scroll and screen transitions */
.mobile-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    max-height: 100vh;
}

.screen-view {
    animation: fadeIn 0.3s ease;
}

.auth-card a:hover {
    text-decoration: underline !important;
}