/* Sentence Trainer - Minimalist Green Theme */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green-primary: #22c55e;
    --green-dark: #16a34a;
    --green-light: #86efac;
    --green-bg: #f0fdf4;
    --green-border: #bbf7d0;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    min-height: 100vh;
    padding: 20px;
    color: var(--gray-700);
    line-height: 1.5;
}

.container {
    max-width: 700px;
    margin: 0 auto;
}

/* 面板 */
.panel {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.panel.hidden {
    display: none;
}

/* 标题 */
h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    text-align: center;
    margin-bottom: 8px;
}

.subtitle {
    text-align: center;
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 28px;
}

h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 20px;
}

/* 表单 */
.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

input, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* 按钮 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--green-primary);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--green-dark);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-audio {
    background: var(--green-bg);
    color: var(--green-dark);
    border: 1px solid var(--green-border);
    margin-right: 8px;
}

.btn-audio:hover {
    background: var(--green-border);
}

.btn-nav {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    min-width: 100px;
}

.btn-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 练习区 */
.practice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.progress-info {
    font-size: 13px;
    color: var(--gray-500);
}

.sentence-card {
    background: var(--gray-50);
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
}

.sentence-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.audio-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.audio-progress input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: var(--gray-200);
    border-radius: 2px;
}

.audio-progress input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--green-primary);
    border-radius: 50%;
    cursor: pointer;
}

.audio-progress span {
    color: var(--gray-500);
    font-size: 12px;
    min-width: 70px;
}

.sentence-content {
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sentence-placeholder {
    color: var(--gray-400);
    font-size: 14px;
}

.sentence-text p {
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 1.6;
}

.sentence-text .translation {
    color: var(--gray-500);
    font-size: 14px;
}

.sentence-text.hidden {
    display: none;
}

.practice-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

#finish-btn {
    width: 100%;
}

/* 报告区 */
#report-summary {
    background: var(--green-bg);
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    text-align: center;
    border: 1px solid var(--green-border);
}

#report-summary h3 {
    font-size: 16px;
    color: var(--green-dark);
    margin-bottom: 4px;
}

#report-summary p {
    font-size: 13px;
    color: var(--gray-500);
}

#report-content {
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 24px;
}

.report-item {
    background: var(--gray-50);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.report-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.report-item-header h4 {
    font-size: 13px;
    color: var(--green-dark);
    font-weight: 600;
}

.report-audio-btns {
    display: flex;
    gap: 6px;
}

.btn-audio-small {
    padding: 4px 10px;
    font-size: 11px;
    border: none;
    border-radius: 4px;
    background: var(--green-primary);
    color: white;
    cursor: pointer;
}

.btn-audio-small:hover {
    background: var(--green-dark);
}

.report-item p {
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.5;
}

.report-item .translation {
    color: var(--gray-500);
    font-size: 13px;
}

.report-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.report-actions .btn {
    flex: 1;
    min-width: 130px;
}

/* Loading */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(34, 197, 94, 0.2);
    border-top-color: var(--green-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 600px) {
    body { padding: 12px; }
    
    .panel { padding: 20px; }
    
    .form-row { grid-template-columns: 1fr; }
    
    .report-actions { flex-direction: column; }
    
    .report-actions .btn { min-width: auto; }
}
