:root {
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #666;
    --accent: #4a90e2;
    --radius: 16px;
    --shadow: 0 10px 25px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

h1 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-size: 1.5rem;
}

.preview-card {
    margin-bottom: 2rem;
}

.color-preview {
    width: 100%;
    height: 120px;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
    transition: background-color 0.1s ease;
}

.color-values {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.value-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    width: 40px;
    text-align: left;
}

.value {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9rem;
    flex-grow: 1;
    text-align: center;
}

.copy-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.controls {
    margin-bottom: 2rem;
}

.mode-switch {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.mode-btn {
    background: #eee;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.mode-btn.active {
    background: var(--accent);
    color: white;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider-row label {
    width: 60px;
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.slider-row input {
    flex-grow: 1;
    cursor: pointer;
}

.slider-row span {
    width: 45px;
    text-align: right;
    font-family: monospace;
    font-size: 0.85rem;
}

.hidden {
    display: none;
}

.presets h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.preset {
    aspect-ratio: 1;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.1);
    transition: transform 0.1s;
}

.preset:hover {
    transform: scale(1.1);
}