:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --text: #1e293b;
    --border: #e2e8f0;
    --bg: #f8fafc;
    --white: #ffffff;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 30px -10px rgba(0, 0, 0, 0.15);
    --radius-md: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text);
    line-height: 1.6;
    padding: var(--spacing-lg);
}

.container {
    width: 100%;
    max-width: 500px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: var(--spacing-lg);
    text-align: center;
	margin:150px 0;
}

h1 {
    font-size: 2rem;
    margin-bottom: var(--spacing-lg);
    color: var(--primary);
    font-weight: 800;
}

.color-picker {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-lg);
}

#colorInput {
    appearance: none;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#colorInput::-webkit-color-swatch { border-radius: 50%; }

#colorValue {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: monospace;
    text-transform: uppercase;
    width: 120px;
    text-align: center;
}

.color-preview {
    margin: var(--spacing-lg) 0;
}

#previewBox {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    margin: 0 auto var(--spacing-md);
    box-shadow: var(--shadow);
}

.color-codes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.code-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    width: 100%;
    max-width: 300px;
}

.label {
    color: var(--text-light);
    min-width: 40px;
    text-align: right;
}

.value {
    font-family: monospace;
    font-size: 0.95rem;
    padding: 4px 8px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copy-btn {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--primary);
    transition: color 0.2s, transform 0.2s;
}

.copy-btn:hover {
    color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Аккордеон палитр */
.combo-accordion {
    margin-top: var(--spacing-xl);
}

.combo-section {
    border-bottom: 1px solid var(--border);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
    cursor: pointer;
    user-select: none;
}

.section-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--primary);
}

.section-header .toggle {
    font-size: 1.2rem;
    color: var(--text-light);
}

.swatches {
    display: none;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    padding: var(--spacing-md) 0;
    justify-content: center;
}

.swatch {
    width: 80px;
    height: 100px; /* увеличили высоту для размещения текста снизу */
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.swatch:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.swatch-color {
    width: 100%;
    height: 60px; /* верхняя часть — цвет */
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.swatch-info {
    padding: 8px 4px;
    background: var(--bg);
    width: 100%;
    text-align: center;
    font-size: 0.65rem;
    line-height: 1.2;
    color: var(--text);
}

.swatch-hex,
.swatch-rgb {
    margin: 2px 0;
    font-family: monospace;
    white-space: nowrap;
}

.swatch-hex {
    font-weight: 600;
    color: var(--primary);
}

.copy-icon {
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0.6;
    margin-left: 4px;
    vertical-align: -1px;
}

.copy-icon:hover {
    opacity: 1;
    color: var(--primary-hover);
}