/* All-in-One CSS Tools Styles */
.all-in-one-tools {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: none;
}

.card-header {
    font-weight: 600;
}

.list-group-item.active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.tool-section {
    display: none;
}

.tool-section.active {
    display: block;
}

.color-stops-container {
    margin-bottom: 1rem;
}

.color-stop {
    background-color: rgba(0, 0, 0, 0.03);
    padding: 0.75rem;
    border-radius: 0.25rem;
}

.position-value {
    min-width: 40px;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
}

.preview-area {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.preview-container {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.preview-content {
    width: 100%;
    height: 100%;
}

.gradient-preview {
    background: linear-gradient(45deg, #4e73df, #8e44ad, #3498db);
    background-size: 200% 200%;
    animation: gradientAnimation 10s ease infinite;
}

.border-preview {
    border: 5px solid transparent;
    border-radius: 8px;
    background: 
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(45deg, #ff0000, #00ff00, #0000ff) border-box;
    background-origin: border-box;
    background-clip: padding-box, border-box;
    animation: gradientAnimation 10s linear infinite;
}

.text-preview {
    text-align: center;
}

.text-preview h2 {
    font-size: 48px;
    color: #3498db;
    margin: 0;
}

.border-content {
    padding: 2rem;
    text-align: center;
}

.code-output pre {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 0;
}

.code-output code {
    display: block;
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
    color: #333;
}

/* Animation for copied text */
.copied {
    position: relative;
}

.copied::after {
    content: "Copied!";
    position: absolute;
    top: -25px;
    right: 0;
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    animation: fadeOut 2s ease-in-out forwards;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

/* Keyframes for animations */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Dark mode styles */
[data-bs-theme="dark"] .preview-area {
    background-color: var(--bs-dark-bg-subtle);
    border-color: var(--bs-border-color-translucent);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .preview-container {
        min-height: 250px;
    }
}

@media (max-width: 767.98px) {
    .preview-container {
        min-height: 200px;
    }
    
    .color-stop {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .position-value {
        width: 100%;
        text-align: right;
    }
}