.yt-downloader {
    margin: 2rem auto;
    max-width: 800px;
}

.yt-downloader__card {
    background-color: var(--container-color);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.yt-downloader__header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
}

.yt-downloader__icon {
    font-size: 2rem;
    color: #FF0000;
    margin-right: 1rem;
}

.yt-downloader__icon i {
    font-size: 2.5rem;
}

.yt-downloader__title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.yt-downloader__form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.yt-downloader__input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.yt-downloader__input-icon {
    position: absolute;
    left: 1rem;
    font-size: 1.25rem;
    color: var(--text-color-light);
}

.yt-downloader__input {
    width: 100%;
    padding: 1.25rem 1rem 1.25rem 3rem;
    border-radius: 0.75rem;
    border: 2px solid var(--text-color-light);
    background-color: var(--container-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.yt-downloader__input:focus {
    border-color: var(--first-color);
    box-shadow: 0 0 0 3px rgba(var(--first-color-rgb), 0.2);
}

.yt-downloader__paste-btn {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--first-color);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.yt-downloader__paste-btn:hover {
    transform: scale(1.1);
}

.yt-downloader__options {
    gap: 1.5rem;
}

.yt-downloader__options-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color-light);
    margin-bottom: 0.75rem;
}

.yt-downloader__radio-group {
    display: flex;
    gap: 1rem;
}

.yt-downloader__radio {
    position: relative;
}

