/* Color Converter - Modern SaaS Design */

.color-converter-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.color-converter-container > h3 {
    display: none; /* Hide default title as page has its own */
}

/* Main Card */
.color-converter-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 10px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

/* Color Picker Section */
.color-picker-section {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 24px;
    margin-bottom: 32px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.picker-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Color Wheel */
.color-wheel-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.color-wheel {
    width: 280px;
    height: 280px;
    position: relative;
    cursor: crosshair;
}

#wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.wheel-cursor {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(0,0,0,0.2);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
    transition: transform 0.1s ease;
}

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

/* Brightness Slider */
.brightness-slider-wrapper,
.opacity-slider-wrapper {
    width: 100%;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.brightness-slider-wrapper label,
.opacity-slider-wrapper label {
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slider-value {
    font-weight: 700;
    color: #6366f1;
    font-size: 13px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
}

.brightness-slider,
.opacity-slider {
    height: 20px;
    position: relative;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

.brightness-slider {
    background: linear-gradient(to right, #000, #fff);
}

.opacity-slider {
    position: relative;
    overflow: hidden;
}

.opacity-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, #ddd 25%, transparent 25%), 
        linear-gradient(-45deg, #ddd 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #ddd 75%), 
        linear-gradient(-45deg, transparent 75%, #ddd 75%);
    background-size: 12px 12px;
    background-position: 0 0, 0 6px, 6px -6px, -6px 0px;
}

.brightness-cursor,
.opacity-cursor {
    position: absolute;
    top: 50%;
    width: 6px;
    height: 26px;
    background: #fff;
    border: 2px solid #1f2937;
    border-radius: 3px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Color Preview Panel */
.color-preview-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

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

.color-preview-box {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background-image: 
        linear-gradient(45deg, #ddd 25%, transparent 25%), 
        linear-gradient(-45deg, #ddd 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #ddd 75%), 
        linear-gradient(-45deg, transparent 75%, #ddd 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.preview-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
    width: 100%;
}

#preview-hex {
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

#preview-name {
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
}

/* Input Section */
.color-input-section {
    margin-bottom: 28px;
}

.color-input-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-input-section input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    color: #1f2937;
    transition: all 0.2s ease;
    background: #ffffff;
}

.color-input-section input[type="text"]:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Color Formats */
.color-formats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.format-section h4 {
    margin: 0 0 8px 0;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.format-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.format-input-group input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    background: #f8fafc;
    color: #1f2937;
    transition: all 0.2s ease;
}

.format-input-group input[type="text"]:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.copy-btn {
    padding: 10px 16px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.copy-btn:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

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

/* Color Details */
.color-details {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 28px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.detail-item {
    text-align: center;
    padding: 12px 8px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.detail-item strong {
    display: block;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
}

/* Color Palette */
.color-palette,
.color-harmony {
    margin-bottom: 28px;
}

.color-palette h4,
.color-harmony h4 {
    margin: 0 0 16px 0;
    color: #0f172a;
    font-size: 16px;
    font-weight: 700;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.harmony-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.palette-item,
.harmony-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.palette-item:hover,
.harmony-item:hover {
    transform: translateY(-4px);
}

.palette-color,
.harmony-color {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.palette-color:hover,
.harmony-color:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: #6366f1;
}

.palette-label,
.harmony-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

/* Status Messages */
.color-status {
    text-align: center;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    margin-top: 16px;
    display: none;
}

.color-status.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.color-status.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.color-status.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.color-status.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .color-converter-card {
        padding: 24px;
    }

    .color-picker-section {
        grid-template-columns: 1fr;
    }

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

    .format-input-group {
        flex-direction: column;
    }

    .copy-btn {
        width: 100%;
    }

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

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

    .harmony-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .color-preview-box {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .color-converter-card {
        padding: 20px;
    }

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

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

    .harmony-grid {
        grid-template-columns: 1fr;
    }
    
    .color-wheel {
        width: 220px;
        height: 220px;
    }
}

/* Animation */
.color-preview-box,
.palette-color,
.harmony-color {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
