/* Main Color Palette */
:root {
    --primary-color: #4A90E2;
    --secondary-color: #50C878;
    --accent-color: #FFB84D;
    --danger-color: #E74C3C;
    --dark-color: #2C3E50;
    --light-color: #ECF0F1;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #2C3E50;
}

/* Container text color - Force dark text on white backgrounds */
.container {
    color: #2C3E50 !important;
}

.container h1, .container h2, .container h3, .container h4, .container h5, .container h6 {
    color: #2C3E50 !important;
}

.container p {
    color: #2C3E50 !important;
}

.container .lead {
    color: #2C3E50 !important;
}

/* Auth Pages */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-icon {
    width: 80px;
    height: 80px;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
    color: white;
    padding: 10px;
}

.auth-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    /* filter: brightness(0) invert(1); */
}

.form-control {
    padding: 12px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.input-group-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px 0 0 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-secondary {
    background: #ecf0f1;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    color: #2C3E50;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-danger {
    background: #dc3545;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Navbar */
.navbar {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 24px;
    transition: transform 0.3s ease;
    color: white !important;
    display: flex;
    align-items: center;
}

.navbar-brand:hover {
    transform: translateY(-2px);
    color: white !important;
}

.navbar-brand * {
    color: white !important;
}

.navbar-logo {
    max-height: 100px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* .navbar-logo:hover {
    transform: scale(1.1);
} */

.brand-text {
    display: inline-block;
    color: white !important;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    color: white !important;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    color: white !important;
}

.nav-link i {
    color: white !important;
}

.nav-link .badge {
    color: #667eea !important;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
}

.nav-link .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* User Dropdown */
.user-dropdown {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem !important;
    border-radius: 25px;
    transition: all 0.3s ease;
    color: white !important;
}

.user-dropdown:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: white !important;
}

.user-dropdown span {
    color: white !important;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: white;
    color: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.user-avatar-large {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 auto;
}

.dropdown-menu {
    border-radius: 15px;
    border: none;
    padding: 1rem;
    min-width: 250px;
    margin-top: 0.5rem;
}

.dropdown-header {
    padding: 0.5rem 0;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 0.5rem;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.dropdown-item i {
    width: 20px;
}

/* Button styles in navbar */
.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.btn-outline-light:hover {
    /* background: white; */
    color: #667eea;
    border-color: white;
}

/* Dashboard */
.container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.container-login-resgister {
    background-image: url("/static/images/image/Background_sizeLon.png");
    background-size: cover;        /* phủ kín div */
    background-position: center;   /* căn giữa */
    background-repeat: no-repeat;
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

body > .container {
    color: #2C3E50;
}

.welcome-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 40px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.welcome-section h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: white !important;
}

.welcome-section h1 * {
    color: white !important;
}

.welcome-section .lead {
    color: white !important;
}

.welcome-section p {
    color: white !important;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
}

.stat-icon.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: #2C3E50 !important;
}

.stat-content p {
    margin: 0;
    color: #7f8c8d !important;
}

/* Scenario Cards */
.scenario-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    color: #2C3E50 !important;
    overflow: hidden;
}

.scenario-card * {
    color: #2C3E50 !important;
}

.scenario-card strong {
    color: #2C3E50 !important;
}

.scenario-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.scenario-image-container {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
}

.scenario-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.scenario-card:hover .scenario-image {
    transform: scale(1.05);
}

.difficulty-badge-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.difficulty-badge-overlay .badge {
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.scenario-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.scenario-header {
    margin-bottom: 15px;
}

.scenario-header h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2C3E50 !important;
    margin: 0;
}

.scenario-description {
    color: #7f8c8d !important;
    margin-bottom: 20px;
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.5;
}

.scenario-roles {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.role {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #2C3E50 !important;
}

.role:last-child {
    margin-bottom: 0;
}

.role i {
    color: #667eea;
    margin-right: 5px;
}

/* Role Play Chat */
.role-play-container {
    background: white;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.scenario-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.role-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 15px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.role-badge i {
    font-size: 24px;
}

.role-badge small {
    display: block;
    opacity: 0.8;
    font-size: 0.75rem;
}

.role-badge strong {
    display: block;
    font-size: 1rem;
}

.chat-container {
    height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.welcome-message {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
}

.welcome-message i {
    font-size: 30px;
    margin-bottom: 10px;
}

.message {
    margin-bottom: 15px;
    display: flex;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-content {
    padding: 12px 18px;
    border-radius: 15px;
    max-width: 70%;
    word-wrap: break-word;
}

.user-message {
    justify-content: flex-end;
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 5px;
}

.ai-message {
    justify-content: flex-start;
}

.ai-message .message-content {
    background: white;
    color: #2C3E50;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.speak-btn {
    padding: 5px 10px;
    margin-left: 10px;
    color: #667eea;
    text-decoration: none;
}

.speak-btn:hover {
    color: #764ba2;
}

.typing-indicator .message-content {
    display: flex;
    gap: 5px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

.input-container {
    padding: 20px;
    background: white;
    border-top: 2px solid #e0e0e0;
}

/* Evaluation */
.evaluation-result {
    text-align: center;
}

.overall-score {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.overall-score h2 {
    font-size: 3rem;
    margin: 0;
    font-weight: 700;
}

.overall-score p {
    margin: 0;
    opacity: 0.9;
}

.score-item {
    text-align: left;
}

.score-item label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.progress {
    height: 30px;
    border-radius: 15px;
    background: #e0e0e0;
}

.progress-bar {
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* History */
.history-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.history-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.history-header h5 {
    margin: 0;
    color: #2C3E50;
}

.history-info {
    display: flex;
    justify-content: space-between;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.chat-history {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
}

/* Scenario Sidebar for Conversation Details */
.scenario-sidebar {
    position: sticky;
    top: 20px;
}

.scenario-detail-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.scenario-detail-image:hover {
    transform: scale(1.02);
}

.scenario-image-container {
    position: relative;
    margin-bottom: 20px;
}

.difficulty-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.difficulty-overlay .badge {
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.scenario-info-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.scenario-title {
    color: #2C3E50;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.scenario-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.roles-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
}

.role-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.role-item:last-child {
    margin-bottom: 0;
}

.role-item i {
    margin-right: 8px;
    width: 16px;
}

.role-item span {
    color: #2C3E50;
}

/* Responsive */
@media (max-width: 768px) {
    .welcome-section h1 {
        font-size: 1.8rem;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .chat-container {
        height: 400px;
    }
    
    .scenario-sidebar {
        position: static;
        margin-bottom: 20px;
    }
    
    .scenario-detail-image {
        height: 150px;
    }
    
    .scenario-info-card {
        padding: 15px;
    }
}

/* Scrollbar */
.chat-container::-webkit-scrollbar {
    width: 8px;
}

.chat-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chat-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}
