/* ===================================
   AI Model Card Generator - Styles
   =================================== */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.95;
    font-weight: 300;
}

/* Progress Bar */
.progress-container {
    padding: 30px 40px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 14%;  /* 1/7 sections = ~14% */
}

.progress-text {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

/* Tab Navigation */
.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    overflow-x: auto;
    padding: 0 40px;
}

.tab {
    flex: 1;
    min-width: 140px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
    background: transparent;
}

.tab:hover {
    background: rgba(102, 126, 234, 0.1);
}

.tab.active {
    background: white;
    border-bottom: 3px solid #667eea;
    font-weight: 600;
}

.tab-number {
    display: block;
    width: 32px;
    height: 32px;
    margin: 0 auto 8px;
    background: #e9ecef;
    border-radius: 50%;
    line-height: 32px;
    font-weight: 700;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.tab.active .tab-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.1);
}

.tab.completed .tab-number {
    background: #28a745;
    color: white;
}

.tab.completed .tab-number::after {
    content: "✓";
}

.tab-title {
    display: block;
    font-size: 0.9em;
    color: #666;
}

.tab.active .tab-title {
    color: #667eea;
    font-weight: 600;
}

/* Form Content */
.tab-content {
    display: none;
    padding: 40px;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

.tab-content h2 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 2em;
    font-weight: 700;
}

.section-description {
    color: #666;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    border-radius: 4px;
    font-size: 1.05em;
}

/* Form Groups */
.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 1.05em;
}

.form-group label::after {
    content: " *";
    color: #dc3545;
    display: none;
}

.form-group input[required] + .field-explanation::before,
.form-group textarea[required] + .field-explanation::before,
.form-group select[required] + .field-explanation::before {
    content: "* Required field";
    display: block;
    color: #dc3545;
    font-size: 0.85em;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s ease;
}

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

.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown),
.form-group select:invalid {
    border-color: #dc3545;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Field Explanations */
.field-explanation {
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #17a2b8;
    border-radius: 4px;
    font-size: 0.95em;
    line-height: 1.6;
    color: #555;
}

.field-explanation strong {
    color: #333;
    display: inline-block;
    margin-right: 5px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: space-between;
    padding: 30px 40px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    gap: 15px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.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-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

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

/* Output Section */
.output-section {
    padding: 40px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.output-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 2em;
}

.output-preview {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    max-height: 600px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.output-preview h1 {
    color: #667eea;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.output-preview h2 {
    color: #764ba2;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.output-preview h3 {
    color: #555;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.output-preview p {
    margin-bottom: 15px;
}

.output-preview ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

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

.download-buttons .btn {
    flex: 1;
    min-width: 180px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .tabs {
        padding: 0 20px;
        flex-wrap: nowrap;
    }

    .tab {
        min-width: 100px;
        padding: 15px 10px;
    }

    .tab-number {
        width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 0.85em;
    }

    .tab-title {
        font-size: 0.8em;
    }

    .tab-content {
        padding: 25px 20px;
    }

    .tab-content h2 {
        font-size: 1.6em;
    }

    .action-buttons {
        padding: 20px;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .download-buttons {
        flex-direction: column;
    }

    .download-buttons .btn {
        width: 100%;
    }

    .output-section {
        padding: 25px 20px;
    }

    .progress-container {
        padding: 20px;
    }
}

/* Accessibility */
.btn:focus,
.tab:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "Processing...";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px 40px;
    border-radius: 8px;
    font-size: 1.2em;
    z-index: 9999;
}

/* Tooltips */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 0.85em;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
    }

    header,
    .progress-container,
    .tabs,
    .action-buttons {
        display: none;
    }

    .tab-content {
        display: block !important;
        page-break-inside: avoid;
    }

    .output-section {
        page-break-before: always;
    }
}