/* Converter Main Container */
.cmyk-hsv-converter {
    margin: 0 auto;
    padding: 0;
}

.converter-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Input Panel */
.converter-input-panel {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.panel-header {
    margin-bottom: 1.5rem;
}

.panel-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.panel-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* CMYK Channels */
.cmyk-channels {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.channel-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.channel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.channel-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #374151;
}

.channel-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
    min-width: 45px;
    text-align: right;
}

.channel-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.channel-slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.channel-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.channel-slider::-webkit-slider-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}

.channel-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.channel-slider::-moz-range-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}

.channel-group[data-channel="cyan"] .channel-slider::-webkit-slider-thumb,
.channel-group[data-channel="cyan"] .channel-slider::-moz-range-thumb {
    background: #06b6d4;
}

.channel-group[data-channel="cyan"] .channel-slider::-webkit-slider-thumb:hover,
.channel-group[data-channel="cyan"] .channel-slider::-moz-range-thumb:hover {
    background: #0891b2;
}

.channel-group[data-channel="magenta"] .channel-slider::-webkit-slider-thumb,
.channel-group[data-channel="magenta"] .channel-slider::-moz-range-thumb {
    background: #ec4899;
}

.channel-group[data-channel="magenta"] .channel-slider::-webkit-slider-thumb:hover,
.channel-group[data-channel="magenta"] .channel-slider::-moz-range-thumb:hover {
    background: #db2777;
}

.channel-group[data-channel="yellow"] .channel-slider::-webkit-slider-thumb,
.channel-group[data-channel="yellow"] .channel-slider::-moz-range-thumb {
    background: #eab308;
}

.channel-group[data-channel="yellow"] .channel-slider::-webkit-slider-thumb:hover,
.channel-group[data-channel="yellow"] .channel-slider::-moz-range-thumb:hover {
    background: #ca8a04;
}

.channel-group[data-channel="black"] .channel-slider::-webkit-slider-thumb,
.channel-group[data-channel="black"] .channel-slider::-moz-range-thumb {
    background: #1f2937;
}

.channel-group[data-channel="black"] .channel-slider::-webkit-slider-thumb:hover,
.channel-group[data-channel="black"] .channel-slider::-moz-range-thumb:hover {
    background: #111827;
}

.channel-input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9375rem;
    text-align: center;
    color: #111827;
    transition: all 0.2s ease;
}

.channel-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Output Panel */
.converter-output-panel {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.color-preview-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.color-preview {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1;
    border-radius: 16px;
    background: rgb(255, 0, 0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.color-preview:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.preview-label {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.hsv-display-panel {
    margin-top: 1.5rem;
}

.hsv-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.hsv-item {
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.hsv-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.hsv-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.hsv-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.hsv-description {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Formats & Presets Card (single card) */
.converter-formats-presets-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.converter-formats {
    margin-bottom: 0;
    padding-bottom: 16px;
}

.converter-presets {
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.formats-header {
    margin-bottom: 1.5rem;
}

.formats-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.formats-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.format-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.format-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.format-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.format-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #111827;
    
    word-break: break-all;
}

.format-copy {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.25rem;
}

.format-copy:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.format-copy:active {
    transform: translateY(0);
}

.format-copy.copied {
    background: #10b981;
}

.copy-icon {
    font-size: 1rem;
}

.copy-text {
    font-size: 0.875rem;
}

.presets-header {
    margin-bottom: 1.5rem;
}

.presets-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.presets-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.preset-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-item:hover {
    background: #ffffff;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.preset-item:active {
    transform: translateY(0);
}

.preset-swatch {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--preset-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.preset-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

/* Info Section */
.converter-info {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.info-content {
    max-width: 900px;
    margin: 0 auto;
}

.info-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

.info-card-full {
    grid-column: 1 / -1;
}

.info-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 1rem 0;
}

.info-card p {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.info-list {
    list-style: disc;
    padding-left: 1.5rem;
    color: #374151;
    line-height: 1.8;
}

.info-list-numbered {
    list-style: decimal;
}

.info-formula {
    background: #ffffff;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid #e5e7eb;
}

.info-formula strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #111827;
}

.info-formula code {
    display: block;
    
    font-size: 0.875rem;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

/* Mobile Responsive */
@media (min-width: 768px) {
    .converter-main {
        grid-template-columns: 1fr 1fr;
    }

    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hsv-values {
        gap: 1.5rem;
    }

    .formats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .formats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .presets-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (max-width: 767px) {
    .converter-input-panel,
    .converter-output-panel {
        padding: 1.5rem;
    }

    .converter-formats-presets-card {
        padding: 1.5rem;
    }

    .converter-presets {
        padding-top: 1.5rem;
    }

    .panel-title {
        font-size: 1.25rem;
    }

    .hsv-values {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .formats-grid {
        grid-template-columns: 1fr;
    }

    .presets-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
    }

    .preset-item {
        padding: 0.75rem;
    }

    .preset-swatch {
        width: 40px;
        height: 40px;
    }

    .preset-name {
        font-size: 0.75rem;
    }

    .color-preview {
        max-width: 100%;
    }

    .info-title {
        font-size: 1.5rem;
    }

    .info-card {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .converter-input-panel,
    .converter-output-panel {
        padding: 1rem;
        border-radius: 12px;
    }

    .converter-formats-presets-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .channel-controls {
        flex-direction: column;
        gap: 0.5rem;
    }

    .channel-input {
        width: 100%;
    }

    .presets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
