/* pedal/css/pedal-style.css - STILURI PENTRU PEDALE INTERACTIVE 3D */

/* ========== RESET & BASE ========== */
.pedal-body {
    background: linear-gradient(135deg, #1a2a3a, #0d1b2a);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

/* ========== CONTAINER PRINCIPAL ========== */
.pedal-main-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: rgba(30, 40, 50, 0.95);
    border-radius: 16px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 2px solid #4ECDC4;
    overflow: hidden;
    position: relative;
}

/* ========== TITLU PEDALE ========== */
.pedal-panel-title {
    background: linear-gradient(90deg, #1a5f7a, #2a8fb5);
    color: white;
    padding: 16px 20px;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid rgba(78, 205, 196, 0.4);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

/* ========== SECTIUNE 3D PEDALE INTERACTIVE ========== */
.pedal-3d-section {
    padding: 15px;
    background: rgba(20, 30, 40, 0.8);
    position: relative;
    touch-action: none; /* Pentru drag & drop smooth pe mobile */
}

.pedal-3d-wrapper {
    position: relative;
    width: 100%;
    height: 400px; /* Înalt pentru mai multă interacțiune */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.5),
        0 5px 15px rgba(0, 0, 0, 0.4);
    border: 2px solid #2a3a4a;
    background: linear-gradient(180deg, #0a2a3a 0%, #123445 100%);
    cursor: pointer;
}

#pedal3dCanvas {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none; /* Dezactivează zoom-ul pe touch */
}

/* ========== INSTRUCTIUNI INTERACTIVE ========== */
.pedal-instructions {
    text-align: center;
    padding: 12px;
    color: #4ECDC4;
    font-size: 13px;
    font-style: italic;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    margin-top: 10px;
    border: 1px solid rgba(78, 205, 196, 0.2);
    line-height: 1.4;
}

.pedal-instructions strong {
    color: #FFD93D;
    font-weight: 600;
}

/* ========== MOBILE INSTRUCTIONS SPECIALE ========== */
.pedal-mobile-hint {
    background: rgba(255, 215, 61, 0.1);
    border-left: 4px solid #FFD93D;
    padding: 10px 15px;
    margin: 10px 15px;
    border-radius: 6px;
    font-size: 12px;
    color: #FFD93D;
    display: none; /* Se afișează doar pe mobile */
}

.pedal-mobile-hint.active {
    display: block;
}

.pedal-mobile-hint h4 {
    margin: 0 0 5px 0;
    font-size: 13px;
    font-weight: 600;
}

.pedal-mobile-hint ul {
    margin: 0;
    padding-left: 20px;
}

.pedal-mobile-hint li {
    margin-bottom: 3px;
}

.pedal-mobile-hint li span {
    color: #4ECDC4;
    font-weight: 600;
}

/* ========== LOADING ========== */
#loadingPedal3d {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #4ECDC4;
    font-size: 14px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.85);
    padding: 15px 25px;
    border-radius: 10px;
    border: 1px solid #4ECDC4;
    z-index: 10;
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    text-align: center;
    min-width: 200px;
}

#loadingPedal3d::after {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    margin: 10px auto 0;
    border: 3px solid rgba(78, 205, 196, 0.3);
    border-top-color: #4ECDC4;
    border-radius: 50%;
    animation: pedal-spin 1s linear infinite;
}

@keyframes pedal-spin {
    to { transform: rotate(360deg); }
}

/* ========== STATUS INDICATORS ========== */
.pedal-status-container {
    background: rgba(20, 30, 40, 0.9);
    border-radius: 10px;
    padding: 15px;
    margin: 15px;
    border: 1px solid rgba(78, 205, 196, 0.3);
    backdrop-filter: blur(10px);
}

.pedal-status-title {
    color: #4ECDC4;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pedal-status-title::before,
.pedal-status-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #4ECDC4, transparent);
}

.pedal-status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.pedal-status-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 12px 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pedal-status-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.pedal-status-item.active {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.15), rgba(78, 205, 196, 0.05));
    border-color: rgba(78, 205, 196, 0.5);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 8px rgba(78, 205, 196, 0.2),
        inset 0 0 20px rgba(78, 205, 196, 0.1);
}

