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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    text-align: center;
}

header h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.card h2 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

input[type="file"],
input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
    font-family: 'Courier New', monospace;
}

.note-type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.note-type-selector label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: normal;
    margin-bottom: 0;
}

.note-type-selector label:hover {
    border-color: #667eea;
    background: #f0f3ff;
}

.note-type-selector input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.note-type-selector input[type="checkbox"]:checked + label,
.note-type-selector label:has(input[type="checkbox"]:checked) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Note tabs for multi-note display */
.notes-tabs {
    margin-top: 20px;
}

.tab-buttons {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: #e0e0e0;
}

.tab-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.tab-btn.error {
    background: #fee;
    border-color: #fcc;
}

.tab-pane {
    display: none;
    padding: 20px;
    background: #f9f9f9;
    border: 2px solid #ddd;
    border-radius: 0 8px 8px 8px;
}

.tab-pane h3 {
    color: #667eea;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.tab-pane .validation-results {
    margin-top: 15px;
    padding: 12px;
    background: #f7fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.validation-summary {
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.validation-summary.passed {
    background: #c6f6d5;
    border: 1px solid #48bb78;
}

.validation-summary.failed {
    background: #fed7d7;
    border: 1px solid #f56565;
}

.validation-summary h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: #2d3748;
}

.validation-summary p {
    margin: 2px 0 0 0;
    font-size: 13px;
    color: #4a5568;
    line-height: 1.3;
}

.validation-scores {
    margin-top: 4px;
}

.validation-scores h4 {
    margin: 0 0 4px 0;
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
}

.score-item {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
    gap: 8px;
}

.validator-name {
    font-weight: 600;
    font-size: 13px;
    color: #4a5568;
    min-width: 200px;
}

.score-value {
    font-weight: bold;
    font-size: 13px;
    color: #2d3748;
    min-width: 45px;
}

.score-bar {
    flex: 1;
    height: 16px;
    background: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 8px;
}

.error-message {
    padding: 20px;
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 8px;
    color: #c00;
    font-weight: bold;
}

.help-text {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(17, 153, 142, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.progress-bar {
    width: 100%;
    height: 40px;
    background: #f0f0f0;
    border-radius: 20px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    color: #333;
    z-index: 1;
}

.transcript-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.transcript-info span {
    color: #666;
}

.transcript-info strong {
    color: #333;
}

.progress-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.progress-step.active {
    background: #fff7e6;
    border-color: #ffc107;
}

.progress-step.completed {
    background: #e8f5e9;
    border-color: #4caf50;
}

.step-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.step-label {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    color: #666;
}

.note-content {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    line-height: 1.6;
}

.validation-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.validator-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.validator-card.passed {
    border-left-color: #4caf50;
    background: #e8f5e9;
}

.validator-card.failed {
    border-left-color: #f44336;
    background: #ffebee;
}

.validator-name {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.validator-score {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.validator-card.passed .validator-score {
    color: #4caf50;
}

.validator-card.failed .validator-score {
    color: #f44336;
}

footer {
    text-align: center;
    color: white;
    padding: 20px;
    margin-top: 30px;
}

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

.progress-step.active .step-icon {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Streaming styles for ChatGPT-like experience */
.note-content-streaming {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    min-height: 100px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.note-content-streaming.streaming::after {
    content: '|';
    animation: blink 1s infinite;
    color: #667eea;
    font-weight: bold;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.note-content {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 15px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.streaming-badge {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
    animation: pulse 2s ease-in-out infinite;
}

.streaming-badge::before {
    content: '●';
    display: inline-block;
    margin-right: 6px;
    animation: pulse 1s ease-in-out infinite;
}

.note-content-streaming strong {
    font-weight: 700;
    color: #1f2937;
}

.note-content-streaming p {
    margin: 8px 0;
}

.note-content-streaming ul,
.note-content-streaming ol {
    margin: 8px 0;
    padding-left: 24px;
}

.note-content-streaming li {
    margin: 4px 0;
}

/* Smooth transitions for text appearance */
.note-content-streaming * {
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .card {
        padding: 20px;
    }
    
    .note-content-streaming {
        font-size: 14px;
        padding: 12px;
    }
}

