/* ============================================
   深空科技风 - Deep Space Tech Style
   ============================================ */

/* CSS Variables for Deep Space Theme */
:root {
    --space-bg: #0a0e1a;
    --space-bg-secondary: #12182b;
    --space-bg-card: #1a2342;
    --space-bg-hover: #243156;
    
    --neon-blue: #00d4ff;
    --neon-cyan: #00f5ff;
    --neon-purple: #b829dd;
    --neon-pink: #ff2d95;
    --neon-green: #00ff88;
    
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #64748b;
    
    --border-glow: rgba(0, 212, 255, 0.3);
    --border-glow-strong: rgba(0, 212, 255, 0.6);
    
    --gradient-tech: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-purple) 100%);
    --gradient-cyber: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
    --gradient-dark: linear-gradient(180deg, var(--space-bg-card) 0%, var(--space-bg-secondary) 100%);
}

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

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--space-bg);
    min-height: 100vh;
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
}

/* Deep Space Background Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(184, 41, 221, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 245, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Starfield Animation */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 230px 80px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 300px 150px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 350px 50px, rgba(255,255,255,0.3), transparent);
    background-repeat: repeat;
    background-size: 400px 200px;
    pointer-events: none;
    z-index: 0;
    animation: twinkle 8s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header - Tech Style */
header {
    text-align: center;
    padding: 50px 20px;
    position: relative;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: var(--gradient-cyber);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    letter-spacing: 2px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
}

.subtitle::before,
.subtitle::after {
    content: '◆';
    color: var(--neon-blue);
    margin: 0 15px;
    font-size: 0.6rem;
    vertical-align: middle;
}

/* Main Container - Glassmorphism Card */
main {
    background: var(--space-bg-card);
    border-radius: 24px;
    border: 1px solid var(--border-glow);
    box-shadow: 
        0 0 60px rgba(0, 212, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Tech Corner Decorations */
main::before,
main::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--neon-blue);
}

main::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
    border-radius: 24px 0 0 0;
}

main::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
    border-radius: 0 0 24px 0;
}

/* Section Styles */
.category-section,
.exercise-section,
.tips-section,
.mode-section,
.upload-section,
.preview-section,
.loading-section,
.result-section {
    padding: 40px 35px;
}

/* Tech Headers */
.category-section h2,
.exercise-section h2,
.mode-header h2,
.tips-header h2 {
    text-align: center;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 1.8rem;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.category-section h2::after,
.exercise-section h2::after,
.mode-header h2::after,
.tips-header h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--gradient-tech);
    margin: 12px auto 0;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--neon-blue);
}

.section-desc {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 35px;
    font-size: 0.95rem;
}

/* Back Button - Tech Style */
.back-btn {
    background: transparent;
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.back-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
    transition: left 0.5s;
}

.back-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 20px var(--border-glow);
    text-shadow: 0 0 10px var(--neon-blue);
}

.back-btn:hover::before {
    left: 100%;
}

/* Category Grid - Tech Cards */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--space-bg-secondary);
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-tech);
    transform: scaleX(0);
    transition: transform 0.4s;
}

.category-card:hover {
    background: var(--space-bg-hover);
    border-color: var(--neon-blue);
    transform: translateY(-5px);
    box-shadow: 
        0 10px 40px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

.category-card-name {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
}

.category-card-count {
    font-size: 0.85rem;
    color: var(--neon-blue);
    font-family: 'Courier New', monospace;
}

/* Exercise Header */
.exercise-header {
    margin-bottom: 25px;
}

.exercise-header h2 {
    margin-top: 15px;
}

/* Exercise Grid */
.exercise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.exercise-card {
    background: var(--space-bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
}

.exercise-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--gradient-tech);
    transition: all 0.4s;
    transform: translateX(-50%);
    border-radius: 3px 3px 0 0;
}

.exercise-card:hover {
    background: var(--space-bg-hover);
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.15);
}

.exercise-card:hover::after {
    width: 80%;
}

.exercise-card-icon {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 12px;
}

.exercise-card-name {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 500;
}

