body {
    background-color: #f8f9fa;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.demo-header {
    margin-bottom: 3rem;
    text-align: center;
}

.demo-header h1 {
    color: #0d6efd;
    margin-bottom: 1rem;
}

.card {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1rem 1.5rem;
}

.card-header h5 {
    margin: 0;
    color: #212529;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Code block styles */
.code-block {
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.code-block pre {
    margin: 0;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.code-block code {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
}

.copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 1;
}

/* Preset card styles */
.preset-card {
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: transform 0.2s;
    cursor: pointer;
}

.preset-card:hover {
    transform: translateY(-2px);
}

/* Navigation pills */
.nav-pills .nav-link {
    color: #6c757d;
}

.nav-pills .nav-link.active {
    background-color: #0d6efd;
    color: #fff;
}

/* Form controls */
.form-control-color {
    width: 60px;
}

.input-group .form-control-color:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.form-range {
    padding: 0.5rem 0;
}
.nav-pills .dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.nav-pills .dropdown-item {
    padding: 0.5rem 1rem;
    color: #6c757d;
}

.nav-pills .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

.nav-pills .dropdown-item.active {
    background-color: #0d6efd;
    color: #fff;
}


/* Responsive adjustments */
@media (max-width: 992px) {
    .container {
        max-width: 100%;
        padding: 0 1rem;
    }
}

/* Make tabs scrollable on mobile */
@media (max-width: 768px) {
    .nav-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
    }
    .nav-pills::-webkit-scrollbar {
        height: 4px;
    }
    .nav-pills::-webkit-scrollbar-thumb {
        background-color: rgba(0,0,0,0.1);
        border-radius: 2px;
    }
}

.code-nav {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    gap: 0.25rem;
    padding-bottom: 0.5rem;
}

.code-nav::-webkit-scrollbar {
    height: 4px;
}

.code-nav::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.1);
    border-radius: 2px;
}

.code-nav::-webkit-scrollbar-track {
    background: transparent;
}

.code-nav .nav-link {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.card-header {
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: calc(100% - 8px); /* Account for scrollbar */
    width: 30px;
    background: linear-gradient(to right, transparent, white);
    pointer-events: none;
}

.toast-container {
    z-index: 1050;
}

.toast {
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
}

.toast.show {
    opacity: 1;
}

/* Copy button styles */
.copy-button {
    transition: all 0.2s ease-in-out;
}

.copy-button.btn-success {
    background-color: #198754;
    border-color: #198754;
    color: white;
}

.copy-button i {
    font-size: 1rem;
}

/* Subtle animation to the check icon */
@keyframes checkmark {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.copy-button.btn-success i {
    animation: checkmark 0.2s ease-in-out forwards;
}