body {
    background: linear-gradient(135deg, #FF9A8B 0%, #FF6A88 50%, #FF99AC 100%);
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.encoder-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 100%;
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------------------------------------------------- */
/* Switch Styling & Toggle Size */
/* ---------------------------------------------------- */
.form-switch .form-check-input {
    /* Larger switch size */
    width: 5.5em; 
    height: 2.7em; 
    cursor: pointer;
    transition: background-position .2s ease-in-out;
}

.form-check-input:checked {
    background-color: #FF6A88;
    border-color: #FF6A88;
}

/* Alignment Fix for Labels */
.switch-container label {
    position: relative;
    top: 1px; 
    color: #aaa;
    transition: all 0.3s ease;
}

.switch-container .fw-bold {
    color: #333;
}

/* ---------------------------------------------------- */
/* Pickers Slide-In/Out Animation FIX */
/* ---------------------------------------------------- */

#encode-options {
    /* Use 'all' for smooth transition of max-height, opacity, and margin/padding */
    transition: all 0.5s ease-in-out;
    max-height: 500px; /* Must be larger than content height */
    overflow: hidden; /* Crucial to clip content when max-height collapses */
    opacity: 1;
}

#encode-options.hidden {
    max-height: 0; /* Collapses the container height */
    opacity: 0;
    /* Remove margins/paddings when hidden to collapse space completely */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
}

/* ---------------------------------------------------- */
/* Remaining UI/Picker Styling             */
/* ---------------------------------------------------- */
.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 106, 136, 0.25);
    border-color: #FF6A88;
}
textarea#output {
    background-color: #f8f9fa;
}

/* Picker Styling */
.picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.picker span {
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease-in-out;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    min-width: 45px;
    text-align: center;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.picker span:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: #FF9A8B;
}

/* Source Link */
.source-link {
    color: #FF6A88;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.source-link:hover {
    color: #FF9A8B;
}