.exercise-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Tips Section - Tech Panel */
.tips-header {
    margin-bottom: 25px;
}

.tips-header h2 {
    margin-top: 15px;
}

.tips-content {
    background: var(--space-bg-secondary);
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    padding: 35px;
    position: relative;
}

.tips-content::before {
    content: '◈';
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--neon-blue);
    font-size: 1.5rem;
    opacity: 0.5;
}

.exercise-info {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.exercise-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.4));
}

.exercise-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.tips-list h3 {
    color: var(--neon-blue);
    margin-bottom: 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tips-list h3::before {
    content: '▸';
    color: var(--neon-cyan);
}

.tips-list ul {
    list-style: none;
    padding: 0;
}

.tips-list li {
    padding: 14px 0 14px 35px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    line-height: 1.6;
    transition: all 0.3s;
}

.tips-list li:hover {
    color: var(--text-primary);
    padding-left: 40px;
}

.tips-list li:last-child {
    border-bottom: none;
}

.tips-list li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--neon-blue);
    font-weight: bold;
    font-size: 1.4rem;
    text-shadow: 0 0 10px var(--neon-blue);
}

/* Continue Button - Cyber Style */
.continue-btn,
.submit-btn,
.retry-btn {
    width: 100%;
    padding: 18px;
    margin-top: 30px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    background: var(--gradient-tech);
    color: white;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.continue-btn::before,
.submit-btn::before,
.retry-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.continue-btn:hover,
.submit-btn:hover,
.retry-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.5);
}

.continue-btn:hover::before,
.submit-btn:hover::before,
.retry-btn:hover::before {
    left: 100%;
}

/* Mode Selection - Tech Cards */
.mode-header {
    margin-bottom: 25px;
}

.mode-header h2 {
    margin-top: 15px;
}

.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.mode-card {
    background: var(--space-bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 35px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s;
}

.mode-card:hover {
    border-color: var(--neon-blue);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.2);
}

.mode-card:hover::before {
    opacity: 1;
}

.mode-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 15px rgba(0, 245, 255, 0.5));
}

.mode-name {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 600;
}

.mode-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.mode-features {
    list-style: none;
    padding: 0;
    text-align: left;
}

.mode-features li {
    padding: 10px 0 10px 28px;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mode-features li:last-child {
    border-bottom: none;
}

.mode-features li::before {
    content: '◦';
    position: absolute;
    left: 8px;
    color: var(--neon-cyan);
    font-size: 1.2rem;
}

/* Upload Section - Tech Interface */
.upload-header,
.preview-header {
    margin-bottom: 25px;
}

.upload-header h3,
.preview-header h3 {
    margin-top: 15px;
    color: var(--neon-blue);
    font-size: 1.4rem;
}

/* Mode Tag */
.mode-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(0, 212, 255, 0.15);
    color: var(--neon-blue);
    font-size: 0.8rem;
    border-radius: 20px;
    margin-left: 12px;
    font-weight: 500;
    border: 1px solid var(--border-glow);
    font-family: 'Courier New', monospace;
}

/* Upload Guidance - Tech Panel */
.upload-guidance {
    margin-bottom: 25px;
}

.guidance-box {
    background: rgba(0, 212, 255, 0.05);
    border-left: 3px solid var(--neon-blue);
    padding: 20px 25px;
    border-radius: 0 12px 12px 0;
    position: relative;
}

.guidance-box.detail {
    background: rgba(184, 41, 221, 0.05);
    border-left-color: var(--neon-purple);
}

.guidance-box h4 {
    color: var(--neon-blue);
    margin-bottom: 15px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guidance-box.detail h4 {
    color: var(--neon-purple);
}

.guidance-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guidance-box li {
    padding: 8px 0 8px 25px;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.guidance-box li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--neon-blue);
    font-weight: bold;
}

.guidance-box.detail li::before {
    color: var(--neon-purple);
}

/* Upload Area - Tech Drop Zone */
.upload-area {
    border: 2px dashed var(--border-glow);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    background: rgba(0, 212, 255, 0.02);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--neon-blue), transparent 30%);
    opacity: 0;
    transition: opacity 0.4s;
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--neon-blue);
    background: rgba(0, 212, 255, 0.05);
    box-shadow: 0 0 40px var(--border-glow);
}

