/* Music Master Beat - Estilos principales */

:root {
    --primary-color: #ff6b35;
    --secondary-color: #1a1a2e;
    --accent-color: #16213e;
    --background-color: #0f0f23;
    --surface-color: #1a1a2e;
    --text-primary: #ffffff;
    --text-secondary: #b8b8b8;
    --success-color: #4ade80;
    --warning-color: #fbbf24;
    --error-color: #ef4444;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--background-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Parallax Background */
.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 150vh;
    background: url('../assets/master beat/Cyber Punk Met.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    z-index: -1;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

/* Header */
.header {
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 2.5rem;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
}

.logo i {
    font-size: 2rem;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #ff8c61);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.6),
                 0 0 20px rgba(255, 107, 53, 0.4);
    filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.6));
}

.btn-help {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    padding: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.btn-help:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Main Container */
.main-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* BPM Section */
.bpm-section {
    text-align: center;
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bpm-display {
    margin-bottom: 1.5rem;
}

.bpm-value {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.8),
                 0 0 20px rgba(255, 107, 53, 0.6),
                 0 0 30px rgba(255, 107, 53, 0.4);
}

.bpm-label {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.bpm-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn-bpm {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    min-width: 50px;
}

.btn-bpm.btn-large {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.btn-bpm:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.bpm-slider-container {
    margin-top: 1rem;
}

.bpm-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.bpm-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.4);
}

.bpm-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.4);
}

.bpm-range {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Beat Indicator */
.beat-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.beat-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--surface-color) 0%, var(--accent-color) 100%);
    border: 3px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.beat-circle.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.6);
    transform: scale(1.05);
}

.beat-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    opacity: 0;
    transform: scale(1);
    pointer-events: none;
}

.beat-pulse.pulse {
    animation: pulse 0.6s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.beat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    z-index: 1;
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.8),
                 0 0 20px rgba(255, 107, 53, 0.6),
                 0 0 30px rgba(255, 107, 53, 0.4);
}

/* Time Signature & Subdivision */
.time-signature, .subdivision {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.signature-label, .subdivision-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.signature-controls, .subdivision-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-signature, .btn-subdivision {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 1.1rem;
}

.btn-signature.active, .btn-subdivision.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.btn-signature:hover, .btn-subdivision:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Play Controls */
.play-controls {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1rem 0;
}

.btn-play, .btn-tap {
    background: var(--primary-color);
    border: none;
    border-radius: var(--border-radius);
    color: white;
    padding: 1rem 2rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.btn-play:hover, .btn-tap:hover {
    background: #ff8c61;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

.btn-play.playing {
    background: var(--error-color);
}

.btn-play.playing:hover {
    background: #dc2626;
}

/* Volume Control */
.volume-control {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.volume-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    justify-content: center;
}

.volume-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

/* Presets */
.presets {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.presets-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--text-primary);
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.btn-preset {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    padding: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    text-align: center;
}

.btn-preset:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: var(--primary-color);
    font-size: 1.3rem;
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.6),
                 0 0 20px rgba(255, 107, 53, 0.4);
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-shadow: 0 0 8px rgba(255, 107, 53, 0.6),
                 0 0 16px rgba(255, 107, 53, 0.4);
}

.modal-body ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.modal-body li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.modal-body strong {
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .bpm-value {
        font-size: 3rem;
    }
    
    .beat-circle {
        width: 150px;
        height: 150px;
    }
    
    .beat-number {
        font-size: 2rem;
    }
    
    .bpm-controls {
        gap: 0.5rem;
    }
    
    .btn-bpm {
        padding: 0.5rem 0.75rem;
        min-width: 40px;
    }
    
    .play-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .presets-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .btn-preset {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 1rem;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .bpm-value {
        font-size: 2.5rem;
    }
    
    .beat-circle {
        width: 120px;
        height: 120px;
    }
    
    .beat-number {
        font-size: 1.5rem;
    }
    
    .signature-controls, .subdivision-controls {
        gap: 0.5rem;
    }
    
    .btn-signature, .btn-subdivision {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

/* Footer Styles */
.footer {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 165, 0, 0.2);
    margin-top: 3rem;
    padding: 2rem 0 1rem;
    border-radius: 20px 20px 0 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-branding {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo-img {
    height: 40px;
    width: auto;
    border-radius: 8px;
    filter: drop-shadow(0 0 8px rgba(255, 165, 0, 0.3));
}

.footer-text h3 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(255, 165, 0, 0.5);
}

.footer-text p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.8rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 165, 0, 0.1);
}

.footer-link:hover {
    color: var(--primary-color);
    background: rgba(255, 165, 0, 0.1);
    border-color: rgba(255, 165, 0, 0.3);
    text-shadow: 0 0 10px rgba(255, 165, 0, 0.5);
    transform: translateY(-2px);
}

.footer-copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 165, 0, 0.1);
    padding-top: 1.5rem;
}

.footer-copyright p {
    color: var(--text-muted);
    margin: 0.3rem 0;
    font-size: 0.8rem;
}

.footer-subtitle {
    color: var(--primary-color);
    font-style: italic;
    text-shadow: 0 0 8px rgba(255, 165, 0, 0.3);
}

/* Footer responsive */
@media (max-width: 768px) {
    .footer-branding {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .footer-content {
        padding: 0 1rem;
    }
}
