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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    color: #e0e0e0;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    max-width: 100vw;
}

.header {
    background: rgba(30, 30, 46, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 100;
    flex-shrink: 0;
    min-height: 60px;
    gap: 1rem;
}

.header-left {
    flex: 1;
    min-width: 0;
}

.title {
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.25rem 0;
    line-height: 1;
}

.header-description {
    font-size: 0.8rem;
    color: #b4b4c5;
    margin: 0;
    line-height: 1.4;
    font-style: italic;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.header-description.visible {
    opacity: 1;
    max-height: 40px;
    margin-top: 0.25rem;
}

.stats {
    display: flex;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stat-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    line-height: 1;
}

.content {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
    min-height: 0;
    max-height: calc(100vh - 60px);
}

#canvas {
    flex: 1;
    display: block;
    background: #000;
    min-width: 0;
    min-height: 0;
}

.control-panel {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    background: rgba(30, 30, 46, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.control-section {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #b4b4c5;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-group {
    margin-bottom: 1.25rem;
}

.control-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    color: #ccc;
}

.control-value {
    color: #667eea;
    font-weight: 600;
}

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

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn {
    width: 100%;
    padding: 0.6rem 1rem;
    margin-bottom: 0.6rem;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

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

.btn-preset {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.btn-preset:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

.btn-preset.active {
    background: rgba(102, 126, 234, 0.4);
    border-color: rgba(102, 126, 234, 0.7);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

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

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

.preset-description {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #b4b4c5;
    margin: 0;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

#descriptionSection {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
