/* Color Code Convert Tool Styles */
.ccct-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.ccct-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.ccct-header {
    background: linear-gradient(135deg, #201F1F 0%, #FF3C91 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.ccct-header h2 {
    color: white;
    margin: 0;
    font-weight: 700;
    font-size: 2rem;
}

.ccct-header p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
    font-size: 1rem;
}

.ccct-content {
    padding: 2rem;
}

/* Converter Interface */
.converter-interface {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.color-input-section {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.input-group-text {
    background: #201F1F;
    color: white;
    border: none;
    font-weight: 600;
}

.form-control-color {
    width: 50px;
    height: 38px;
    padding: 2px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
}

.form-control-color::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

.form-control-color::-webkit-color-swatch-wrapper {
    padding: 0;
}

/* Alpha Slider Container */
.alpha-slider-container {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
}

.alpha-label {
    font-weight: 600;
    color: #201F1F;
    margin-bottom: 0.75rem;
    display: block;
}

.alpha-input-container {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    margin-top: 0.5rem;
}

.alpha-input-container .col-form-label {
    font-weight: 600;
    color: #201F1F;
    font-size: 0.9rem;
    margin-bottom: 0;
    white-space: nowrap;
}

.alpha-input-container .input-group-sm {
    max-width: 120px;
}

/* Form Range Custom Styles */
.form-range {
    width: 100%;
    height: 1.5rem;
    padding: 0;
    background-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-range:focus {
    outline: none;
}

.form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(255, 60, 145, 0.25);
}

.form-range:focus::-moz-range-thumb {
    box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(255, 60, 145, 0.25);
}

.form-range::-webkit-slider-thumb {
    width: 1rem;
    height: 1rem;
    margin-top: -0.25rem;
    background-color: #FF3C91;
    border: 0;
    border-radius: 1rem;
    -webkit-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    -webkit-appearance: none;
    appearance: none;
}

.form-range::-webkit-slider-thumb:hover {
    background-color: #e23382;
    transform: scale(1.1);
}

.form-range::-moz-range-thumb {
    width: 1rem;
    height: 1rem;
    background-color: #FF3C91;
    border: 0;
    border-radius: 1rem;
    -moz-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-range::-moz-range-thumb:hover {
    background-color: #e23382;
}

.form-range::-webkit-slider-track {
    width: 100%;
    height: 0.5rem;
    color: transparent;
    cursor: pointer;
    background-color: #dee2e6;
    border-color: transparent;
    border-radius: 1rem;
}

.form-range::-moz-range-track {
    width: 100%;
    height: 0.5rem;
    color: transparent;
    cursor: pointer;
    background-color: #dee2e6;
    border-color: transparent;
    border-radius: 1rem;
}

/* Input Group Adjustments */
.input-group.input-group-sm {
    border-radius: 0.375rem;
}

.input-group.input-group-sm .form-control {
    border-radius: 0.375rem 0 0 0.375rem;
}

.input-group.input-group-sm .input-group-text {
    border-radius: 0 0.375rem 0.375rem 0;
}

/* Color Preview */
.color-preview-section {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.preview-card {
    text-align: center;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.preview-card:hover {
    border-color: #FF3C91;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 60, 145, 0.1);
}

.preview-card:active {
    transform: translateY(0);
}

.preview-card::after {
    content: 'Click to copy';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 60, 145, 0.9);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.3s ease;
}

.preview-card:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.preview-card.copied-preview {
    border-color: #28a745;
    background: #f8fff9;
    transform: scale(1.02);
}

.preview-card.copied-preview .color-code {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.preview-card.copied-preview::after {
    content: 'Copied!';
    background: #28a745;
    opacity: 1;
    transform: translateY(0);
}

.preview-label {
    font-weight: 600;
    color: #201F1F;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.color-preview {
    height: 80px;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.color-code {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #201F1F;
    font-size: 0.9rem;
    padding: 0.25rem;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.preview-card:hover .color-code {
    background: #fff5f9;
    border-color: #FF3C91;
}

/* Results Section - FIXED: Always visible */
.results-section {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
    display: block !important;
}

.result-card {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

.result-item {
    margin-bottom: 1rem;
}

.result-label {
    font-weight: 600;
    color: #201F1F;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    display: block;
}

/* Format Groups */
.formats-group {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1.5rem;
}

.formats-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.section-label {
    color: #201F1F;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #FF3C91;
}

/* Custom Button Styles */
.btn-ccct-primary {
    background: linear-gradient(135deg, #FF3C91 0%, #e23382 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-ccct-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 60, 145, 0.3);
    color: white;
}

.btn-ccct-secondary {
    background: linear-gradient(135deg, #201F1F 0%, #3a3939 100%);
    border: none;
    color: white !important;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-ccct-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(32, 31, 31, 0.3);
    color: white;
}

.btn-ccct-outline {
    border: 2px solid #201F1F;
    color: #201F1F;
    background: transparent;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-ccct-outline:hover {
    background: #201F1F;
    color: white;
    transform: translateY(-1px);
}

/* Copy Button Styles */
.copy-btn {
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #201F1F;
    color: white;
}

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

/* Alert Styles */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-left: 4px solid;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left-color: #10b981;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left-color: #ef4444;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left-color: #3b82f6;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left-color: #f59e0b;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Form Text Styling */
.form-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Action Buttons Container */
.action-buttons {
    margin-top: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ccct-container {
        padding: 10px;
    }
    
    .ccct-header {
        padding: 1.5rem;
    }
    
    .ccct-header h2 {
        font-size: 1.5rem;
    }
    
    .ccct-content {
        padding: 1rem;
    }
    
    .converter-interface {
        padding: 1rem;
    }
    
    .color-input-section,
    .color-preview-section,
    .results-section {
        padding: 1rem;
    }
    
    .preview-card {
        padding: 0.75rem;
    }
    
    .color-preview {
        height: 60px;
    }
    
    .alpha-slider-container {
        padding: 0.75rem;
    }
    
    .alpha-input-container {
        padding: 0.5rem;
    }
    
    .alpha-input-container .input-group-sm {
        max-width: 100px;
    }
    
    .action-buttons .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .action-buttons .btn:last-child {
        margin-bottom: 0;
    }
    
    .formats-group {
        padding-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .alpha-input-container .row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .alpha-input-container .col-auto {
        margin-bottom: 0.5rem;
    }
    
    .alpha-input-container .col {
        width: 100%;
    }
    
    .alpha-input-container .input-group-sm {
        max-width: 100%;
    }
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Tooltip Styles */
.tooltip {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}