.fbdown-container {
    width: 90%;
    max-width: 600px;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
    margin: 2rem auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Logo and title */
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2.5rem;
}

.logo-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #1877F2;
}

.fbdown-container h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1877F2;
    text-align: center;
}

/* Form elements */
.input-container {
    position: relative;
    margin-bottom: 1.8rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    flex: 1;
}

.paste-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #f0f2f5;
    color: #1877F2;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.paste-button:hover {
    background: #e4e6eb;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.1rem;
}

input[type="text"] {
    width: 100%;
    padding: 1.1rem 90px 1.1rem 50px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    background: #fff;
    color: #2a2a2a;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

input[type="text"]:focus {
    outline: none;
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.1);
    border-color: #1877F2;
}

.download-button {
    width: 100%;
    background: #1877F2;
    color: white;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.2);
    padding: 1rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.download-button:hover {
    transform: translateY(-2px);
    background: #0c5bce;
    box-shadow: 0 6px 15px rgba(24, 119, 242, 0.3);
}

.download-button:disabled {
    background: #e4e6eb;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.secondary-button {
    background: transparent;
    border: 1px solid #1877F2;
    color: #1877F2;
    margin-top: 1.2rem;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    text-align: center;
}

.secondary-button:hover {
    transform: translateY(-2px);
    background: rgba(24, 119, 242, 0.05);
}

/* Progress and loading */
#fbdown-progress-container {
    margin: 1.5rem 0;
    text-align: center;
}

progress {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    -webkit-appearance: none;
}

progress::-webkit-progress-bar {
    background-color: #f0f0f0;
    border-radius: 5px;
}

progress::-webkit-progress-value {
    background: #1877F2;
    border-radius: 5px;
}

#progress-percentage {
    display: block;
    margin-top: 0.8rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: #2a2a2a;
}

.loader {
    border: 4px solid #e7f3ff;
    border-top: 4px solid #1877F2;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results */
.fbdown-result {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1.2rem;
    color: #10b981;
    font-size: 1.6rem;
}

.result-header.error {
    color: #ef4444;
}

.result-content {
    background: rgba(255, 255, 255, 0.6);
    padding: 1.2rem;
    border-radius: 12px;
    margin-bottom: 1.2rem;
    word-break: break-word;
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 500;
}

.result-content.error {
    color: #ef4444;
}

.download-link {
    display: block;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #1877F2;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.download-link:hover {
    transform: translateY(-2px);
    background: #0c5bce;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.video-thumbnail {
    margin-bottom: 1.5rem;
    text-align: center;
}

.video-thumbnail img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Utilities */
.hidden {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .fbdown-container {
        width: 95%;
        padding: 1.8rem;
    }

    .fbdown-container h1 {
        font-size: 2rem;
    }

    .logo-icon {
        font-size: 3rem;
    }

    .download-button {
        padding: 1rem 1.8rem;
    }
}

@media (max-width: 480px) {
    .fbdown-container {
        padding: 1.5rem;
    }

    .fbdown-container h1 {
        font-size: 1.8rem;
    }
    
    .paste-button {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    input[type="text"] {
        padding-right: 70px;
    }
}

.ajax-loading {
    background: #e7f3ff !important;
    color: #1877F2 !important;
    cursor: wait !important;
}

.ajax-loading:hover {
    transform: none !important;
    box-shadow: none !important;
}