body {
    margin: 0;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    min-height: 100vh;
    display: flex;
    gap: 20px;
    transition: all 0.3s ease;
}

.container {
    display: flex;
    gap: 25px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    align-items: flex-start;
}

.canvas-container {
    background: #2c3e50;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.632);
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;
}

.canvas-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.canvas-buttons button {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
    margin: 0;
}

canvas {
    border: 2px solid #4a5568;
    border-radius: 10px;
    background: #000000;
    max-width: 100%;
    height: auto;
}

.controls {
    background: rgba(40,44,52,0.95);
    color: #e6e6e6;
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 380px;
    height: fit-content;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-height: 90vh;
    overflow-y: auto;
}

.control-group {
    margin-bottom: 10px;
}

.control-section {
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

.section-title {
    font-size: 13px;
    font-weight: 700;
    color: #e6e6e6;
    margin-bottom: 8px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #e6e6e6;
    font-size: 14px;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

input[type="number"] {
    width: 45px;
    padding: 3px 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 6px;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-group label {
    flex: 1;
    margin-bottom: 0;
    font-size: 12px;
    min-width: 0;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: start;
}

.column {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
}

.settings-group {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
    background: rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.settings-group:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.settings-group.active {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.settings-group.inactive {
    opacity: 0.4;
}

.settings-group.inactive:hover {
    opacity: 0.6;
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.locked {
    opacity: 0.6;
    pointer-events: none;
}

.locked input, .locked select {
    background-color: #f5f5f5;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.value-display {
    display: inline-block;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
    min-width: 30px;
    text-align: center;
}

button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    margin: 10px 0;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.color-input {
    width: 100%;
    height: 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-sizing: border-box;
}

h2 {
    margin-top: 0;
    color: #e6e6e6;
    text-align: center;
}

.status-indicator {
    background: #f0f0f0;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    margin: 10px 0;
    font-weight: 600;
    transition: all 0.3s ease;
}

.status-indicator.animating {
    background: #4ecdc4;
    color: white;
}

.status-indicator.complete {
    background: #27ae60;
    color: white;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.header-row h2 {
    margin: 0;
    line-height: 1;
    font-size: 1.6em;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.dark-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
}

.dark-mode-toggle:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.collapsible-section {
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.collapsible-header {
    background: rgba(255,255,255,0.1);
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s ease;
}

.collapsible-header:hover {
    background: rgba(255,255,255,0.2);
}

.collapsible-content {
    padding: 12px;
    display: none;
}

.collapsible-content.expanded {
    display: block;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.toggle-icon.expanded {
    transform: rotate(180deg);
}

body.dark-mode .collapsible-header {
    background: rgba(0,0,0,0.2);
}

body.dark-mode .collapsible-header:hover {
    background: rgba(0,0,0,0.3);
}

body.dark-mode .collapsible-section {
    border-color: rgba(255,255,255,0.1);
}

body.dark-mode .input-group label {
    color: #e6e6e6;
}

body.dark-mode input[type="radio"] {
    accent-color: #667eea;
}

body.dark-mode select {
    background: #4a5568;
    color: #e6e6e6;
    border-color: #4a5568;
}

body.dark-mode select option {
    background: #4a5568;
    color: #e6e6e6;
}

.button-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
}
.button-grid-2x2 button {
    width: 100%;
    padding: 10px 0;
    font-size: 14px;
    border-radius: 6px;
    background: linear-gradient(45deg, #23272f, #2c3e50);
    border: 1px solid #444b5a;
    color: #e6e6e6;
    transition: background 0.2s;
}
.button-grid-2x2 button:hover {
    background: linear-gradient(45deg, #2c3e50, #34495e);
}

.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #333;
    color: white;
    text-align: center;
    padding: 10px;
    z-index: 999;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    user-select: none;
    cursor: pointer;
    transition: background 0.2s;
}
.sticky-footer:hover {
    background: #444;
}

@media (max-width: 1160px) {
  .container {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .canvas-container {
    width: 100% !important;
    max-width: 100vw;
    margin: 0 auto 20px auto;
    box-sizing: border-box;
  }
  .controls {
    width: 100% !important;
    max-width: 100vw;
    margin: 0 auto;
    box-sizing: border-box;
    border-radius: 0 0 15px 15px;
    max-height: none !important;
    overflow-y: visible !important;
  }
  #toTopBtn {
    display: block !important;
    position: fixed;
    right: 24px;
    bottom: 8px;
    z-index: 1000;
    background: linear-gradient(45deg, #667eea, #44a08d);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    padding: 0;
    font-size: 2rem;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #toTopBtn:hover {
    background: linear-gradient(45deg, #44a08d, #667eea);
    transform: translateY(-2px) scale(1.08);
  }
  .sticky-footer {
    display: block !important;
  }
  #toTopBanner {
    display: none !important;
  }
}
@media (min-width: 1161px) {
  #toTopBtn {
    display: none !important;
  }
  .sticky-footer {
    display: none !important;
  }
} 