/* ============================================================================
   UNIFIED DEMO TAB - OCEAN BLUE THEME
   ============================================================================ */

/* Demo Sub-tabs */
.demo-subtabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.demo-subtab-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1rem;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.demo-subtab-btn:hover {
    border-color: #80D0C7;
    color: #0093E9;
    transform: translateY(-2px);
}

.demo-subtab-btn.active {
    background: linear-gradient(135deg, #0093E9 0%, #80D0C7 100%);
    color: white;
    border-color: #0093E9;
}

.demo-subtab-btn i {
    font-size: 1.2rem;
}

/* Unified Settings Panel */
.unified-settings-panel {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #0093E9;
}

.unified-settings-panel h3 {
    color: #0093E9;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-row {
    margin-bottom: 2rem;
}

.settings-row:last-child {
    margin-bottom: 0;
}

.setting-group {
    background: rgba(0, 147, 233, 0.03);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.setting-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Model Grid */
.model-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.model-card {
    position: relative;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    overflow: hidden;
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 147, 233, 0.15);
    border-color: #0093E9;
}

.model-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.model-card input[type="radio"]:checked + label {
    background: linear-gradient(135deg, rgba(0, 147, 233, 0.1), rgba(128, 208, 199, 0.1));
    border-color: #0093E9;
}

.model-card input[type="radio"]:checked + label::after {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #0093E9;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
}

.model-card label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-align: center;
    gap: 0.5rem;
}

.model-card label i {
    font-size: 2rem;
    color: #0093E9;
    margin-bottom: 0.5rem;
}

.model-name {
    font-weight: 700;
    color: #212529;
    font-size: 0.95rem;
}

.model-metric {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 600;
}

.model-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #e9ecef;
    color: #495057;
    margin-top: 0.25rem;
}

.model-badge.best {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.model-badge.fast {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: white;
}

/* Parameters Grid */
.params-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.param-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.param-item:hover {
    border-color: #0093E9;
    box-shadow: 0 4px 15px rgba(0, 147, 233, 0.1);
}

.param-item label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.param-value {
    background: linear-gradient(135deg, #0093E9, #80D0C7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.875rem;
}

.param-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(90deg, #e9ecef 0%, #0093E9 100%);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 0.75rem;
}

.param-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid #0093E9;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 147, 233, 0.3);
}

.param-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid #0093E9;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 147, 233, 0.3);
}

.param-hint {
    display: flex;
    align-items: start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
    line-height: 1.4;
}

.hint-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

/* Demo Content Areas */
.demo-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.demo-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.demo-upload-area {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

/* Camera Controls */
.camera-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.camera-feed {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 2rem;
}

.camera-feed img {
    width: 100%;
    height: auto;
    display: block;
}

.camera-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: pulse 2s infinite;
}

.camera-status i {
    animation: blink 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
}

@keyframes blink {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0.3;
    }
}

.camera-info {
    background: rgba(0, 147, 233, 0.05);
    border-left: 4px solid #0093E9;
    padding: 1.5rem;
    border-radius: 8px;
}

.camera-info .info-box {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.camera-info i {
    font-size: 1.5rem;
    color: #0093E9;
}

.camera-info p {
    margin: 0;
    color: #495057;
}

/* Deprecated Notice */
.deprecated-notice {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-left: 5px solid #ffc107;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.deprecated-notice i {
    font-size: 2rem;
    color: #ff9800;
}

.deprecated-notice p {
    margin: 0;
    color: #856404;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .model-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .params-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .demo-subtabs {
        flex-direction: column;
    }
    
    .model-grid {
        grid-template-columns: 1fr;
    }
    
    .unified-settings-panel {
        padding: 1.5rem;
    }
    
    .camera-controls {
        flex-direction: column;
    }
}
