/* Twitter Video Downloader Styles */
.tvd-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.tvd-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 2px 10px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    border: 1px solid #e6e6e6;
    transition: transform 0.3s ease;
}

.tvd-card:hover {
    transform: translateY(-2px);
}

.tvd-header {
    background: linear-gradient(135deg, #1DA1F2 0%, #0c7abf 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tvd-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
}

.tvd-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.tvd-icon {
    width: 32px;
    height: 32px;
}

.tvd-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
}

.tvd-form-section {
    padding: 40px 30px 30px;
}

.tvd-input-group {
    margin-bottom: 20px;
}

.tvd-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.tvd-input-icon {
    width: 18px;
    height: 18px;
    color: #1DA1F2;
}

.tvd-input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.tvd-input {
    flex: 1;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    outline: none;
}

.tvd-input:focus {
    border-color: #1DA1F2;
    background: white;
    box-shadow: 0 0 0 3px rgba(29, 161, 242, 0.1);
}

.tvd-fetch-btn {
    padding: 16px 32px;
    background: linear-gradient(135deg, #1DA1F2 0%, #0c7abf 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    min-width: 140px;
    justify-content: center;
}

.tvd-fetch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(29, 161, 242, 0.3);
}

.tvd-fetch-btn:active {
    transform: translateY(0);
}

.tvd-loader {
    display: none;
}

.tvd-spinner {
    width: 20px;
    height: 20px;
    animation: tvd-spin 1s linear infinite;
}

@keyframes tvd-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.tvd-help-text {
    font-size: 14px;
    color: #667580;
    margin: 8px 0 0 0;
    font-style: italic;
}

.tvd-results-section {
    padding: 0 30px 30px;
}

.tvd-video-preview {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e1e8ed;
}

.tvd-thumbnail-container {
    width: 150px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e1e8ed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tvd-thumbnail-placeholder {
    color: #aab8c2;
    width: 40px;
    height: 40px;
}

.tvd-video-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tvd-video-title {
    font-size: 18px;
    font-weight: 600;
    color: #14171a;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.tvd-video-author {
    font-size: 14px;
    color: #657786;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tvd-quality-section {
    margin-bottom: 30px;
}

.tvd-quality-title {
    font-size: 18px;
    font-weight: 600;
    color: #14171a;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tvd-quality-icon {
    width: 20px;
    height: 20px;
    color: #1DA1F2;
}

.tvd-quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.tvd-quality-option {
    padding: 18px;
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tvd-quality-option:hover {
    border-color: #1DA1F2;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.tvd-quality-option.selected {
    border-color: #1DA1F2;
    background: linear-gradient(135deg, rgba(29, 161, 242, 0.05) 0%, rgba(12, 122, 191, 0.05) 100%);
}

.tvd-quality-option.selected::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid #1DA1F2;
    border-radius: 14px;
    z-index: -1;
}

.tvd-quality-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tvd-quality-label {
    font-size: 16px;
    font-weight: 600;
    color: #14171a;
}

.tvd-quality-badge {
    background: #1DA1F2;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.tvd-quality-size {
    font-size: 14px;
    color: #657786;
    margin: 0;
}

.tvd-action-section {
    text-align: center;
    padding: 20px 0 10px;
}

.tvd-download-btn {
    padding: 18px 40px;
    background: linear-gradient(135deg, #17bf63 0%, #119e4d 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    min-width: 220px;
    justify-content: center;
}

.tvd-download-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(23, 191, 99, 0.3);
}

.tvd-download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.tvd-download-icon {
    width: 22px;
    height: 22px;
}

.tvd-message {
    margin: 20px 30px;
    padding: 16px;
    border-radius: 12px;
    font-size: 15px;
    display: none;
}

.tvd-message.success {
    background: #dcf8c6;
    color: #2d6628;
    border: 1px solid #a3d977;
    display: block;
}

.tvd-message.error {
    background: #fde8e8;
    color: #c53030;
    border: 1px solid #feb2b2;
    display: block;
}

.tvd-message.info {
    background: #e3f2fd;
    color: #1e40af;
    border: 1px solid #93c5fd;
    display: block;
}

.tvd-footer {
    padding: 25px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e1e8ed;
}

.tvd-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    position: relative;
}

.tvd-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e1e8ed;
    z-index: 1;
}

.tvd-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.tvd-step-number {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #657786;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.tvd-step:first-child .tvd-step-number {
    background: #1DA1F2;
    border-color: #1DA1F2;
    color: white;
}

.tvd-step-text {
    font-size: 14px;
    color: #657786;
    text-align: center;
    font-weight: 500;
}

.tvd-disclaimer {
    font-size: 13px;
    color: #657786;
    text-align: center;
    margin: 0;
    line-height: 1.6;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tvd-container {
        padding: 15px;
    }
    
    .tvd-header {
        padding: 25px 20px;
    }
    
    .tvd-title {
        font-size: 24px;
        flex-direction: column;
        gap: 8px;
    }
    
    .tvd-form-section,
    .tvd-results-section {
        padding: 30px 20px;
    }
    
    .tvd-input-wrapper {
        flex-direction: column;
    }
    
    .tvd-fetch-btn {
        width: 100%;
    }
    
    .tvd-video-preview {
        flex-direction: column;
        text-align: center;
    }
    
    .tvd-thumbnail-container {
        width: 100%;
        height: 150px;
    }
    
    .tvd-quality-grid {
        grid-template-columns: 1fr;
    }
    
    .tvd-steps {
        flex-direction: column;
        gap: 25px;
    }
    
    .tvd-steps::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .tvd-card {
        border-radius: 12px;
    }
    
    .tvd-header {
        padding: 20px 15px;
    }
    
    .tvd-title {
        font-size: 20px;
    }
    
    .tvd-download-btn {
        width: 100%;
        min-width: auto;
    }
}