/* ModelForge Admin Styles */

.modelforge-wrap {
    background: #f5f5f5;
    margin: 20px 20px 20px 0;
    padding: 30px;
    border-radius: 12px;
}

.modelforge-wrap h1 {
    font-size: 32px;
    margin-bottom: 25px;
    color: #23282d;
}

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

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 40px;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #0073aa;
}

/* Builder Steps */
.modelforge-steps {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    padding: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 30px;
    background: #e0e0e0;
    margin: 0 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.step.active {
    background: #0073aa;
    color: white;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    color: #0073aa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 8px;
}

.step.active .step-number {
    background: #0073aa;
    color: white;
    border: 2px solid white;
}

.step-label {
    font-size: 14px;
    font-weight: 600;
}

/* Builder Content */
.modelforge-builder {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.builder-step {
    animation: fadeIn 0.5s;
}

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

.builder-step h2 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #23282d;
}

/* Preset Grid */
.presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.preset-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.preset-card:hover {
    border-color: #0073aa;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,115,170,0.15);
}

.preset-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.preset-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #23282d;
}

.preset-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    min-height: 60px;
}

.preset-card .button {
    width: 100%;
}

/* Form Styles */
.form-table th {
    width: 200px;
    padding: 15px 10px 15px 0;
}

.form-table td {
    padding: 15px 10px;
}

#dynamic-fields {
    margin: 20px 0;
}

.dynamic-field-group {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.dynamic-field-group h4 {
    margin-top: 0;
    color: #0073aa;
}

/* Preview Section */
.modelforge-preview {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.preview-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h3 {
    margin: 0;
    font-size: 18px;
}

.modelforge-preview pre {
    margin: 0;
    padding: 25px;
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
    max-height: 500px;
}

/* Instructions Box */
.notice.notice-info {
    background: #e7f5ff;
    border-left-color: #0073aa;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.notice h4 {
    margin-top: 0;
    color: #0073aa;
}

.notice code {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* Downloads Page */
.modelforge-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.modelforge-empty-state h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.modelforge-empty-state p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.modelforge-downloads table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

/* Modal */
.modelforge-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modelforge-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modelforge-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: 700;
    cursor: pointer;
    color: #999;
}

.modelforge-modal-close:hover {
    color: #000;
}

.modelforge-modal-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    max-height: 400px;
}

.modelforge-modal-actions {
    margin-top: 20px;
    text-align: right;
}

.modelforge-modal-actions .button {
    margin-left: 10px;
}

/* Admin Tools */
.modelforge-admin-tools {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Settings Page */
.form-section-header {
    margin-top: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

/* Buttons */
.button-hero {
    padding: 12px 36px !important;
    font-size: 16px !important;
    height: auto !important;
}

/* Responsive */
@media (max-width: 768px) {
    .modelforge-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .presets-grid {
        grid-template-columns: 1fr;
    }
    
    .modelforge-steps {
        flex-direction: column;
        gap: 10px;
    }
    
    .step {
        width: 100%;
        margin: 0;
    }
}

/* Loading Spinner */
.modelforge-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success/Error Messages */
.modelforge-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modelforge-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.modelforge-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Range Slider */
input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0073aa;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0073aa;
    cursor: pointer;
}

/* Compile Status (v3.0.3) */
.modelforge-compile-status {
    text-align: center;
    padding: 60px 20px;
}

.compile-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #0073aa;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

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

#compile-message {
    font-size: 18px;
    color: #666;
    margin: 20px 0;
}

.compile-progress {
    max-width: 400px;
    margin: 30px auto;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    height: 20px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0073aa 0%, #00a0d2 100%);
    transition: width 0.3s ease;
    border-radius: 10px;
}

#compile-result {
    text-align: center;
    padding: 40px 20px;
}

#compile-result .notice {
    margin: 0 auto 30px;
    max-width: 600px;
}
