/* X Twitter Video Downloader - Frontend Styles */

.xtv-downloader-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
}

.xtv-header {
    text-align: center;
    margin-bottom: 2rem;
}

.xtv-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
    background: linear-gradient(135deg, #1da1f2, #0d8bd9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.xtv-form-container {
    margin-bottom: 2rem;
}

.xtv-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.xtv-url-input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafbfc;
    color: #1a1a1a;
}

.xtv-url-input:focus {
    outline: none;
    border-color: #1da1f2;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(29, 161, 242, 0.1);
}

.xtv-url-input::placeholder {
    color: #6c757d;
}

.xtv-paste-btn {
    padding: 1rem 1.5rem;
    background: #000000;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 80px;
}

.xtv-paste-btn:hover {
    background: #333333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.xtv-paste-btn:active {
    transform: translateY(0);
}

.xtv-paste-btn.clear {
    background: #dc3545;
}

.xtv-paste-btn.clear:hover {
    background: #c82333;
}

.xtv-download-btn {
    width: 100%;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, #000000, #333333);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.xtv-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #333333, #000000);
}

.xtv-download-btn:active {
    transform: translateY(0);
}

.xtv-download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.xtv-btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.xtv-spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.xtv-spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Results Container */
.xtv-result-container {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
}

.xtv-error {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.xtv-success {
    color: #155724;
}

.xtv-video-preview {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.xtv-video-preview video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

.xtv-download-links h4 {
    margin: 0 0 1rem 0;
    color: #1a1a1a;
    font-size: 1.1rem;
    font-weight: 600;
}

.xtv-download-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.xtv-download-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.xtv-download-link:hover {
    border-color: #000000;
    background: #f8f9ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.xtv-download-link:active {
    transform: translateY(0);
}

.xtv-download-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.xtv-download-label {
    font-weight: 600;
    color: #1a1a1a;
}

.xtv-download-size {
    font-size: 0.875rem;
    color: #6c757d;
}

.xtv-download-icon {
    color: #000000;
    font-size: 1.25rem;
}

/* Try Another Video Button */
.xtv-try-another-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: #000000;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.xtv-try-another-btn:hover {
    background: #333333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.xtv-try-another-btn:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .xtv-downloader-container {
        padding: 1.5rem;
        margin: 1rem;
        border-radius: 12px;
    }
    
    .xtv-title {
        font-size: 1.5rem;
    }
    
    .xtv-input-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .xtv-paste-btn {
        width: 100%;
        padding: 1rem;
    }
    
    .xtv-download-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .xtv-download-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        text-align: left;
    }
    
    .xtv-download-icon {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .xtv-downloader-container {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .xtv-title {
        font-size: 1.25rem;
    }
    
    .xtv-url-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Loading Animation */
.xtv-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Success Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.xtv-success {
    animation: fadeInUp 0.5s ease-out;
}

/* Error Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.xtv-error {
    animation: shake 0.5s ease-in-out;
} 