* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0e27;
    color: white;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.header h1 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 280px;
    background: #1a1f3a;
    border-right: 1px solid #2a3254;
    padding: 1rem;
    overflow-y: auto;
}

.sidebar h2 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #a5b4fc;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.canvas-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #000;
    position: relative;
}

.canvas-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 5;
}

.logo-overlay {
    position: absolute;
    z-index: 10;
    pointer-events: none;
    display: block; /* SEMPRE VISÍVEL */
    transition: all 0.3s ease;
    opacity: 1;
}

.controls {
    background: #1a1f3a;
    border-top: 1px solid #2a3254;
    padding: 1rem 2rem;
}

.upload-area {
    border: 2px dashed #4c5fd5;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.upload-area:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    transform: translateY(-2px);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.progress-area {
    flex: 1;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #2a3254;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #a5b4fc;
    margin-top: 0.5rem;
}

.layer {
    background: #2a3254;
    padding: 0.875rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.layer:hover {
    background: #323a5e;
    transform: translateX(5px);
}

.layer.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #a5b4fc;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.layer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.layer-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.layer-actions {
    display: flex;
    gap: 0.25rem;
}

.layer-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.layer-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.layer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #c7d2fe;
}

.color-preview {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.properties {
    width: 340px;
    background: #1a1f3a;
    border-left: 1px solid #2a3254;
    padding: 1rem;
    overflow-y: auto;
}

.property-group {
    margin-bottom: 1.5rem;
}

.property-label {
    font-size: 0.875rem;
    color: #a5b4fc;
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 500;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: #2a3254;
    border: 1px solid #4c5fd5;
    border-radius: 0.5rem;
    color: white;
    font-size: 0.875rem;
    transition: all 0.3s;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: #2a3254;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

input[type="color"] {
    width: 100%;
    height: 45px;
    border: 2px solid #4c5fd5;
    border-radius: 0.5rem;
    cursor: pointer;
    background: #2a3254;
}

.btn {
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 0.5rem;
    color: white;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #2a3254;
    box-shadow: none;
}

.btn-secondary:hover {
    background: #323a5e;
}

.add-layer-btn {
    width: 100%;
    padding: 0.875rem;
    background: transparent;
    border: 2px dashed #4c5fd5;
    border-radius: 0.5rem;
    color: #a5b4fc;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.875rem;
    font-weight: 500;
}

.add-layer-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

input[type="file"] {
    display: none;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.settings-section {
    background: #2a3254;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.settings-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #c7d2fe;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-upload-btn {
    width: 100%;
    padding: 0.75rem;
    background: #2a3254;
    border: 2px solid #4c5fd5;
    border-radius: 0.5rem;
    color: #a5b4fc;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.file-upload-btn:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.preset-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.preset-btn {
    padding: 0.5rem;
    background: #2a3254;
    border: 1px solid #4c5fd5;
    border-radius: 0.375rem;
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.preset-btn:hover {
    background: #667eea;
    transform: translateY(-1px);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1f3a;
}

::-webkit-scrollbar-thumb {
    background: #4c5fd5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #667eea;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #1a1f3a;
    margin: 10% auto;
    padding: 0;
    border: 1px solid #2a3254;
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #2a3254;
}

.modal-header h2 {
    margin: 0;
    color: #a5b4fc;
    font-size: 1.3rem;
}

.modal-close {
    background: transparent;
    border: none;
    color: #a5b4fc;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #2a3254;
    color: white;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1.5rem;
    border-top: 1px solid #2a3254;
}

/* Background Animation Styles */
.bg-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.bg-particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.8), transparent);
    animation: float 10s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-20px) translateX(10px); }
}