/* --- Home Page --- */
.page-header { text-align: center; padding: 40px 20px 20px; }
.page-header h1 { font-size: 2.5em; margin-bottom: 30px; }

.search-hero { 
    max-width: 700px; 
    margin: 0 auto 30px; 
    text-align: center;
}

.filters-container { max-width: 1000px; margin: 0 auto 30px; padding: 25px; border-radius: 12px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 20px; }
.range-inputs { display: flex; align-items: center; gap: 8px; }
.range-inputs span { color: var(--text-muted); font-size: 14px; flex-shrink: 0; }
.filter-actions { display: flex; gap: 12px; justify-content: flex-end; }

.results-section { max-width: 1200px; margin: 0 auto; }
.results-count { text-align: center; color: var(--text-light); margin-bottom: 25px; font-size: 16px; }
.filtered-badge { background: var(--primary); color: white; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; }

.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 20px; }
.model-card { display: block; transition: transform 0.2s, box-shadow 0.2s; color: inherit; }
.model-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.model-info { color: var(--text-light); font-size: 14px; margin: 5px 0; }
.model-creator { color: var(--primary); font-weight: 500; }
.rating { color: #f39c12; font-weight: bold; }
.no-models { text-align: center; padding: 40px; color: var(--text-muted); }

.pagination { margin-top: 40px; text-align: center; display: flex; justify-content: center; align-items: center; gap: 15px; }

/* --- Detail Page --- */
.model-header { border-bottom: 2px solid #eee; padding-bottom: 20px; margin-bottom: 30px; }
.model-header .rating { font-size: 20px; }
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 30px; }
.preview-section { text-align: center; }
.preview-image { max-width: 100%; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }

.info-row { margin: 15px 0; padding: 10px; background: #f8f9fa; border-radius: 4px; }
.info-label { font-weight: bold; color: var(--text-medium); display: inline-block; width: 150px; }
.info-value { color: var(--text-dark); }
.description { margin-top: 30px; padding: 20px; background: #f8f9fa; border-radius: 8px; line-height: 1.6; }

/* --- Mobile Layout --- */
@media (max-width: 768px) {
    .content-grid { 
        grid-template-columns: 1fr; 
        gap: 20px; 
    }
    
    .viewer-container canvas {
        width: 100% !important;
        height: auto !important;
        min-height: 40vh; 
    }
}

/* --- Upload Page --- */
.upload-container { max-width: 700px; margin: 40px auto; padding: 20px; }
.upload-form h2 { color: var(--primary); font-size: 1.3em; margin: 30px 0 15px 0; padding-bottom: 10px; border-bottom: 2px solid var(--border-color); }
.file-list { margin-top: 10px; padding: 10px; background: #f9f9f9; border-radius: 4px; font-size: 14px; }
.tags-container { position: relative; }
.tags-display { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; min-height: 20px; }

/* --- Login Page --- */
.login-container { max-width: 400px; margin: 100px auto; padding: 40px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }

/* --- Error Page --- */
.error-container { text-align: center; padding: 50px 20px; }
.error-container h1 { color: var(--danger); }

/* --- ADMIN PIPELINE DASHBOARD --- */
.admin-pipeline-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.pipeline-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: var(--surface-color, #ffffff);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.pipeline-table th, 
.pipeline-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color, #eeeeee);
}

.pipeline-table th {
    background-color: var(--background-alt, #f4f4f4);
    font-weight: 600;
}

.pipeline-preview-img {
    width: 100px;
    border-radius: 4px;
    object-fit: cover;
}

.pipeline-actions {
    vertical-align: middle; 
}

.pipeline-actions form {
    margin-bottom: 8px;
}

.pipeline-actions form:last-child {
    margin-bottom: 0;
}

.reject-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reject-input {
    padding: 6px;
    font-size: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.empty-state {
    background-color: #e9ecef;
    padding: 40px 20px;
    text-align: center;
    margin-top: 20px;
    border-radius: 8px;
    color: #6c757d;
}

.pipeline-preview-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-color, #ddd);
}

/* --- Admin Override Panel --- */
.admin-override-panel {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: var(--radius);
}

.admin-override-panel h3 {
    margin-top: 0;
    color: #856404;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.admin-override-panel p {
    font-size: 14px;
    color: var(--text-medium);
    margin-top: 0;
    margin-bottom: 15px;
}

.admin-override-form {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.admin-override-form input {
    flex-grow: 1;
    margin: 0;
}

/* --- Landing Page --- */
.hero-section {
    text-align: center;
    padding: 60px 20px 60px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 800;
    color: var(--secondary);
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-medium);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 30px;
    text-decoration: none;
    display: inline-block;
    font-weight: bold;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: white;
    color: var(--secondary);
    border: 2px solid var(--border-color);
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    color: var(--secondary);
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.5;
}

.support-section {
    background-color: white;
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 40px 20px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.support-section p {
    color: var(--text-medium);
    margin-bottom: 25px;
}