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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: #f5f5f7;
    padding: 40px 20px;
    color: #1c1c1e;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    color: #0071e3;
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

h1 {
    font-size: 32px;
    margin-bottom: 5px;
    font-weight: 700;
}

.subtitle {
    color: #8e8e93;
    margin-bottom: 30px;
    font-size: 15px;
}

/* Гармонии */
.harmony-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 16px;
    flex-wrap: wrap;
    box-shadow: 0 2px 15px rgba(0,0,0,0.04);
}

.harmony-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    background: transparent;
    min-width: 85px;
}

.harmony-btn:hover {
    background: #f5f5f7;
}

.harmony-btn.active {
    border-color: #0071e3;
    background: #f0f8ff;
    box-shadow: 0 4px 12px rgba(0,113,227,0.1);
}

.harmony-btn span {
    font-size: 13px;
    color: #8e8e93;
    font-weight: 500;
}

.harmony-btn.active span {
    color: #0071e3;
    font-weight: 600;
}

/* Настройки */
.settings-row {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.04);
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.setting-group label {
    font-size: 14px;
    color: #8e8e93;
    font-weight: 600;
}

.setting-controls {
    display: flex;
    gap: 8px;
}

.setting-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f7;
    color: #1c1c1e;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.setting-btn:hover {
    background: #0071e3;
    color: white;
    transform: translateY(-1px);
}

/* Сетка контента */
.main-content {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 25px;
}

/* Секция колеса */
.color-wheel-section {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.04);
}

.color-wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 25px;
}

#colorWheel {
    width: 100%;
    height: 100%;
    cursor: pointer;
    border-radius: 50%;
}

/* Маркеры на колесе */
.wheel-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.wheel-marker {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 3px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.1s;
    z-index: 10;
}

.wheel-marker:active {
    transform: translate(-50%, -50%) scale(1.1);
}

.wheel-marker:hover {
    transform: translate(-50%, -50%) scale(1.2);
    z-index: 20;
}

.wheel-marker.marker-primary {
    width: 24px;
    height: 24px;
    border-width: 4px;
    box-shadow: 0 0 0 2px rgba(0,113,227,0.4), 0 4px 10px rgba(0,0,0,0.3);
    z-index: 15;
}

.wheel-marker.marker-primary:hover {
    box-shadow: 0 0 0 3px rgba(0,113,227,0.5), 0 4px 12px rgba(0,0,0,0.4);
}

/* Информация о цвете */
.current-color-info {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 20px;
}

.color-preview-large {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    border: 1px solid #e5e5ea;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.color-details {
    flex: 1;
}

.detail-row {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #8e8e93;
    margin-bottom: 5px;
}

.hex-display {
    font-size: 15px;
    color: #1c1c1e;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Секция палитры */
.palette-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.palette-url {
    background: white;
    padding: 18px;
    border-radius: 12px;
    font-size: 13px;
    color: #8e8e93;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.04);
}

.palette-url a {
    color: #0071e3;
    text-decoration: none;
    font-weight: 500;
}

.palette-display {
    display: flex;
    border-radius: 12px;
    overflow: hidden;
    height: 120px;
    background: white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.04);
}

.palette-color {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 15px;
    cursor: pointer;
    transition: flex 0.2s;
    position: relative;
}

.palette-color:hover {
    flex: 1.4;
}

.palette-color .color-hex {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(0,0,0,0.5);
    color: white;
    pointer-events: none;
    font-family: monospace;
    opacity: 0;
    transition: opacity 0.2s;
    backdrop-filter: blur(2px);
}

.palette-color:hover .color-hex {
    opacity: 1;
}

/* Оттенки (Tints) */
.tints-display {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.04);
}

.tint-row {
    display: flex;
    height: 36px;
}

.tint-cell {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s;
}

.tint-cell:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.tint-cell .tint-hex {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    background: rgba(0,0,0,0.4);
    color: white;
    font-family: monospace;
    opacity: 0;
    transition: opacity 0.2s;
}

.tint-cell:hover .tint-hex {
    opacity: 1;
}

/* Кнопки действий */
.palette-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    flex: 1;
    padding: 14px;
    border: none;
    background: white;
    color: #1c1c1e;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid #e5e5ea;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.action-btn:hover {
    background: #0071e3;
    color: white;
    border-color: #0071e3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,113,227,0.25);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1c1c1e;
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast svg {
    color: #34c759;
}

/* Адаптив */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .color-wheel-section {
        max-width: 400px;
        margin: 0 auto;
        width: 100%;
    }
}
