/* Simulador de Motos - Estilos */
:root {
    --primary: #1B3A5F;
    --secondary: #F5A623;
    --accent: #FF8C00;
    --light: #F8F9FA;
    --dark: #2C3E50;
    --border: #E0E0E0;
    --white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
}

/* Container */
.mfs-container {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--light);
    min-height: 100vh;
}

/* Header */
.mfs-header {
    background: var(--primary);
    color: var(--white);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.mfs-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mfs-logo h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
}

.mfs-icon {
    font-size: 2.2rem;
}

/* Botón selector de moto */
.moto-selector-btn {
    background: var(--secondary);
    color: var(--primary);
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.moto-selector-btn:hover {
    background: var(--accent);
    transform: scale(1.02);
}

.moto-selector-btn .icon {
    font-size: 1.3rem;
}

/* Modal */
.moto-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.moto-modal-overlay.active {
    display: flex;
}

.moto-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 950px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.moto-modal-header {
    background: var(--primary);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.moto-modal-header h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.moto-modal-close {
    background: var(--secondary);
    border: none;
    color: var(--primary);
    width: 42px;
    height: 42px;
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.moto-modal-close:hover {
    background: var(--accent);
    transform: rotate(90deg);
}

.moto-modal-body {
    padding: 25px;
    overflow-y: auto;
    max-height: calc(85vh - 82px);
}

.moto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.moto-card {
    background: var(--light);
    border: 3px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.moto-card:hover {
    border-color: var(--secondary);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.moto-card.selected {
    border-color: var(--secondary);
    background: #fff8e6;
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.3);
}

.moto-card-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: white;
    padding: 15px;
}

.moto-card-info {
    padding: 15px;
    background: var(--primary);
    color: white;
}

.moto-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
}

.moto-card-specs {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 5px;
}

/* Main Content */
.mfs-main-content {
    display: flex;
    min-height: calc(100vh - 130px);
}

/* Settings Panel */
.mfs-settings-panel {
    width: 380px;
    background: var(--white);
    border-right: 2px solid var(--border);
    display: flex;
    flex-direction: column;
}

/* Tabs */
.mfs-tabs {
    display: flex;
    background: var(--primary);
}

.mfs-tab {
    flex: 1;
    padding: 14px 8px;
    border: none;
    background: transparent;
    color: var(--white);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.mfs-tab:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.mfs-tab.active {
    opacity: 1;
    background: var(--secondary);
    color: var(--primary);
}

.mfs-tab-icon {
    font-size: 1.3rem;
}

/* Tab Content */
.mfs-tab-content {
    display: none;
    padding: 18px;
    overflow-y: auto;
    flex: 1;
}

.mfs-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Panel Header */
.mfs-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: var(--primary);
    color: var(--white);
    border-radius: 8px;
    margin-bottom: 18px;
}

.mfs-panel-header h3 {
    margin: 0;
    flex: 1;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.mfs-panel-icon {
    font-size: 1.4rem;
}

/* Control Groups */
.mfs-control-group {
    margin-bottom: 18px;
}

.mfs-control-group.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.mfs-label {
    display: block;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Slider Container */
.mfs-slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--light);
    padding: 12px 14px;
    border-radius: 8px;
    border: 2px solid var(--border);
}

.mfs-control-icon {
    font-size: 1.2rem;
    min-width: 28px;
    text-align: center;
}

.mfs-value {
    min-width: 55px;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
}

.mfs-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.mfs-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--secondary);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid var(--primary);
    transition: transform 0.2s;
}

.mfs-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Toggle Container */
.mfs-toggle-container {
    display: flex;
    gap: 8px;
    background: var(--light);
    padding: 8px;
    border-radius: 8px;
    border: 2px solid var(--border);
}

.mfs-toggle-btn {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid var(--border);
    background: var(--white);
    color: var(--dark);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.mfs-toggle-btn:hover {
    border-color: var(--secondary);
}

.mfs-toggle-btn.active {
    background: var(--secondary);
    color: var(--primary);
    border-color: var(--secondary);
}

/* Preview Area */
.mfs-preview-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--white);
    padding: 20px;
}

.mfs-preview-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 4px solid var(--primary);
    border-radius: 12px;
    overflow: hidden;
    background: var(--light);
}

.mfs-motorcycle-display {
    flex: 0 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    width: 972px;
    height: 648px;
}

#mfs-motorcycle-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
    display: none;
}

#mfs-motorcycle-image.visible {
    display: block;
}

.mfs-rider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: none;
}

.mfs-rider-overlay.visible {
    display: block;
}

/* Placeholder */
.moto-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.moto-placeholder.hidden {
    display: none;
}

.moto-placeholder-icon {
    font-size: 100px;
    margin-bottom: 20px;
    opacity: 0.4;
}

.moto-placeholder-text {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 25px;
}

/* Motorcycle Title */
.mfs-motorcycle-title {
    background: var(--primary);
    color: var(--secondary);
    padding: 18px 25px;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

/* Footer */
.mfs-footer {
    background: var(--primary);
    color: var(--white);
    text-align: center;
    padding: 12px;
    font-size: 0.85rem;
}

.mfs-footer p {
    margin: 0;
}

/* Panel de Información Ergonómica */
.mfs-ergo-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(27, 58, 95, 0.95);
    color: white;
    padding: 20px;
    border-radius: 12px;
    min-width: 280px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    z-index: 10;
    animation: slideInRight 0.4s ease;
}

@keyframes slideInRight {
    from { 
        opacity: 0;
        transform: translateX(30px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

.mfs-ergo-info h4 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: var(--secondary);
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 8px;
}

.mfs-ergo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mfs-ergo-item:last-child {
    border-bottom: none;
}

.mfs-ergo-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.mfs-ergo-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--secondary);
    min-width: 60px;
    text-align: right;
}

/* Responsive */
@media (max-width: 1024px) {
    .mfs-main-content {
        flex-direction: column;
    }
    
    .mfs-settings-panel {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid var(--border);
    }
    
    .mfs-tab-content {
        max-height: 350px;
    }
}

@media (max-width: 768px) {
    .mfs-header {
        flex-direction: column;
        text-align: center;
    }
    
    .moto-selector-btn {
        width: 100%;
        justify-content: center;
    }
    
    .mfs-tabs {
        flex-wrap: wrap;
    }
    
    .mfs-tab {
        flex: 1 1 50%;
    }
    
    .moto-grid {
        grid-template-columns: 1fr;
    }
    
    .mfs-ergo-panel {
        position: relative;
        top: 0;
        right: 0;
        margin: 15px;
        min-width: auto;
    }
}
