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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2em;
    margin-bottom: 5px;
    font-weight: 700;
}

header p {
    font-size: 1em;
    opacity: 0.9;
}

main {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

section h2 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.3em;
    font-weight: 600;
}

section h3 {
    color: #555;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #f5f5f5;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

#file-input {
    display: none;
}

.upload-area p {
    margin: 10px 0;
}

.file-types {
    font-size: 0.9em;
    color: #666;
}

#file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.file-size {
    font-size: 0.8em;
    color: #666;
}

.remove-file {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.remove-file:hover {
    background: #ff5252;
}

.mode-buttons {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.mode-buttons button {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#auto-analysis {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

#interactive-analysis {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.mode-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.progress-container {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background-color: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

#progress-text {
    margin-top: 10px;
    text-align: center;
    color: #666;
}

#interactive-questions {
    margin-bottom: 30px;
}

.interactive-question {
    margin-bottom: 20px;
}

.interactive-question label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.interactive-question input[type="text"],
.interactive-question textarea,
.interactive-question select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
    transition: border 0.3s ease;
}

.interactive-question input[type="text"]:focus,
.interactive-question textarea:focus,
.interactive-question select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.interactive-question textarea {
    resize: vertical;
    min-height: 100px;
}

#continue-analysis {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#continue-analysis:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.score-display {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.score-circle {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.score-value {
    position: relative;
    font-size: 3em;
    font-weight: bold;
    color: white;
}

.analysis-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.analysis-table th,
.analysis-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.analysis-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #555;
}

.analysis-table tr:hover {
    background: #f9f9f9;
}

.original-text-preview {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 0.9em;
    line-height: 1.5;
    max-height: 300px;
    overflow-y: auto;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.action-buttons button {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 150px;
}

#export-excel {
    background: #2196F3;
    color: white;
}

#export-csv {
    background: #FF9800;
    color: white;
}

#save-analysis {
    background: #4CAF50;
    color: white;
}

#new-analysis {
    background: #f44336;
    color: white;
}

.action-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.notes-section textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    min-height: 150px;
    transition: border 0.3s ease;
}

.notes-section textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.history-section {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #764ba2;
}

#history-list {
    margin-top: 20px;
}

.history-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-title {
    font-weight: 600;
    color: #333;
}

.history-date {
    font-size: 0.9em;
    color: #666;
}

.history-summary {
    font-size: 0.9em;
    color: #666;
}

footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

footer p {
    margin: 5px 0;
    opacity: 0.9;
}

.strengths-section,
.improvements-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.strengths-section h4,
.improvements-section h4 {
    margin-bottom: 15px;
    color: #555;
}

.strengths-section ul,
.improvements-section ul {
    padding-left: 20px;
}

.strengths-section li,
.improvements-section li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.strengths-section {
    border-left: 4px solid #4CAF50;
}

.improvements-section {
    border-left: 4px solid #FF9800;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    main {
        padding: 20px;
    }
    
    .mode-buttons {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons button {
        width: 100%;
    }
    
    .analysis-table {
        font-size: 0.9em;
    }
    
    .analysis-table th,
    .analysis-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }
    
    section {
        padding: 15px;
    }
    
    .upload-area {
        padding: 20px;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
    }
    
    .score-circle::before {
        width: 100px;
        height: 100px;
    }
    
    .score-value {
        font-size: 2em;
    }
}