Youngger9765
fix: Reorganize header layout and fix API docs link
78052ea
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
#root {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.App {
width: 100%;
max-width: 1400px;
margin: 0 auto;
padding: 10px 20px;
display: flex;
flex-direction: column;
align-items: center;
}
.app-header {
display: flex;
flex-direction: column;
gap: 15px;
margin-bottom: 20px;
width: 100%;
max-width: 1400px;
}
.header-row-1 {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
.header-row-2 {
display: flex;
gap: 15px;
flex-wrap: wrap;
align-items: center;
justify-content: center;
width: 100%;
}
.header-selector {
display: flex;
align-items: center;
gap: 8px;
}
.header-selector label {
font-weight: 600;
color: #374151;
font-size: 0.9rem;
white-space: nowrap;
}
.header-selector select {
padding: 8px 12px;
border: 2px solid #e5e7eb;
border-radius: 8px;
font-size: 0.95rem;
background: white;
transition: all 0.2s;
color: #374151;
font-weight: 500;
min-width: 120px;
}
.header-selector select:hover {
border-color: #9ca3af;
}
.header-selector select:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.app-header h1 {
font-size: 2.2rem;
margin: 0;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
font-weight: 700;
}
.header-nav {
display: flex;
gap: 1rem;
align-items: center;
flex-wrap: wrap;
}
.nav-button {
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
border: none;
padding: 0.6rem 1.4rem;
border-radius: 25px;
cursor: pointer;
font-size: 0.9rem;
font-weight: 500;
transition: all 0.3s ease;
text-decoration: none;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.nav-button:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}
.nav-button.active {
background: linear-gradient(135deg, #764ba2, #667eea);
box-shadow: 0 6px 20px rgba(118, 75, 162, 0.4);
}
.nav-link {
background: linear-gradient(135deg, #ff6b6b, #ee5a24);
color: white;
padding: 0.6rem 1.4rem;
border-radius: 25px;
text-decoration: none;
font-size: 0.9rem;
font-weight: 500;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(238, 90, 36, 0.3);
}
.nav-link:hover {
background: linear-gradient(135deg, #ee5a24, #ff6b6b);
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(238, 90, 36, 0.4);
}
.nav-link.course-link {
background: linear-gradient(135deg, #10ac84, #00d2d3);
box-shadow: 0 4px 15px rgba(16, 172, 132, 0.3);
position: relative;
overflow: hidden;
}
.nav-link.course-link:hover {
background: linear-gradient(135deg, #00d2d3, #10ac84);
box-shadow: 0 6px 20px rgba(16, 172, 132, 0.4);
transform: translateY(-2px);
}
.nav-link.course-link::before {
content: '📚';
margin-right: 0.5rem;
}
.app-header p {
font-size: 1.1rem;
color: #64748b;
font-weight: 400;
}
.main-container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
width: 100%;
max-width: 1400px;
}
@media (max-width: 968px) {
.main-container {
grid-template-columns: 1fr;
max-width: 600px;
}
}
.input-panel, .result-panel {
background: white;
border-radius: 16px;
padding: 28px;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
height: 550px;
display: flex;
flex-direction: column;
}
.result-panel {
overflow-y: auto;
overflow-x: hidden;
}
/* Custom scrollbar for result panel */
.result-panel::-webkit-scrollbar {
width: 8px;
}
.result-panel::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 4px;
}
.result-panel::-webkit-scrollbar-thumb {
background: #888;
border-radius: 4px;
}
.result-panel::-webkit-scrollbar-thumb:hover {
background: #555;
}
/* Category Selector Styles */
.category-selector {
margin-bottom: 20px;
}
.category-selector label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: #374151;
font-size: 0.95rem;
text-transform: uppercase;
letter-spacing: 0.025em;
}
.category-select {
width: 100%;
padding: 10px 14px;
border: 2px solid #e5e7eb;
border-radius: 8px;
font-size: 1rem;
background-color: white;
transition: all 0.2s;
color: #374151;
font-weight: 500;
}
.category-select:hover {
border-color: #9ca3af;
}
.category-select:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.category-select:disabled {
opacity: 0.6;
cursor: not-allowed;
background: #f9fafb;
}
/* Agent Selector Styles */
.agent-selector {
margin-bottom: 24px;
display: flex;
align-items: center;
gap: 12px;
}
.agent-selector label {
font-weight: 600;
color: #374151;
font-size: 0.95rem;
min-width: 100px;
text-transform: uppercase;
letter-spacing: 0.025em;
}
.agent-select {
flex: 1;
max-width: 300px;
padding: 10px 14px;
border: 2px solid #e5e7eb;
border-radius: 8px;
font-size: 1rem;
background: white;
transition: all 0.2s;
color: #374151;
font-weight: 500;
}
.agent-select:hover:not(:disabled) {
border-color: #9ca3af;
}
.agent-select:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.agent-select:disabled {
opacity: 0.6;
cursor: not-allowed;
background: #f9fafb;
}
.agent-badge {
padding: 4px 10px;
border-radius: 12px;
color: white;
font-weight: bold;
font-size: 0.8rem;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.text-input {
margin-bottom: 24px;
}
.text-input textarea {
width: 100%;
padding: 14px;
border: 2px solid #e5e7eb;
border-radius: 8px;
font-size: 1rem;
line-height: 1.6;
resize: vertical;
min-height: 350px;
max-height: 400px;
transition: all 0.2s;
font-family: inherit;
color: #1f2937; /* Darker text color for better visibility */
background-color: white;
}
.text-input textarea::placeholder {
color: #9ca3af;
}
.text-input textarea:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.text-input textarea:disabled {
background: #f9fafb;
cursor: not-allowed;
}
.action-buttons {
display: flex;
gap: 12px;
justify-content: center;
margin-bottom: 20px;
}
.btn {
padding: 10px 24px;
border: none;
border-radius: 8px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
min-width: 100px;
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
box-shadow: 0 4px 6px -1px rgba(102, 126, 234, 0.25);
}
.btn-primary:hover:not(:disabled) {
transform: translateY(-1px);
box-shadow: 0 10px 15px -3px rgba(102, 126, 234, 0.3);
}
.btn-primary:active:not(:disabled) {
transform: translateY(0);
}
.btn-primary:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
}
.btn-secondary {
background: #f3f4f6;
color: #4b5563;
border: 1px solid #e5e7eb;
}
.btn-secondary:hover:not(:disabled) {
background: #e5e7eb;
}
.btn-secondary:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.error-message {
padding: 12px 16px;
background: #fef2f2;
color: #dc2626;
border-radius: 8px;
border-left: 4px solid #dc2626;
font-weight: 500;
margin-top: 12px;
font-size: 0.95rem;
}
.loading {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 60px;
height: 100%;
}
.spinner {
width: 48px;
height: 48px;
border: 3px solid #e5e7eb;
border-top: 3px solid #667eea;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 20px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.loading p {
color: #6b7280;
font-size: 1rem;
}
.result-container {
height: 100%;
}
.result-container h2 {
color: #1f2937;
margin-bottom: 24px;
font-size: 1.5rem;
border-bottom: 2px solid #e5e7eb;
padding-bottom: 12px;
}
.result-section {
margin-bottom: 28px;
}
.result-section h3 {
color: #374151;
margin-bottom: 16px;
font-size: 1.2rem;
font-weight: 600;
}
.result-section p {
line-height: 1.8;
color: #4b5563;
font-size: 1rem;
}
.summary-content {
margin-top: 12px;
}
.evaluation-category {
margin-bottom: 20px;
padding: 16px;
background: #f9fafb;
border-radius: 8px;
border-left: 3px solid #667eea;
}
.category-title {
color: #667eea;
font-size: 1.05rem;
font-weight: 600;
margin-bottom: 8px;
}
.category-content {
color: #4b5563;
line-height: 1.7;
white-space: pre-wrap;
}
.inline-edits {
padding: 16px;
background: #f9fafb;
border-radius: 8px;
line-height: 1.7;
color: #374151;
border: 1px solid #e5e7eb;
}
.inline-edits pre {
margin: 0;
font-size: 0.95rem;
line-height: 1.7;
color: #374151;
}
/* Detailed feedback styles */
.detailed-feedback {
display: flex;
flex-direction: column;
gap: 16px;
}
.feedback-item {
padding: 14px;
background: #f9fafb;
border-radius: 8px;
border-left: 3px solid #667eea;
}
.feedback-title {
color: #667eea;
font-size: 1.05rem;
font-weight: 600;
margin-bottom: 8px;
}
.feedback-content {
color: #4b5563;
line-height: 1.7;
margin: 0;
}
/* Correction item styles */
.suggestions-container {
display: flex;
flex-direction: column;
gap: 16px;
}
.correction-item {
background: white;
border: 1px solid #e5e7eb;
border-radius: 8px;
overflow: hidden;
transition: all 0.2s;
}
.correction-item:hover {
border-color: #9ca3af;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.correction-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 8px 14px;
}
.correction-label {
color: white;
font-weight: 600;
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 0.025em;
}
.correction-content {
padding: 16px;
display: flex;
flex-direction: column;
gap: 12px;
}
.correction-original,
.correction-revised,
.correction-reason {
display: flex;
flex-direction: column;
gap: 6px;
}
.correction-original strong,
.correction-revised strong,
.correction-reason strong {
color: #1f2937;
font-weight: 600;
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 0.025em;
}
.correction-original span {
color: #6b7280;
line-height: 1.6;
padding-left: 16px;
}
.correction-revised span {
line-height: 1.6;
padding-left: 16px;
}
.corrected-text {
color: #059669;
font-weight: 500;
background: #ecfdf5;
padding: 6px 10px;
border-radius: 4px;
display: inline-block;
}
.correction-reason span {
color: #6b7280;
font-style: italic;
line-height: 1.6;
padding-left: 16px;
}
.suggestion-item {
padding: 14px;
background: #fefce8;
border-radius: 8px;
border-left: 3px solid #eab308;
}
.suggestion-item strong {
color: #a16207;
margin-right: 8px;
}
/* Score table styles */
.score-table {
margin-top: 20px;
overflow-x: auto;
}
.score-table table {
width: 100%;
border-collapse: separate;
border-spacing: 0;
background: white;
border-radius: 8px;
overflow: hidden;
border: 1px solid #e5e7eb;
}
.score-table th {
background: #f9fafb;
color: #374151;
padding: 12px 16px;
text-align: left;
font-weight: 600;
font-size: 0.95rem;
text-transform: uppercase;
letter-spacing: 0.025em;
border-bottom: 2px solid #e5e7eb;
}
.score-table td {
padding: 14px 16px;
border-bottom: 1px solid #f3f4f6;
color: #374151;
font-size: 0.95rem;
}
.score-table tr:last-child td {
border-bottom: none;
}
.score-table tr:hover:not(.overall-row) {
background: #fafbfc;
}
.criteria-name {
font-weight: 600;
color: #4b5563;
min-width: 120px;
}
.criteria-grade {
font-weight: bold;
font-size: 1.2rem;
color: #667eea;
text-align: center;
min-width: 80px;
}
.criteria-explanation {
color: #6b7280;
line-height: 1.6;
}
.overall-row {
background: #f9fafb;
font-weight: bold;
}
.overall-row td {
padding: 16px;
border-top: 2px solid #667eea;
}
.overall-emoji {
font-size: 1.5rem;
margin-right: 8px;
vertical-align: middle;
}
.overall-score-number {
font-size: 1.1rem;
color: #1f2937;
font-weight: bold;
vertical-align: middle;
}