/* Color Converter specific CSS */

.color-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

#color-preview {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    background-color: #333;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#color-name {
    font-size: 1.1rem;
    font-weight: 500;
}

.format-selectors {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.format-selectors .form-group {
    flex: 1;
    min-width: 200px;
}

select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    color: #343541; /* Dark text color for better readability */
    font-weight: 500; /* Slightly bolder text */
}

#results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background-color: #f1f3f5;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.format-label {
    font-weight: 700;
    width: 60px;
    color: #343541;
    font-size: 1.05rem;
}

.result-value {
    flex: 1;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    padding: 0.4rem 0.75rem;
    background-color: white;
    border-radius: 3px;
    margin: 0 0.75rem;
    overflow-x: auto;
    white-space: nowrap;
    color: #000;
    font-size: 1.1rem;
    border: 1px solid #d1d5db;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
}

.copy-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    min-width: 70px;
}

.copy-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Related Tools Section */
.related-tools {
    margin-top: 3rem;
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.related-tools h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #343541;
    font-size: 1.25rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.75rem;
}

.related-tools h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-tool-card {
    padding: 1.25rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.related-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.related-tool-card h4 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.related-tool-card p {
    flex-grow: 1;
    margin-bottom: 1.25rem;
    color: #4b5563;
    line-height: 1.5;
}

.btn-related {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.2s ease;
}

.btn-related:hover {
    background-color: var(--secondary-color);
}

@media (max-width: 600px) {
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .format-label {
        width: auto;
        margin-bottom: 0.25rem;
    }
    
    .result-value {
        width: 100%;
        margin: 0;
        margin-bottom: 0.5rem;
        font-size: 1rem;
    }
    
    .copy-btn {
        align-self: stretch;
        text-align: center;
        padding: 0.6rem;
    }
    
    .related-tools-grid {
        grid-template-columns: 1fr;
    }
}