/* AI-900 Practice System Styles */

/* Global Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f7fa;
}

/* Container */
.container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px;
    width: 100%;
}

/* Header and Navigation */
header {
    background-color: #0078d4;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

nav .logo {
    font-size: 1.25rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
    white-space: nowrap;
    margin-right: 15px;
    flex-shrink: 0;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.2rem;
    flex-wrap: nowrap;
    overflow: visible;
    margin: 0 !important;
    padding: 0;
}

/* 针对管理员页面的导航微调 */
.admin-page nav ul {
    gap: 0.3rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    white-space: nowrap;
}

.admin-page nav ul li a {
    padding: 0.4rem 0.5rem;
}

nav ul li a:hover {
    background-color: rgba(255,255,255,0.2);
}

nav ul li a.active {
    background-color: rgba(255,255,255,0.3);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 20px;
    min-height: calc(100vh - 140px);
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* 登录/注册页面的卡片特殊样式 */
.auth-container .card {
    max-width: 420px;
    margin: 0 auto 2rem;
    padding: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    text-align: left;
    direction: ltr;
}

textarea {
    text-align: left !important;
    text-align-last: left !important;
    direction: ltr;
    white-space: normal;
    word-wrap: break-word;
}

#question_text, #explanation {
    text-align: left !important;
    text-align-last: left !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    white-space: normal;
    word-wrap: break-word;
}

.dropdown-select {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    margin: 0.5rem 0;
    background-color: white;
    width: 100%;
    max-width: 200px;
    display: inline-block;
    vertical-align: middle;
}

.fill-in-item {
    display: inline-block;
    margin: 0 0.2rem;
    vertical-align: middle;
}

.question-content-with-dropdowns {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 1rem;
}

.fill-in-placeholder {
    color: #666;
    font-style: italic;
    padding: 0.5rem;
    border-bottom: 1px dashed #ccc;
    margin: 0 0.2rem;
}

.question-image {
  margin: 1rem 0;
  text-align: center;
}

.question-image img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0078d4;
    box-shadow: 0 0 0 2px rgba(0,120,212,0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary { background-color: #0078d4; color: white; }
.btn-primary:hover { background-color: #005a9e; transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0,120,212,0.3); }
.btn-secondary { background-color: #6c757d; color: white; }
.btn-secondary:hover { background-color: #545b62; }
.btn-success { background-color: #28a745; color: white; }
.btn-success:hover { background-color: #218838; }
.btn-danger { background-color: #dc3545; color: white; }
.btn-danger:hover { background-color: #c82333; }
.btn-block { display: block; width: 100%; }

/* Alerts */
.alert { padding: 1rem; border-radius: 4px; margin-bottom: 1.5rem; border-left: 4px solid; }
.alert-success { background-color: #d4edda; color: #155724; border-left-color: #28a745; }
.alert-danger { background-color: #f8d7da; color: #721c24; border-left-color: #dc3545; }
.alert-info { background-color: #d1ecf1; color: #0c5460; border-left-color: #17a2b8; }
.alert-warning { background-color: #fff3cd; color: #856404; border-left-color: #ffc107; }

/* Typography */
h1, h2, h3, h4, h5, h6 { margin-bottom: 1rem; font-weight: 600; color: #2c3e50; }
h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1rem; }

/* Lists */
ul, ol { margin-bottom: 1rem; margin-left: 1.5rem; }

/* Dashboard Styles */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.dashboard-card { background: white; padding: 1.5rem; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); text-align: center; }
.dashboard-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; color: #555; }
.dashboard-card .metric { font-size: 2rem; font-weight: bold; color: #0078d4; }

/* Practice Page Styles */
.question-card { background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); margin-bottom: 2rem; }
.question-text { font-size: 1.1rem; margin-bottom: 1.5rem; line-height: 1.6; }
.option-item { margin-bottom: 1rem; padding: 1rem; border: 2px solid #e0e0e0; border-radius: 6px; cursor: pointer; transition: all 0.3s ease; }
.option-item:hover { border-color: #0078d4; background-color: #f0f7ff; }
.option-item.selected { border-color: #0078d4; background-color: #e6f3ff; }
.option-item.correct { border-color: #28a745; background-color: #d4edda; }
.option-item.incorrect { border-color: #dc3545; background-color: #f8d7da; }

/* Explanation Content Styles */
.question-explanation { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; color: #333; }
.question-explanation .option-item { margin: 0.8rem 0; padding: 0.8rem; border-left: 4px solid #ccc; background-color: #f9f9f9; }
.question-explanation .option-item.correct { border-left-color: #28a745; background-color: #e6f4ea; }
.question-explanation .option-item.incorrect { border-left-color: #dc3545; background-color: #f8d7da; }
.question-explanation .concept-table { width: 100%; border-collapse: collapse; margin: 1rem 0; background: white; }
.question-explanation .concept-table th, .question-explanation .concept-table td { border: 1px solid #ddd; padding: 0.8rem; text-align: left; }
.question-explanation .concept-table th { background-color: #f8f9fa; font-weight: 600; }
.question-explanation .status-correct { color: #28a745; font-weight: bold; background: #e6f4ea; padding: 2px 6px; border-radius: 4px; }
.question-explanation .status-wrong { color: #dc3545; font-weight: bold; background: #fdeaea; padding: 2px 6px; border-radius: 4px; }
.question-explanation .tip-box { background-color: #e7f3ff; border-left: 4px solid #007bff; padding: 1rem; margin-top: 1rem; border-radius: 0 4px 4px 0; }

/* Progress Bar */
.progress-container { margin-bottom: 2rem; }
.progress-bar { width: 100%; height: 20px; background-color: #e0e0e0; border-radius: 10px; overflow: hidden; margin-bottom: 0.5rem; }
.progress-fill { height: 100%; background-color: #0078d4; border-radius: 10px; transition: width 0.5s ease; }
.progress-text { text-align: center; font-size: 0.9rem; color: #666; }

/* Auth Container - 登录/注册表单容器 */
.auth-container {
    max-width: 420px;
    margin: 0 auto;
}

/* Footer */
footer { background-color: #2c3e50; color: white; padding: 1.5rem 0; text-align: center; margin-top: 2rem; }

/* 允许 SDK 原生气泡显示 */
.coze-chat-sdk-bubble-container {
    display: block !important;
    z-index: 2147483647 !important;
}