* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    overflow: hidden;
    background: #0a0a0a;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
canvas {
    display: block;
    cursor: crosshair;
}
.start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.60);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    color: #fff;
    text-align: center;
    padding: 40px;
}
.start-screen.hidden {
    display: none;
}
.start-content {
    max-width: 600px;
    background: rgba(15, 15, 15, 0.75);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: fadeIn 0.5s ease-in;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.start-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #4a9eff;
    text-shadow: 0 0 20px rgba(74, 158, 255, 0.5);
}
.start-warning {
    background: rgba(255, 100, 100, 0.15);
    border: 1px solid rgba(255, 100, 100, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.start-warning strong {
    color: #ff6464;
    font-size: 18px;
    display: block;
    margin-bottom: 10px;
}
.start-credits {
    margin-bottom: 40px;
    font-size: 14px;
    color: #aaa;
    line-height: 1.8;
}
.start-credits strong {
    color: #fff;
    font-size: 16px;
}
.start-button {
    background: #4a9eff;
    border: none;
    color: white;
    padding: 18px 50px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.4);
}
.start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.6);
}
.start-button:active {
    transform: translateY(0);
}
.canvas-hidden {
    display: none;
}
.controls-hidden {
    display: none;
}
.controls {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(15, 15, 15, 0.75);
    padding: 24px;
    border-radius: 12px;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    max-height: 90vh;
    overflow-y: auto;
    width: 360px;
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    transition: width 0.3s ease, height 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.controls.minimized {
    width: 380px;
    height: auto;
    overflow: hidden;
}
.controls.minimized .section,
.controls.minimized .info {
    display: none;
}
.minimize-btn {
    background: transparent;
    border: none;
    color: #aaa;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: 18px;
    font-weight: 300;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    line-height: 1;
}
.minimize-btn:hover {
    color: #fff;
}
.controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.controls::-webkit-scrollbar {
    width: 6px;
}
.controls::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}
.controls::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}
h3 {
    margin-bottom: 0;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
h3 > span:first-of-type {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stats {
    font-size: 11px;
    color: #888;
    font-weight: normal;
    flex-shrink: 0;
    white-space: nowrap;
}
.section {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.control-group {
    margin-bottom: 18px;
}
.control-group:last-child {
    margin-bottom: 0;
}
label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #b0b0b0;
    font-weight: 400;
}
.value-display {
    color: #4a9eff;
    font-weight: 600;
    float: right;
}
input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #4a9eff;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}
input[type="range"]::-webkit-slider-thumb:hover {
    background: #5aaeff;
}
input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #4a9eff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}
select {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}
select option {
    background: #1a1a1a;
    color: #fff;
}
.input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}
.input-wrapper input[type="range"] {
    flex: 1;
}
input[type="number"] {
    width: 80px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: #fff;
    font-size: 13px;
    outline: none;
}
input[type="number"]:focus {
    border-color: #4a9eff;
    background: rgba(255, 255, 255, 0.15);
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    cursor: pointer;
}
button {
    background: #4a9eff;
    border: none;
    padding: 10px 16px;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
    font-weight: 500;
}
button:hover {
    background: #3a8eef;
    transform: translateY(-1px);
}
button.active {
    background: #2a7edf;
}
.color-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin: 3px;
    display: inline-block;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s;
    position: relative;
}
.color-btn:hover {
    transform: scale(1.15);
}
.color-btn.active {
    border-color: white;
    transform: scale(1.1);
}
.color-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    opacity: 0;
    transition: opacity 0.2s;
}
.color-btn.active::after {
    opacity: 1;
}
.info {
    font-size: 11px;
    color: #888;
    margin-top: 15px;
    line-height: 1.6;
}
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.button-group button {
    margin: 0;
    flex: 1;
    min-width: calc(50% - 3px);
}
.toggle-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #b0b0b0;
    transition: all 0.2s;
}
.toggle-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: translateY(-1px);
}
.toggle-button.active {
    background: #4a9eff;
    border-color: #4a9eff;
    color: white;
    box-shadow: 0 2px 8px rgba(74, 158, 255, 0.3);
}
.toggle-button.active:hover {
    background: #3a8eef;
    border-color: #3a8eef;
}
input[type="color"] {
    width: 100%;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    cursor: pointer;
    background: transparent;
}
.color-picker-wrapper {
    margin-top: 10px;
}
.preset-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.preset-grid button {
    margin: 0;
}
.section-title {
    font-size: 13px;
    color: #d0d0d0;
    margin-bottom: 14px;
    text-transform: none;
    letter-spacing: 0.3px;
    font-weight: 500;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    transition: color 0.2s;
}
.section-title:hover {
    color: #fff;
}
.section-title::after {
    content: '▼';
    font-size: 9px;
    transition: transform 0.3s ease;
    opacity: 0.6;
}
.section.collapsed .section-title::after {
    transform: rotate(-90deg);
}
.section-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    opacity: 1;
}
.section.collapsed .section-content {
    max-height: 0;
    margin-bottom: 0;
    opacity: 0;
}
.section:not(.collapsed) .section-content {
    max-height: 5000px;
}
.notification {
    position: fixed;
    right: 20px;
    background: rgba(15, 15, 15, 0.75);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    padding: 16px 20px;
    border-radius: 12px;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 10001;
    max-width: 320px;
    min-width: 280px;
    font-size: 13px;
    line-height: 1.5;
    animation: slideInRight 0.3s ease-out;
    transition: opacity 0.3s, transform 0.3s, top 0.3s;
}
.notification.hiding {
    opacity: 0;
    transform: translateX(100%);
}
.notification-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #d0d0d0;
    font-size: 14px;
}
.notification-message {
    color: #ccc;
    margin-bottom: 12px;
}
.notification-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.notification-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    font-weight: 500;
}
.notification-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}
.notification-btn.primary {
    background: rgba(74, 158, 255, 0.3);
    border-color: rgba(74, 158, 255, 0.5);
}
.notification-btn.primary:hover {
    background: rgba(74, 158, 255, 0.4);
}
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

