/* Modern, clean styling for JSON Schema Extractor */

:root {
    /* PureHD Brand Colors */
    --primary-color: #0066cc;
    --primary-hover: #0052a3;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --brand-accent: #003d7a;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* PureHD Branding */
.logo-section {
    margin-bottom: 20px;
}

.brand-name {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -1px;
    margin-bottom: 5px;
}

.tool-name {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content */
main {
    flex: 1;
}

/* Upload Section */
.upload-section {
    margin-bottom: 40px;
}

.drop-zone {
    background: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.drop-zone:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.drop-zone.dragover {
    background-color: #eff6ff;
    border-color: var(--primary-color);
    border-style: solid;
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.drop-text {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.drop-hint {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Results Section */
.results-section {
    animation: fadeIn 0.3s ease;
}

.file-info {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.file-info h3 {
    color: var(--success-color);
    margin-bottom: 10px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Preview Section */
.preview-section {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.preview-section h4 {
    margin-bottom: 15px;
}

.sample-paths {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
}

.path-item {
    padding: 8px;
    margin: 4px 0;
    background: var(--bg-color);
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.path-name {
    color: var(--text-primary);
    font-weight: 500;
}

.path-type {
    color: var(--primary-color);
    font-size: 0.85rem;
}

/* Download Section */
.download-section {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.download-section h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.download-group {
    margin-bottom: 25px;
}

.download-group:last-child {
    margin-bottom: 0;
}

.download-group h5 {
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.download-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn svg {
    flex-shrink: 0;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px;
}

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

/* Footer */
footer {
    text-align: center;
    padding: 40px 0 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-note {
    font-size: 0.8rem;
    margin-top: 5px;
    color: var(--brand-accent);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .drop-zone {
        padding: 40px 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .download-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}