.pantone-hsv-converter {
    margin-bottom: 2rem;
}

.tool-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
}

.tool-card-left {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background: #fafbfc;
}

.tool-card-right {
    padding: 1.5rem;
    background: #ffffff;
}

.input-panel .panel-title,
.block-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 4px 0;
}

.input-panel .panel-subtitle,
.panel-subtitle {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0 0 1.25rem 0;
}

.result-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-block {
    text-align: center;
}

.hsv-block .block-title,
.formats-block .block-title {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin: 0 0 1rem 0;
}

.input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.input-group-custom {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-group-custom:focus-within {
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-prefix {
    padding: 1rem;
    background: #e9ecef;
    color: #495057;
    font-weight: 600;
    font-size: 0.875rem;
    border-right: 2px solid #dee2e6;
}

.form-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    font-size: 1rem;
    color: #212529;
    outline: none;
}

.form-input::placeholder {
    color: #adb5bd;
}

.input-action {
    padding: 0.875rem 1rem;
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.input-action:hover {
    color: #667eea;
}

.suggestions-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.suggestions-dropdown.show {
    display: block;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f1f3f5;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-color {
    width: 32px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    flex-shrink: 0;
}

.suggestion-info {
    flex: 1;
}

.suggestion-code {
    font-weight: 600;
    color: #212529;
    font-size: 0.9375rem;
}

.suggestion-name {
    font-size: 0.8125rem;
    color: #6c757d;
}

.quick-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.625rem 1rem;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.preview-display {
    position: relative;
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1;
    margin: 0 auto 1.5rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.preview-fill {
    position: absolute;
    inset: 0;
    z-index: 2;
    background-color: rgb(95, 39, 205);
    transition: background-color 0.3s ease;
}

.preview-pattern {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image: 
        linear-gradient(45deg, rgba(0, 0, 0, 0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(0, 0, 0, 0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.05) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.preview-info {
    padding: 0.75rem 0 0;
}

.color-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 4px;
}

.color-code {
    font-size: 1rem;
    color: #6c757d;
    font-weight: 500;
}

.hsv-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.hsv-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hsv-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.label-text {
    font-weight: 600;
    color: #495057;
    font-size: 0.9375rem;
}

.label-unit {
    font-size: 0.75rem;
    color: #adb5bd;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hsv-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #212529;
    line-height: 1;
}

.hue-item .hsv-value {
    color: #ff6b6b;
}

.saturation-item .hsv-value {
    color: #4ecdc4;
}

.value-item .hsv-value {
    color: #45b7d1;
}

.hsv-visual {
    margin-top: 0.5rem;
}

.hue-ring {
    position: relative;
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #ff0000 0deg,
        #ffff00 60deg,
        #00ff00 120deg,
        #00ffff 180deg,
        #0000ff 240deg,
        #ff00ff 300deg,
        #ff0000 360deg
    );
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hue-indicator {
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border: 3px solid #212529;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.saturation-fill {
    background: linear-gradient(90deg, #4ecdc4 0%, #44a08d 100%);
}

.value-fill {
    background: linear-gradient(90deg, #45b7d1 0%, #2c3e50 100%);
}

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

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

.format-item:hover {
    border-color: #667eea;
    background: #ffffff;
}

.format-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.format-value {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    
    word-break: break-all;
}

.copy-btn {
    align-self: flex-start;
    padding: 0.5rem;
    background: transparent;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    color: #6c757d;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.copy-btn.copied {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.popular-colors-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1.5rem;
}

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

.color-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.color-chip:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.chip-color {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    flex-shrink: 0;
}

.chip-info {
    flex: 1;
    min-width: 0;
}

.chip-code {
    font-weight: 600;
    color: #212529;
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.chip-name {
    font-size: 0.75rem;
    color: #6c757d;
}

@media (min-width: 768px) {
    .tool-card {
        grid-template-columns: 1fr 1fr;
    }

    .tool-card-left {
        padding: 2rem;
        border-bottom: none;
        border-right: 1px solid #e9ecef;
    }

    .tool-card-right {
        padding: 2rem;
    }

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

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

@media (min-width: 1024px) {
    .tool-card {
        grid-template-columns: 1fr 1.25fr;
    }

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

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

    .popular-colors-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 767px) {
    .tool-card-left,
    .tool-card-right {
        padding: 1.25rem;
    }

    .hsv-value {
        font-size: 2rem;
    }

    .preview-display {
        max-width: 240px;
    }

    .color-name {
        font-size: 1.25rem;
    }

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

    .popular-colors-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}