.yt-downloader__radio input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.yt-downloader__radio label {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    background-color: var(--body-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.yt-downloader__radio input[type="radio"]:checked + label {
    background-color: var(--first-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(var(--first-color-rgb), 0.3);
}

.yt-downloader__radio label i {
    margin-right: 0.5rem;
}

.yt-downloader__select-wrapper {
    position: relative;
}

.yt-downloader__select {
    width: 100%;
    appearance: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--text-color-light);
    background-color: var(--body-color);
    color: var(--text-color);
    font-size: 0.9rem;
}

.yt-downloader__select-wrapper i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.yt-downloader__button {
    width: 100%;
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: none;
    background: linear-gradient(135deg, var(--first-color), var(--first-color-alt));
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.yt-downloader__button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(var(--first-color-rgb), 0.4);
}

.yt-downloader__button i {
    font-size: 1.25rem;
}

/* Preview section */
.yt-downloader__preview {
    margin-top: 2rem;
    border-top: 1px solid rgba(var(--text-color-light-rgb), 0.2);
    padding-top: 1.5rem;
}

.yt-downloader__preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.yt-downloader__preview-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.yt-downloader__preview-duration {
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.yt-downloader__preview-thumbnail {
    position: relative;
    width: 100%;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.yt-downloader__preview-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.yt-downloader__preview-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.yt-downloader__preview-play i {
    color: #fff;
    font-size: 2rem;
}

.yt-downloader__preview-play:hover {
    background-color: var(--first-color);
    transform: translate(-50%, -50%) scale(1.1);
}

.yt-downloader__preview-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.yt-downloader__preview-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color-light);
    font-size: 0.875rem;
}

/* Result section */
.yt-downloader__result {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 0.75rem;
    background-color: var(--body-color);
    text-align: center;
}

.yt-downloader__result-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
}

.yt-downloader__result-header i {
    font-size: 3rem;
    color: #4CAF50;
    margin-bottom: 0.5rem;
}

.yt-downloader__download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    background-color: var(--first-color);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.yt-downloader__download-btn:hover {
    background-color: var(--first-color-alt);
    transform: translateY(-2px);
}

.yt-downloader__result-note {
    font-size: 0.875rem;
    color: var(--text-color-light);
}

/* Loading animation */
.yt-downloader__loading {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.yt-downloader__spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(var(--first-color-rgb), 0.3);
    border-top-color: var(--first-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer */
.yt-downloader__footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(var(--text-color-light-rgb), 0.2);
}

.yt-downloader__features {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1.5rem;
}

.yt-downloader__feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.yt-downloader__feature i {
    font-size: 1.5rem;
    color: var(--first-color);
}

.yt-downloader__feature span {
    font-size: 0.875rem;
    font-weight: 500;
}

.yt-downloader__disclaimer {
    font-size: 0.75rem;
    color: var(--text-color-light);
    text-align: center;
    margin: 0;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .yt-downloader__card {
        padding: 1.5rem;
    }
    
    .yt-downloader__options {
        grid-template-columns: 1fr;
    }
    
    .yt-downloader__radio-group {
        justify-content: space-between;
    }
}

.badge-container {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.dev-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #4b6584 0%, #7286a5 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(75, 101, 132, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.dev-badge::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 3s infinite;
}

.dev-badge i {
    font-size: 1rem;
    animation: pulse 2s infinite;
}

@keyframes shine {
    to {
        left: 100%;
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* If you want a more visible effect on hover */
.dev-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(75, 101, 132, 0.4);
}


/* File Converter Styles */
.file-upload-container {
    margin-bottom: 2rem;
    width: 100%;
}

.file-upload-area {
    border: 2px dashed var(--first-color-light);
    border-radius: 1rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    background-color: rgba(var(--first-color-rgb), 0.05);
}

.file-upload-area.highlight {
    border-color: var(--first-color);
    background-color: rgba(var(--first-color-rgb), 0.1);
    transform: scale(1.01);
}

.file-upload-area.has-file {
    border-color: var(--first-color);
    background-color: rgba(var(--first-color-rgb), 0.1);
}

.file-upload-icon {
    font-size: 3.5rem;
    color: var(--first-color);
    margin-bottom: 1rem;
    display: block;
}

.file-upload-title {
    font-size: var(--h3-font-size);
    margin-bottom: 0.5rem;
    color: var(--title-color);
}

.file-upload-subtitle {
    color: var(--text-color-light);
    margin-bottom: 1rem;
}

.file-select-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--first-color);
    color: #fff;
    padding: 0.7rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-select-button:hover {
    background-color: var(--first-color-alt);
    transform: translateY(-2px);
}

.file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.selected-file-name {
    margin-top: 1rem;
    color: var(--text-color);
    word-break: break-all;
    max-width: 100%;
    font-size: var(--small-font-size);
}

/* Format options styles */
.format-container {
    margin-bottom: 1.5rem;
}

.format-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.format-header i {
    color: var(--first-color);
    font-size: 1.5rem;
}

.format-header h4 {
    color: var(--title-color);
    font-size: var(--h3-font-size);
    margin: 0;
}

.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 1rem;
}

.format-option {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.format-option-inner {
    border: 2px solid var(--container-color-alt);
    border-radius: 0.75rem;
    padding: 1rem 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: all 0.2s ease;
    background-color: var(--container-color);
}

.format-option:hover .format-option-inner {
    border-color: var(--first-color-light);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.format-option.selected .format-option-inner {
    border-color: var(--first-color);
    background-color: rgba(var(--first-color-rgb), 0.1);
}

.format-icon {
    font-size: var(--h3-font-size);
    font-weight: var(--font-semi-bold);
    color: var(--first-color);
    margin-bottom: 0.5rem;
    display: block;
}

.format-name {
    font-size: var(--small-font-size);
    color: var(--text-color);
}

.format-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: var(--container-color);
    border-radius: 0.75rem;
    gap: 0.75rem;
    color: var(--text-color-light);
}

.format-placeholder i {
    font-size: 1.5rem;
    color: var(--first-color-light);
}

.format-error {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: rgba(255, 76, 76, 0.1);
    border-radius: 0.75rem;
    gap: 0.75rem;
    color: #ff4c4c;
}

.format-error i {
    font-size: 1.5rem;
}

/* Download button */
.download-button-container {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--first-color);
    color: #fff;
    padding: 0.8rem 1.8rem;
    border-radius: 0.5rem;
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.download-button:hover {
    background-color: var(--first-color-alt);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.download-button i {
    font-size: 1.2rem;
}

/* Converter info section */
.converter-info {
    background-color: var(--container-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.converter-info h4 {
    font-size: var(--h3-font-size);
    color: var(--title-color);
    margin-bottom: 1rem;
    text-align: center;
}

.format-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.format-group {
    text-align: center;
}

.format-group h5 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--first-color);
    font-size: var(--normal-font-size);
    margin-bottom: 0.5rem;
}

.format-group p {
    color: var(--text-color-light);
    font-size: var(--small-font-size);
}

/* Define RGB versions of the first color for rgba usage */
:root {
    --first-color-rgb: 71, 87, 240;
}

/* Dark mode adjustments */
body.dark-theme .file-upload-area {
    background-color: rgba(71, 87, 240, 0.08);
    border-color: rgba(71, 87, 240, 0.3);
}

body.dark-theme .format-option-inner {
    background-color: var(--container-color-dark);
}

body.dark-theme .format-placeholder,
body.dark-theme .converter-info {
    background-color: var(--container-color-dark);
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
    .format-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .format-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .format-groups {
        grid-template-columns: 1fr 1fr;
    }
}

/* CSS variables for easy theme switching */
:root {
    --first-color-rgb: 18, 114, 222;
    --text-color-light-rgb: 130, 142, 160;
}