:root {
    --primary-bg: #1a1a1a;
    --secondary-bg: rgba(42, 42, 42, 0.8);
    --hover-bg: rgba(85, 85, 85, 0.8);
    --text-color: #ffffff;
    --border-color: #444444;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --control-size: 32px;
}

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

body {
    background-color: var(--primary-bg);
    color: var(--text-color);
    font-family: 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 10px;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.mesh-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none; /* Disable default touch behaviors */
    -webkit-touch-callout: none; /* Disable callout on iOS */
    -webkit-user-select: none; /* Disable text selection */
    user-select: none;
}

.floating-controls {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    z-index: 1000;
}

.toggle-controls {
    width: var(--control-size);
    height: var(--control-size);
    border: none;
    border-radius: 8px;
    background: var(--secondary-bg);
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.toggle-controls:hover {
    background: var(--hover-bg);
}

.controls-panel {
    background: var(--secondary-bg);
    backdrop-filter: blur(10px);
    padding: 12px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 200px;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: all 0.3s ease;
}

.controls-panel.collapsed {
    display: none;
}

.color-controls {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    padding: 4px;
    background: var(--secondary-bg);
    border-radius: 8px;
}

.color-picker {
    position: relative;
    width: var(--control-size);
    height: var(--control-size);
}

.color-picker input[type="color"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 1;
}

.color-picker label {
    width: 100%;
    height: 100%;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    pointer-events: none;
    transition: all 0.2s ease;
}

.color-picker label .material-icons-round {
    font-size: 24px;
    transition: color 0.2s ease;
}

/* Remove default color picker styles in webkit browsers */
input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
}

.action-controls {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.btn {
    width: var(--control-size);
    height: var(--control-size);
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn:hover {
    background: var(--hover-bg);
}

.btn.active {
    background: var(--text-color);
    color: var(--primary-bg);
}

.btn .material-icons-round {
    font-size: 18px;
    opacity: 0.8;
}

/* Add smooth transitions */
.floating-controls * {
    transition: all 0.2s ease;
}

/* Tooltip styles */
[title] {
    position: relative;
}

[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: var(--secondary-bg);
    border-radius: 4px;
    font-size: 10px;
    color: var(--text-color);
    white-space: nowrap;
    backdrop-filter: blur(10px);
} 

.color-space-selector {
    position: relative;
    width: 100%;
    margin-bottom: 8px;
}

.select-minimal {
    width: 100%;
    height: var(--control-size);
    padding: 0 32px 0 12px;
    background: var(--secondary-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 10px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.2s ease;
}

.select-minimal:hover {
    background: var(--hover-bg);
}

.select-minimal:focus {
    outline: none;
    border-color: var(--text-color);
}

.color-space-selector label {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.color-space-selector .material-icons-round {
    font-size: 18px;
    color: var(--text-color);
    opacity: 0.8;
} 

.logo {
    position: fixed;
    bottom: 24px;
    left: 24px;
    height: 32px;
    pointer-events: none;
    mix-blend-mode: difference;
}
.logo-text {
    font-size: 10px;
    color: var(--text-color);
    text-decoration: none;
    mix-blend-mode: difference;
    position: fixed;
    bottom: 33px;
    left: 140px;
    pointer-events: none;
}

/* Levels Controls */
.levels-controls {
    padding: 12px;
    background: var(--secondary-bg);
    border-radius: 8px;
    margin-top: 8px;
}

.levels-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-color);
    opacity: 0.9;
}

.levels-title .material-icons-round {
    font-size: 16px;
    opacity: 0.8;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.slider-group:last-child {
    margin-bottom: 0;
}

.slider-group label {
    font-size: 10px;
    color: var(--text-color);
    opacity: 0.8;
    min-width: 28px;
    text-align: left;
}

.levels-slider {
    flex: 1;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    outline: none;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.levels-slider::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--text-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.levels-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.3);
}

.levels-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--text-color);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.levels-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.3);
}

.slider-value {
    font-size: 9px;
    color: var(--text-color);
    opacity: 0.7;
    min-width: 32px;
    text-align: right;
    font-family: 'Monaco', 'Menlo', monospace;
}