/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 5px;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    font-size: 1.1rem;
    font-style: italic;
}

/* Navigation */
.navigation {
    background: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-link {
    color: #ecf0f1;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-link.active {
    background: #e74c3c;
    border-color: #c0392b;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

/* Main Content */
.main-content {
    padding: 40px 0;
    flex: 1;
}

.canvas-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
}

#artCanvas {
    border: 2px solid #34495e;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    max-width: 100%;
    height: auto;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 120px;
}

.btn-primary {
    background: #27ae60;
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-primary:hover {
    background: #2ecc71;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.btn-secondary {
    background: #e74c3c;
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-secondary:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.btn-tertiary {
    background: #f39c12;
    color: white;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.btn-tertiary:hover {
    background: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

/* Info Panel */
.info-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.info-panel h3 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.info-panel p {
    color: #7f8c8d;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Audio Controls */
.audio-controls {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.audio-controls audio {
    width: 100%;
    max-width: 400px;
    margin-bottom: 15px;
}

.audio-credit {
    color: #7f8c8d;
    font-style: italic;
    margin: 0;
}

/* Footer */
.footer {
    background: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(10px);
    color: #ecf0f1;
    padding: 30px 0;
    text-align: center;
    margin-top: auto;
}

.footer p {
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .nav-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        justify-items: center;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .nav-link {
        width: 150px;
        text-align: center;
        font-size: 0.9rem;
        padding: 8px 15px;
    }
    
    /* El quinto elemento ocupará las dos columnas */
    .nav-list li:nth-child(5) {
        grid-column: 1 / -1;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .btn {
        width: 180px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .canvas-container {
        max-width: 400px;
    }
    
    .info-panel-container {
        height: 140px;
    }
    
    .controls-container {
        height: 140px;
    }
    
    .audio-container {
        height: 100px;
    }
    
    .audio-controls audio {
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .header h1 {
        font-size: 1.6rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .nav-list {
        grid-template-columns: 1fr;
        max-width: 250px;
    }
    
    .nav-list li:nth-child(5) {
        grid-column: 1;
    }
    
    .nav-link {
        width: 200px;
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    .canvas-container {
        max-width: 300px;
    }
    
    .btn {
        width: 160px;
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .info-panel h3 {
        font-size: 1.4rem;
    }
    
    .info-panel p {
        font-size: 0.9rem;
    }
    
    .audio-controls audio {
        max-width: 250px;
    }
    
    .audio-credit {
        font-size: 0.8rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-content {
    animation: fadeIn 0.6s ease-out;
}

/* Loading animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Estilos para canvas solapados */
.canvas-viewer {
    position: relative;
}

.info-panel-container {
    position: relative;
    height: 130px;
    margin-bottom: 30px;
}

.info-panel-container .info-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    margin-bottom: 0;
    transition: opacity 0.3s ease-in-out;
}

.active-info {
    opacity: 1;
    z-index: 10;
}

.hidden-info {
    opacity: 0;
    z-index: 1;
}

.canvas-container-wrapper {
    position: relative;
    margin-bottom: 30px;
}

.canvas-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* Aspecto cuadrado */
    max-width: 500px;
    max-height: 500px;
    margin: 0 auto;
}

.art-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid #34495e;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    transition: opacity 0.3s ease-in-out;
}

.canvas-dark {
    background-color: #000000 !important;
}

.active-canvas {
    opacity: 1;
    z-index: 10;
}

.hidden-canvas {
    opacity: 0;
    z-index: 1;
}

.controls-container {
    position: relative;
    height: 60px;
    margin-bottom: 30px;
}

.controls-container .controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    margin-bottom: 0;
    transition: opacity 0.3s ease-in-out;
}

.active-controls {
    opacity: 1;
    z-index: 10;
}

.hidden-controls {
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.audio-container {
    position: relative;
    height: 120px;
}

.audio-container .audio-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    margin-bottom: 0;
    transition: opacity 0.3s ease-in-out;
}

.active-audio {
    opacity: 1;
    z-index: 10;
}

.hidden-audio {
    opacity: 0;
    z-index: 1;
}