.upload-area:hover::before {
    opacity: 0.1;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.5));
}

.upload-text {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 500;
}

.upload-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
}

/* Preview Section */
.preview-container {
    position: relative;
    margin-bottom: 25px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--border-glow);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.1);
}

#previewImage {
    width: 100%;
    height: auto;
    display: block;
}

.remove-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--neon-pink);
    background: rgba(255, 45, 149, 0.2);
    color: var(--neon-pink);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: var(--neon-pink);
    color: white;
    box-shadow: 0 0 20px rgba(255, 45, 149, 0.5);
}

/* Restart Button */
.restart-btn {
    width: 100%;
    padding: 16px;
    background: transparent;
    color: var(--neon-blue);
    border: 1px solid var(--neon-blue);
    border-radius: 12px;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.restart-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 20px var(--border-glow);
}

/* Loading Section - Tech Animation */
.loading-section {
    text-align: center;
}

.loading-spinner {
    width: 70px;
    height: 70px;
    border: 3px solid rgba(0, 212, 255, 0.1);
    border-top: 3px solid var(--neon-blue);
    border-right: 3px solid var(--neon-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
    position: relative;
}

.loading-spinner::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 1px solid transparent;
    border-top-color: var(--neon-cyan);
    animation: spin 2s linear infinite reverse;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.loading-subtext {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

/* Result Section - Tech Dashboard */
.result-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

.result-main {
    min-width: 0;
}

.result-card {
    background: var(--space-bg-secondary);
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    padding: 35px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-tech);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.result-title-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.result-header h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
    margin: 0;
}

/* Result Badge */
.result-badge {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid;
}

.result-badge.excellent {
    background: rgba(0, 255, 136, 0.1);
    color: var(--neon-green);
    border-color: var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.result-badge.good {
    background: rgba(0, 212, 255, 0.1);
    color: var(--neon-blue);
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.result-badge.pass {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border-color: #ffc107;
}

.result-badge.fail {
    background: rgba(255, 45, 149, 0.1);
    color: var(--neon-pink);
    border-color: var(--neon-pink);
}

/* Mismatch Warning */
.mismatch-warning {
    background: rgba(255, 193, 7, 0.08);
    border-left: 3px solid #ffc107;
    padding: 18px 22px;
    border-radius: 0 12px 12px 0;
    margin-bottom: 25px;
    text-align: left;
}

.mismatch-warning p {
    margin: 0;
    color: #ffc107;
    line-height: 1.6;
}

.mismatch-warning span {
    font-weight: bold;
    text-decoration: underline;
}

/* Score Circle - Tech Gauge */
.score-container {
    margin-bottom: 35px;
}

.score-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--neon-blue), var(--neon-purple), var(--neon-pink), var(--neon-blue));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--space-bg-secondary);
}

.score-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
}

.score-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.score-description {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Feedback Container */
.feedback-container {
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feedback-container h3 {
    font-size: 1.2rem;
    color: var(--neon-blue);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feedback-content {
    line-height: 1.8;
    color: var(--text-secondary);
}

.feedback-content h4 {
    color: var(--neon-cyan);
    margin: 20px 0 12px 0;
    font-size: 1.05rem;
}

.feedback-content ul {
    padding-left: 20px;
    margin: 12px 0;
}

.feedback-content li {
    margin: 8px 0;
    padding-left: 10px;
}

.feedback-content li::marker {
    color: var(--neon-blue);
}

/* Result Actions */
.result-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Chat Sidebar - Tech Terminal */
.chat-sidebar {
    background: var(--space-bg-secondary);
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    height: 600px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.1);
}

.chat-header {
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.2), rgba(184, 41, 221, 0.2));
    color: white;
    padding: 22px;
    text-align: center;
    border-bottom: 1px solid var(--border-glow);
}

.chat-header h4 {
    margin: 0 0 6px 0;
    font-size: 1.15rem;
    color: var(--neon-cyan);
    letter-spacing: 1px;
}

