/* CMYK to Pantone Tool Styles */
.cmyk-pantone-tool {
    margin-bottom: 3rem;
}

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

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

@media (min-width: 1024px) {
    .main-converter-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

/* CMYK Input Section */
.cmyk-input-section {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.section-header {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
}

.section-description {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
}

.cmyk-channels {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    margin-bottom: 2rem;
}

.cmyk-channel {
    position: relative;
}

.channel-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.channel-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
}

.channel-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: #ffffff;
}

.cyan-icon {
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
}

.magenta-icon {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
}

.yellow-icon {
    background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
}

.black-icon {
    background: linear-gradient(135deg, #424242 0%, #212121 100%);
}

.channel-value-display {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.channel-number-input {
    width: 70px;
    padding: 0.5rem 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: #1a1a1a;
    transition: all 0.2s ease;
    background: #ffffff;
}

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

.percent-symbol {
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
}

.slider-wrapper {
    position: relative;
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.cmyk-slider {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.slider-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 4px;
    transition: width 0.1s ease;
    pointer-events: none;
}

.cyan-progress {
    background: linear-gradient(90deg, #00bcd4 0%, #0097a7 100%);
}

.magenta-progress {
    background: linear-gradient(90deg, #e91e63 0%, #c2185b 100%);
}

.yellow-progress {
    background: linear-gradient(90deg, #ffc107 0%, #ff8f00 100%);
}

.black-progress {
    background: linear-gradient(90deg, #424242 0%, #212121 100%);
}

/* Quick Presets */
.quick-presets {
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.presets-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 1rem 0;
}

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

@media (min-width: 640px) {
    .presets-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

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

.preset-btn:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.preset-color {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preset-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
}

/* Pantone Results Section */
.pantone-results-section {
    display: flex;
    flex-direction: column;
}

.pantone-results-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.color-preview-section {
    margin-bottom: 0;
}

.preview-header {
    margin-bottom: 1.25rem;
}

.preview-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.color-preview-box {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    background: rgb(255, 0, 0);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 1.5rem;
    display: flex;
    align-items: flex-end;
}

.preview-hex {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    
}

.pantone-match-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 1.75rem;
    border-radius: 16px;
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.match-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.match-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.score-label {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.score-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.pantone-code-display {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.pantone-swatch {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: rgb(206, 17, 38);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.pantone-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pantone-code {
    font-size: 1.25rem;
    font-weight: 700;
    
}

.copy-pantone-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.copy-pantone-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.copy-pantone-btn svg {
    width: 18px;
    height: 18px;
}

.color-formats-section {
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

/* Color Formats Section */
.formats-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1.25rem 0;
}

.formats-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.format-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: #f9fafb;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.format-row:hover {
    background: #f3f4f6;
}

.format-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    min-width: 50px;
}

.format-code {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    
}

.format-copy-btn {
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.format-copy-btn:hover {
    background: #e5e7eb;
    color: #3b82f6;
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
}

@media (min-width: 768px) {
    .info-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.info-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1rem 0;
}

.info-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #4b5563;
    margin: 0 0 1rem 0;
}

.info-text:last-child {
    margin-bottom: 0;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #4b5563;
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.info-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #3b82f6;
    font-weight: 700;
}

/* Toast Container */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: #1a1a1a;
    color: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    .cmyk-input-section,
    .pantone-results-card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .pantone-match-section {
        margin: 0 -1.5rem;
        padding: 1.5rem;
        border-radius: 12px;
    }

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

    .cmyk-channels {
        gap: 1.5rem;
    }

    .channel-number-input {
        width: 60px;
        padding: 0.5rem;
        font-size: 0.95rem;
    }

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

    .preset-btn {
        padding: 0.5rem;
    }

    .pantone-code-display {
        flex-direction: column;
        align-items: flex-start;
    }

    .pantone-swatch {
        width: 100%;
        height: 120px;
    }

    .format-row {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .format-name {
        min-width: auto;
    }

    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
}