.pedal-status-label {
    color: #4a9eff;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pedal-status-value {
    color: #00ff00;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 15px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

/* HIGHLIGHT pentru pedală activă */
.pedal-status-item:nth-child(1) .pedal-status-value {
    color: #4ECDC4;
}

.pedal-status-item:nth-child(1).active {
    border-color: #4ECDC4;
}

.pedal-status-item:nth-child(2) .pedal-status-value {
    color: #FF6B6B;
}

.pedal-status-item:nth-child(2).active {
    border-color: #FF6B6B;
}

.pedal-status-item:nth-child(3) .pedal-status-value {
    color: #FFD93D;
}

.pedal-status-item:nth-child(3).active {
    border-color: #FFD93D;
}

/* ========== FEEDBACK VISUAL ========== */
.pedal-feedback {
    text-align: center;
    padding: 10px;
    margin: 10px 15px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: #4a9eff;
    min-height: 20px;
    transition: all 0.3s ease;
}

.pedal-feedback.active {
    background: rgba(78, 205, 196, 0.1);
    border-color: rgba(78, 205, 196, 0.3);
    color: #4ECDC4;
}

/* ========== MOBILE FEEDBACK OVERLAYS ========== */
#mobileHint {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, rgba(20, 30, 50, 0.95), rgba(30, 40, 60, 0.95));
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(78, 205, 196, 0.5);
    box-shadow: 
        0 5px 20px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    max-width: 90%;
    text-align: center;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

#mobileHint.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

#mobileFeedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: linear-gradient(135deg, rgba(10, 20, 40, 0.95), rgba(20, 30, 50, 0.95));
    padding: 25px 40px;
    border-radius: 35px;
    font-size: 28px;
    font-weight: 800;
    z-index: 1001;
    pointer-events: none;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid currentColor;
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.7),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px);
    text-transform: uppercase;
    letter-spacing: 2px;
    min-width: 200px;
    text-align: center;
    text-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.5),
        0 0 20px currentColor;
}

#mobileFeedback.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Animație de puls pentru feedback */
@keyframes pedal-pulse {
    0% { box-shadow: 0 0 0 0 rgba(78, 205, 196, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(78, 205, 196, 0); }
    100% { box-shadow: 0 0 0 0 rgba(78, 205, 196, 0); }
}

.pedal-status-item.pulse {
    animation: pedal-pulse 1.5s ease-in-out;
}

/* ========== TOUCH INDICATORS (pentru mobile) ========== */
.pedal-touch-indicator {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(78, 205, 196, 0.2);
    border: 2px solid rgba(78, 205, 196, 0.8);
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.pedal-touch-indicator.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ========== CONTROL PANEL (opțional) ========== */
.pedal-control-panel {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: rgba(20, 30, 40, 0.8);
    margin: 15px;
    border-radius: 10px;
    border: 1px solid rgba(78, 205, 196, 0.2);
}

.pedal-control-btn {
    background: linear-gradient(135deg, #2a3a4a, #1a2a3a);
    color: #e0e0e0;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(78, 205, 196, 0.3);
    flex: 1;
    max-width: 120px;
}

.pedal-control-btn:hover {
    background: linear-gradient(135deg, #3a4a5a, #2a3a4a);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(78, 205, 196, 0.2);
}

.pedal-control-btn:active {
    transform: translateY(0);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .pedal-body {
        padding: 15px 10px;
    }
    
    .pedal-main-container {
        max-width: 100%;
        border-radius: 14px;
    }
    
    .pedal-3d-wrapper {
        height: 350px;
    }
    
    .pedal-status-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .pedal-status-item {
        padding: 10px 8px;
    }
    
    .pedal-control-panel {
        flex-wrap: wrap;
    }
    
    .pedal-control-btn {
        min-width: 100px;
    }
    
    #mobileFeedback {
        font-size: 24px;
        padding: 20px 30px;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .pedal-body {
        padding: 10px 5px;
    }
    
    .pedal-main-container {
        border-radius: 12px;
    }
    
    .pedal-panel-title {
        padding: 12px 15px;
        font-size: 1.1rem;
    }
    
    .pedal-3d-wrapper {
        height: 300px;
    }
    
    .pedal-status-container {
        margin: 10px;
        padding: 12px;
    }
    
    .pedal-instructions {
        font-size: 12px;
        padding: 10px;
    }
    
    #mobileFeedback {
        font-size: 20px;
        padding: 15px 25px;
        min-width: 160px;
        border-radius: 30px;
    }
    
    #mobileHint {
        font-size: 13px;
        padding: 10px 15px;
        max-width: 95%;
    }
    
    .pedal-control-btn {
        padding: 8px 15px;
        font-size: 12px;
    }
}

/* Detecție device mobil - se aplică doar pe mobile */
@media (hover: none) and (pointer: coarse) {
    .pedal-body {
        cursor: default;
    }
    
    .pedal-mobile-hint {
        display: block;
    }
    
    .pedal-3d-wrapper {
        cursor: default;
    }
    
    /* Mărește zonele touch pentru pedale */
    .pedal-status-item {
        min-height: 70px;
    }
}

/* Dark mode optimizations */
@media (prefers-color-scheme: dark) {
    .pedal-body {
        background: linear-gradient(135deg, #0d1b2a, #050f1a);
    }
    
    .pedal-main-container {
        background: rgba(15, 25, 35, 0.95);
    }
    
    .pedal-status-container {
        background: rgba(10, 20, 30, 0.9);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .pedal-main-container {
        border: 3px solid #4ECDC4;
    }
    
    .pedal-status-value {
        font-weight: 900;
    }
    
    #mobileFeedback {
        border-width: 3px;
    }
}