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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 2.5em;
    font-weight: 700;
}

.start-over-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto 30px;
    padding: 12px 24px;
    font-size: 1em;
    font-weight: 600;
    color: #667eea;
    background: white;
    border: 2px solid #667eea;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-over-btn:hover {
    background: #667eea;
    color: white;
    transform: translateX(-3px);
}

.back-arrow {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.start-over-btn:hover .back-arrow {
    transform: translateX(-5px);
}

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

.upload-section {
    max-width: 600px;
    margin: 0 auto 30px;
}

.upload-container {
    display: flex;
    flex-direction: column;
}

.dropzone {
    border: 3px dashed #ccc;
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.dropzone.drag-over {
    border-color: #667eea;
    background: #e8edff;
    transform: scale(1.02);
}

.dropzone.has-file {
    border-color: #28a745;
    background: #f0fff4;
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: #667eea;
    margin-bottom: 10px;
}

.dropzone-text {
    font-size: 1.1em;
    color: #333;
    font-weight: 500;
}

.dropzone-hint {
    font-size: 0.9em;
    color: #666;
}

.file-name {
    margin-top: 10px;
    color: #28a745;
    font-weight: 600;
    font-size: 0.95em;
}

.compare-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 30px;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.compare-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.compare-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.loader {
    text-align: center;
    margin: 30px 0;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.hidden {
    display: none !important;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #f5c6cb;
    text-align: center;
}

.results-section {
    margin-top: 40px;
}

.results-section h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 2em;
}

.table-container {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

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

th {
    padding: 15px;
    text-align: right;
    font-weight: 600;
    font-size: 1.1em;
}

td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
}

tbody tr:hover {
    background: #f8f9fa;
}

tbody tr:last-child td {
    border-bottom: none;
}

.match-percentage {
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
}

.match-high {
    color: #155724;
    background: #d4edda;
}

.match-medium {
    color: #856404;
    background: #fff3cd;
}

.match-low {
    color: #721c24;
    background: #f8d7da;
}

.notes-section {
    margin-top: 30px;
}

.notes-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.notes-textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
    direction: ltr;
    text-align: left;
}

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

.notes-textarea::placeholder {
    color: #999;
    font-style: italic;
}

.raw-response-section {
    margin-top: 30px;
}

.raw-response-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.raw-response-textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 250px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    resize: vertical;
    background-color: #f8f9fa;
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    word-wrap: break-word;
}

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