.chat-subtitle {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 22px;
    background: rgba(0, 0, 0, 0.2);
}

.chat-message {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    align-items: flex-start;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    background: var(--space-bg-card);
    border: 1px solid var(--border-glow);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.chat-message.ai .message-avatar {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(184, 41, 221, 0.3));
    border-color: var(--neon-blue);
}

.message-content {
    max-width: calc(100% - 55px);
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(184, 41, 221, 0.2));
    color: white;
    border-bottom-right-radius: 4px;
    border: 1px solid var(--border-glow);
}

.chat-message.ai .message-content {
    background: var(--space-bg-card);
    color: var(--text-secondary);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-message.system .message-content {
    background: rgba(0, 212, 255, 0.08);
    color: var(--neon-blue);
    width: 100%;
    max-width: 100%;
    font-size: 0.9rem;
    border: 1px solid var(--border-glow);
}

.chat-message.system .message-content ul {
    margin: 12px 0 0 0;
    padding-left: 22px;
}

.chat-message.system .message-content li {
    margin: 6px 0;
}

/* Chat Input */
.chat-input-area {
    padding: 18px 22px;
    background: var(--space-bg-card);
    border-top: 1px solid var(--border-glow);
    display: flex;
    gap: 12px;
}

.chat-input-area textarea {
    flex: 1;
    border: 1px solid var(--border-glow);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.95rem;
    resize: none;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
}

.chat-input-area textarea::placeholder {
    color: var(--text-muted);
}

.chat-input-area textarea:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px var(--border-glow);
}

.send-btn {
    padding: 12px 22px;
    background: var(--gradient-tech);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: 1px;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.typing {
    display: inline-block;
    animation: typing 1.5s infinite;
    color: var(--neon-blue);
}

@keyframes typing {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Footer - Tech Style */
footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

footer::before {
    content: '◈ ◈ ◈';
    display: block;
    margin-bottom: 15px;
    color: var(--neon-blue);
    opacity: 0.5;
    letter-spacing: 15px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .result-layout {
        grid-template-columns: 1fr;
    }

    .chat-sidebar {
        height: 500px;
        margin-top: 25px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

    .category-card {
        padding: 22px 15px;
    }

    .category-card-icon {
        font-size: 2.2rem;
    }

    .category-card-name {
        font-size: 1.05rem;
    }

    .exercise-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .exercise-card {
        padding: 20px 15px;
    }

    .exercise-card-icon {
        font-size: 2.2rem;
    }

    .mode-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .mode-card {
        padding: 28px 22px;
    }

    .category-section,
    .exercise-section,
    .tips-section,
    .mode-section,
    .upload-section,
    .preview-section,
    .loading-section,
    .result-section {
        padding: 28px 20px;
    }

    .chat-sidebar {
        height: 450px;
    }

    .chat-header {
        padding: 18px;
    }

    .chat-messages {
        padding: 18px;
    }

    .chat-input-area {
        padding: 12px 18px;
    }

    .chat-input-area textarea {
        font-size: 16px;
    }

    .score-circle {
        width: 140px;
        height: 140px;
    }

    .score-circle::before {
        width: 120px;
        height: 120px;
    }

    .score-number {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 0.75rem;
    }

    .subtitle::before,
    .subtitle::after {
        margin: 0 8px;
    }

    .category-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .exercise-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .exercise-card {
        padding: 18px 12px;
    }

    .exercise-card-icon {
        font-size: 1.8rem;
    }

    .exercise-card-name {
        font-size: 0.9rem;
    }

    .exercise-card-desc {
        font-size: 0.7rem;
    }

    .upload-area {
        padding: 45px 25px;
    }

    .score-circle {
        width: 120px;
        height: 120px;
    }

    .score-circle::before {
        width: 100px;
        height: 100px;
    }

    .score-number {
        font-size: 2.5rem;
    }

    .tips-content {
        padding: 25px 20px;
    }

    .exercise-icon {
        font-size: 2.5rem;
    }

    .feedback-container {
        padding: 22px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--space-bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-glow);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue);
}

/* Selection Color */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: white;
}
