/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #ffeef8 0%, #f0f4ff 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: linear-gradient(to right, #ff4d94, #ff6b6b);
    color: white;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(255, 77, 148, 0.2);
    text-align: center;
}

.logo {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Auth Section */
.auth-container {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.auth-form {
    flex: 1;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    background: white;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    overflow: hidden;
}

.tab {
    flex: 1;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    border-bottom: 4px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tab:hover {
    background: #f8f9fa;
}

.tab.active {
    color: #ff4d94;
    border-bottom: 4px solid #ff4d94;
    background: linear-gradient(to bottom, transparent, rgba(255, 77, 148, 0.05));
}

.tab-badge {
    background: #ff4d94;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* Main Content Layout */
.content {
    display: flex;
    gap: 30px;
}

.main-content {
    flex: 2;
}

.side-content {
    flex: 1;
}

/* Card Design */
.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
}

.card-title {
    color: #ff4d94;
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Form Sections */
.form-section {
    display: none;
    animation: fadeIn 0.5s;
}

.form-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.required::after {
    content: " *";
    color: #ff4d4d;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
    background: #fcfcfc;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: #ff4d94;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 77, 148, 0.1);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* Message Types */
.message-types {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.message-type {
    padding: 20px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    background: white;
}

.message-type:hover {
    transform: translateY(-5px);
    border-color: #ff85b3;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.message-type.selected {
    border-color: #ff4d94;
    background: linear-gradient(135deg, rgba(255, 77, 148, 0.05), rgba(255, 107, 107, 0.05));
}

.type-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #ff4d94;
}

.type-title {
    font-weight: 600;
    margin-bottom: 5px;
}

/* Receiver Methods */
.receiver-methods {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.receiver-method {
    flex: 1;
    padding: 15px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.receiver-method:hover {
    border-color: #ff4d94;
}

.receiver-method.selected {
    border-color: #ff4d94;
    background: rgba(255, 77, 148, 0.05);
}

/* Buttons */
.btn {
    background: linear-gradient(to right, #ff4d94, #ff6b6b);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(255, 77, 148, 0.3);
}

.btn-preview {
    background: #4dabf7;
}

.btn-secondary {
    background: #6c757d;
}

.btn-group {
    display: flex;
    gap: 15px;
}

/* Preview Section */
.preview-section {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 25px;
    margin-top: 25px;
    border: 2px dashed #c3c8ff;
    display: none;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e5ff;
}

.preview-title {
    color: #4dabf7;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-content {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.preview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
}

.preview-subject {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ff4d94;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.preview-body {
    line-height: 1.8;
    color: #444;
    white-space: pre-wrap;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 20px;
}

.preview-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    color: #888;
    font-size: 0.9rem;
}

/* Inbox Styles */
.inbox-container {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.message-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 5px solid #ff4d94;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.message-item:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.message-sender {
    font-weight: 600;
    color: #ff4d94;
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-time {
    color: #888;
    font-size: 0.9rem;
}

.message-type-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 77, 148, 0.1);
    color: #ff4d94;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.message-subject {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.message-preview {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.facebook-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1877f2;
    text-decoration: none;
    padding: 8px 15px;
    background: rgba(24, 119, 242, 0.1);
    border-radius: 8px;
    margin-top: 10px;
}

.facebook-link:hover {
    background: rgba(24, 119, 242, 0.2);
}

.message-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.reply-btn {
    background: #ff4d94;
    color: white;
}

.delete-btn {
    background: #f8f9fa;
    color: #666;
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, rgba(77, 255, 136, 0.1), rgba(77, 195, 255, 0.1));
    border: 2px solid #4dff88;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    display: none;
    margin-top: 20px;
}

.success-icon {
    font-size: 3rem;
    color: #4dff88;
    margin-bottom: 15px;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-left: 5px solid #ff4d94;
    display: none;
    z-index: 1000;
    max-width: 350px;
    animation: slideIn 0.5s;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.notification-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #ff4d94;
}

.notification-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-icon {
    font-size: 4rem;
    color: #e8e8e8;
    margin-bottom: 20px;
}

/* Profile */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4d94, #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
}

.profile-info h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.profile-info p {
    color: #666;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
}

.info-label {
    font-weight: 600;
    color: #555;
    min-width: 120px;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
}

.auth-tab {
    padding: 15px 30px;
    cursor: pointer;
    font-weight: 600;
    border-bottom: 3px solid transparent;
}

.auth-tab.active {
    color: #ff4d94;
    border-bottom: 3px solid #ff4d94;
}

.forgot-password {
    text-align: center;
    margin-top: 15px;
}

.forgot-password a {
    color: #ff4d94;
    text-decoration: none;
    cursor: pointer;
}

.forgot-password a:hover {
    text-decoration: underline;
}

/* Reset Options */
.reset-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.reset-option {
    flex: 1;
    padding: 15px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.reset-option.selected {
    border-color: #ff4d94;
    background: rgba(255, 77, 148, 0.05);
}

/* Edit Profile */
.edit-profile-form {
    display: none;
}

.edit-profile-form.active {
    display: block;
}

/* Footer */
footer {
    background: linear-gradient(to right, #ff4d94, #ff6b6b);
    color: white;
    margin-top: 40px;
    border-radius: 20px;
    padding: 40px 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-column {
    flex: 1;
    min-width: 250px;
}

.footer-column h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-column ul {
    list-style: none;
    line-height: 1.8;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    color: white;
    text-decoration: none;
}

.footer-column a:hover {
    text-decoration: underline;
}

.copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* Help Popup */
.help-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    color: #333;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    z-index: 1001;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

/* Responsive */
@media (max-width: 992px) {
    .content {
        flex-direction: column;
    }
    
    .message-types {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .auth-container {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav-tabs {
        flex-direction: column;
    }
    
    .tab {
        padding: 15px;
    }
    
    .message-types {
        grid-template-columns: 1fr;
    }
    
    .receiver-methods {
        flex-direction: column;
    }
    
    .reset-options {
        flex-direction: column;
    }
    
    .preview-meta {
        flex-direction: column;
        gap: 10px;
    }
}

/* Form reset password riêng */
#password-reset-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#password-reset-form .form-description {
    color: #666;
    margin-bottom: 20px;
    text-align: center;
}

#password-reset-form .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

#password-reset-form .btn {
    flex: 1;
}

#password-reset-form {
    animation: fadeIn 0.5s ease;
}

.form-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#password-reset-form .form-container {
    animation: fadeInUp 0.5s ease-out;
}

@media (max-width: 768px) {
    #password-reset-form .form-container {
        margin: 20px;
        padding: 30px 20px !important;
    }
}