* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 35px 30px;
    text-align: center;
}

header h1 {
    font-size: 2.2em;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1em;
    opacity: 0.95;
}

main {
    padding: 30px;
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.step.completed .step-number {
    background: #28a745;
    color: white;
}

.step-label {
    font-size: 0.85em;
    color: #999;
    font-weight: 500;
}

.step.active .step-label {
    color: #667eea;
    font-weight: 600;
}

.step-line {
    width: 60px;
    height: 2px;
    background: #e0e0e0;
    margin: 0 15px;
    margin-bottom: 25px;
}

.input-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 25px;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-content h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.platform-card {
    background: white;
    padding: 20px 15px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.platform-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.platform-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.platform-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.platform-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.platform-desc {
    font-size: 0.8em;
    color: #666;
}

.btn-next, .btn-primary, .btn-secondary, .btn-success {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-next, .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.6);
}

.btn-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
    font-size: 0.95em;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea.form-control {
    resize: vertical;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.output-header h3 {
    margin-bottom: 0;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: #f0f0f0;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #667eea;
    transform: translateY(-2px);
}

.output-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    line-height: 1.9;
    font-size: 1.05em;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #333;
    min-height: 200px;
    border: 1px solid #e0e0e0;
}

.placeholder-text {
    color: #999;
    text-align: center;
    padding: 60px 0;
    font-style: italic;
}

.quality-check {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.quality-check h4 {
    margin-bottom: 15px;
    color: #333;
}

.quality-result {
    margin-bottom: 15px;
}

.quality-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
}

.quality-badge.pass {
    background: #d4edda;
    color: #155724;
}

.quality-badge.warning {
    background: #fff3cd;
    color: #856404;
}

.banned-words-list {
    margin-top: 10px;
}

.banned-word-item {
    display: inline-block;
    background: #f8d7da;
    color: #721c24;
    padding: 5px 12px;
    border-radius: 15px;
    margin: 5px;
    font-size: 0.9em;
}

.batch-section, .history-section {
    background: #f8f9fa;
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.section-header:hover {
    background: #f0f0f0;
}

.section-header h3 {
    margin: 0;
    color: #333;
}

.toggle-icon {
    transition: transform 0.3s ease;
    color: #666;
}

.section-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.batch-content, .history-content {
    padding: 20px 25px;
    background: white;
}

.batch-input-area textarea {
    margin-bottom: 15px;
}

.batch-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.batch-progress {
    padding: 20px;
    text-align: center;
}

.progress-bar {
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: #666;
    font-size: 0.9em;
}

.batch-results {
    margin-top: 20px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.batch-result-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
}

.batch-result-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.batch-result-item h4 {
    color: #333;
    font-size: 1em;
}

.batch-result-item .copy-btn {
    padding: 5px 12px;
    font-size: 0.85em;
}

.batch-result-item p {
    color: #666;
    font-size: 0.9em;
    line-height: 1.6;
}

.history-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.history-item:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.history-item h4 {
    color: #333;
    margin-bottom: 5px;
    font-size: 1em;
}

.history-item p {
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
}

.history-item .date {
    color: #999;
    font-size: 0.8em;
    margin-top: 8px;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: #28a745;
}

.training-section {
    margin-top: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.training-content {
    padding: 20px 25px;
    background: white;
}

.training-intro {
    margin-bottom: 20px;
    color: #666;
}

.training-modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.training-module {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.training-module:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.module-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.module-title {
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.module-desc {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.module-tips {
    color: #888;
    font-size: 0.8em;
    background: rgba(102, 126, 234, 0.1);
    padding: 8px;
    border-radius: 6px;
}

.training-practice {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.practice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-small {
    padding: 6px 16px;
    font-size: 0.9em;
}

.practice-formula {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    color: white;
}

.practice-formula h5 {
    margin-bottom: 10px;
    color: white;
}

.practice-formula pre {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 0.9em;
    line-height: 1.6;
    margin: 0;
    opacity: 0.95;
}

.practice-scenario, .practice-hint, .practice-input, .practice-example, .practice-feedback {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.practice-scenario h5, .practice-hint h5, .practice-input h5, .practice-example h5, .practice-feedback h5 {
    margin-bottom: 10px;
    color: #333;
}

.practice-scenario p, .practice-hint p, .practice-example p {
    color: #666;
    line-height: 1.6;
}

.practice-feedback {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    border: 1px solid #ffeeba;
}

.feedback-score {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 10px;
}

.feedback-tips {
    color: #666;
    font-size: 0.95em;
}

.practice-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.practice-actions button {
    padding: 10px 20px;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.user-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.user-name {
    font-size: 1.1em;
    font-weight: 600;
}

.user-progress {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
}

.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 1.8em;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.btn-large {
    padding: 15px !important;
    font-size: 1.1em;
}

.login-hint {
    text-align: center;
    margin-top: 20px;
    color: #888;
    font-size: 0.9em;
}

.login-hint p {
    margin: 5px 0;
}

.admin-page {
    background: #f5f7fa;
    min-height: 100vh;
}

.admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 1.4em;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.admin-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.tab-btn {
    padding: 12px 25px;
    border: none;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    color: #555;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.tab-btn:hover {
    background: #f0f2f5;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.panel {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.panel-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.import-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.import-hint {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.import-hint h4 {
    margin-bottom: 10px;
    color: #333;
}

.import-hint code {
    display: block;
    background: white;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 8px 0;
    font-family: monospace;
    color: #667eea;
}

.import-hint .example {
    margin-top: 15px;
    font-weight: 500;
}

.import-actions {
    display: flex;
    gap: 15px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px 20px;
    border-radius: 10px;
    font-weight: 500;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 15px;
    color: white;
    text-align: center;
}

.stat-value {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.95em;
    opacity: 0.9;
}

.module-progress {
    margin-top: 20px;
}

.module-progress h4 {
    margin-bottom: 15px;
    color: #333;
}

.module-bar-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.module-bar-item {
    display: grid;
    grid-template-columns: 100px 1fr 100px;
    align-items: center;
    gap: 15px;
}

.module-name {
    font-weight: 500;
    color: #555;
}

.module-bar {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.module-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s;
}

.module-count {
    text-align: right;
    color: #666;
    font-weight: 500;
}

.student-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.students-table-container {
    overflow-x: auto;
}

.students-table {
    width: 100%;
    border-collapse: collapse;
}

.students-table th,
.students-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.students-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.students-table tbody tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 500;
}

.status-done {
    background: #d4edda;
    color: #155724;
}

.status-doing {
    background: #fff3cd;
    color: #856404;
}

.status-pending {
    background: #e9ecef;
    color: #555;
}

.avg-score {
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
}

.avg-score.good {
    background: #d4edda;
    color: #155724;
}

.avg-score.mid {
    background: #fff3cd;
    color: #856404;
}

.avg-score.low {
    background: #f8d7da;
    color: #721c24;
}

.detail-scores {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.score-tag {
    font-size: 0.8em;
    padding: 4px 10px;
    border-radius: 8px;
}

.score-tag.good {
    background: #d4edda;
    color: #155724;
}

.score-tag.pending {
    background: #e9ecef;
    color: #888;
}

@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-tabs {
        flex-wrap: wrap;
    }
}

footer {
    background: #2d2d2d;
    color: #999;
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .container {
        border-radius: 0;
    }

    header {
        padding: 25px 20px;
    }

    header h1 {
        font-size: 1.6em;
    }

    main {
        padding: 20px;
    }

    .step-indicator {
        flex-wrap: wrap;
        gap: 10px;
    }

    .step-line {
        display: none;
    }

    .platform-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .btn-row {
        flex-direction: column;
    }

    .btn-row button {
        width: 100%;
    }
}