/* Instagram Reel Downloader Styles */
.insta-downloader-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.insta-downloader-header {
    text-align: center;
    margin-bottom: 30px;
}

.insta-downloader-header h3 {
    font-size: 28px;
    color: #262626;
    margin-bottom: 8px;
    font-weight: 600;
}

.insta-downloader-header p {
    color: #8e8e8e;
    font-size: 16px;
    margin: 0;
}

.insta-downloader-form {
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.insta-url-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #dbdbdb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.insta-url-input:focus {
    outline: none;
    border-color: #e91e63;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.insta-download-btn {
    padding: 15px 30px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.insta-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.3);
}

.insta-download-btn:active {
    transform: translateY(0);
}

.insta-download-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.format-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.format-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #262626;
    font-weight: 500;
    cursor: pointer;
}

.format-options input[type="radio"] {
    accent-color: #e91e63;
}

.insta-downloader-result {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
}

.result-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-info {
    display: flex;
    gap: 15px;
    align-items: start;
}

.video-thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #dbdbdb;
}

.video-details h4 {
    margin: 0 0 5px 0;
    color: #262626;
    font-size: 18px;
    font-weight: 600;
}

.video-details p {
    margin: 0;
    color: #8e8e8e;
    font-size: 14px;
}

.download-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.download-link:hover {
    background: #45a049;
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

.download-link.medium-quality {
    background: #2196F3;
}

.download-link.medium-quality:hover {
    background: #1976D2;
}

.download-icon::before {
    content: "⬇";
    font-size: 16px;
}

.insta-downloader-error {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.error-message {
    color: #d32f2f;
    margin: 0;
    font-weight: 500;
}

.insta-downloader-instructions {
    margin-top: 30px;
    padding: 20px;
    background: #f0f9ff;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
}

.insta-downloader-instructions h4 {
    color: #1976D2;
    margin-bottom: 15px;
    font-size: 18px;
}

.insta-downloader-instructions ol {
    margin: 0;
    padding-left: 20px;
}

.insta-downloader-instructions li {
    color: #262626;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Dark theme */
.insta-downloader-container.theme-dark {
    background: #1a1a1a;
    border-color: #333333;
    color: #ffffff;
}

.theme-dark .insta-downloader-header h3 {
    color: #ffffff;
}

.theme-dark .insta-downloader-header p {
    color: #cccccc;
}

.theme-dark .insta-url-input {
    background: #2a2a2a;
    border-color: #444444;
    color: #ffffff;
}

.theme-dark .insta-url-input:focus {
    background: #333333;
    border-color: #e91e63;
}

.theme-dark .format-options label {
    color: #ffffff;
}

.theme-dark .insta-downloader-result {
    background: #2a2a2a;
    border-color: #444444;
}

.theme-dark .video-details h4 {
    color: #ffffff;
}

.theme-dark .video-details p {
    color: #cccccc;
}

.theme-dark .insta-downloader-instructions {
    background: #2a2a2a;
    border-color: #2196F3;
}

.theme-dark .insta-downloader-instructions h4 {
    color: #64B5F6;
}

.theme-dark .insta-downloader-instructions li {
    color: #ffffff;
}

/* Minimal theme */
.insta-downloader-container.theme-minimal {
    box-shadow: none;
    border: 1px solid #e0e0e0;
    background: #fafafa;
}

.theme-minimal .insta-download-btn {
    background: #2196F3;
}

.theme-minimal .insta-download-btn:hover {
    background: #1976D2;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    .insta-downloader-container {
        margin: 10px;
        padding: 20px;
    }

    .input-group {
        flex-direction: column;
    }

    .insta-download-btn {
        width: 100%;
    }

    .format-options {
        justify-content: center;
        gap: 15px;
    }

    .video-info {
        flex-direction: column;
        text-align: center;
    }

    .download-options {
        justify-content: center;
    }

    .download-link {
        flex: 1;
        justify-content: center;
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .insta-downloader-container {
        padding: 15px;
    }

    .insta-downloader-header h3 {
        font-size: 24px;
    }

    .insta-url-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .download-options {
        flex-direction: column;
    }
}

/* Success animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.insta-downloader-result.show {
    animation: fadeInUp 0.5s ease-out;
}

/* Loading state */
.insta-downloader-container.loading {
    pointer-events: none;
}

.insta-downloader-container.loading .insta-url-input {
    opacity: 0.7;
}