/* ORS Fire Safety Compliance Analyzer - Styles */

:root {
    --primary-color: #e74c3c;
    --primary-dark: #c0392b;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
}

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

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

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

/* Header */
header {
    text-align: center;
    color: white;
    padding: 40px 20px;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 15px;
}

.model-info {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
}

.card h2 {
    color: var(--dark);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.instructions {
    color: #666;
    margin-bottom: 25px;
    font-size: 1rem;
}

/* File Upload */
.file-upload-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.file-upload:hover {
    border-color: var(--primary-color);
    background: #fafafa;
}

.file-upload label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
}

.label-icon {
    font-size: 1.5rem;
    margin-right: 8px;
}

.file-upload input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.file-name {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    width: 100%;
    justify-content: center;
    font-size: 1.1rem;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #2980b9;
}

/* Loading */
.loading-card {
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-message {
    color: #666;
    margin-bottom: 30px;
}

.progress-steps {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step-icon {
    font-size: 2rem;
}

.step-text {
    font-size: 0.85rem;
    color: #666;
}

/* Report */
.report-card {
    max-width: 100%;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.report-actions {
    display: flex;
    gap: 10px;
}

.report-metadata {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.report-metadata strong {
    color: var(--dark);
}

/* Markdown Content Styles */
.markdown-body {
    line-height: 1.8;
    color: #333;
}

.markdown-body h1 {
    font-size: 2rem;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.markdown-body h2 {
    font-size: 1.6rem;
    margin: 25px 0 15px;
    color: var(--dark);
}

.markdown-body h3 {
    font-size: 1.3rem;
    margin: 20px 0 12px;
    color: var(--primary-color);
}

.markdown-body p {
    margin: 12px 0;
}

.markdown-body ul, .markdown-body ol {
    margin: 15px 0;
    padding-left: 30px;
}

.markdown-body li {
    margin: 8px 0;
}

.markdown-body strong {
    color: var(--dark);
}

.markdown-body code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.markdown-body pre {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 15px 0;
}

.markdown-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
    margin: 15px 0;
    color: #666;
    font-style: italic;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.markdown-body th,
.markdown-body td {
    border: 1px solid var(--border-color);
    padding: 10px;
    text-align: left;
}

.markdown-body th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Error */
.error-card {
    border-left: 4px solid var(--danger-color);
}

.error-message {
    color: var(--danger-color);
    background: #fee;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

/* Disclaimer */
.disclaimer {
    background: #fff3cd;
    border-left: 4px solid var(--warning-color);
    padding: 12px 15px;
    margin-top: 20px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    padding: 20px;
    opacity: 0.8;
}

/* Loading dot animation */
.loading-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    animation: pulse 1.5s ease-in-out infinite;
    margin-right: 8px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .file-upload-group {
        grid-template-columns: 1fr;
    }
    
    .report-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .report-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .progress-steps {
        flex-direction: column;
        gap: 15px;
    }
}


