/* Custom CSS for Social Video Downloader */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.3s ease;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Header Styles */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-brand i {
    color: #ffc107;
}

/* Main Content */
main {
    /* background: rgba(255, 255, 255, 0.95); */
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 2rem;
}

/* Hero Section */
.display-4 {
    background: linear-gradient(45deg, var(--primary-color), #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Styles */
.card {
    border-radius: var(--border-radius);
    border: none;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    font-weight: 600;
}

/* Form Styles */
.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    transition: var(--transition);
    padding: 0.75rem 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.input-group-lg .form-control {
    font-size: 1.1rem;
    padding: 1rem 1.25rem;
}

.input-group-text {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

/* Button Styles */
.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    padding: 0.75rem 1.5rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0056b3, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn-success {
    background: linear-gradient(45deg, var(--success-color), #1e7e34);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    background: linear-gradient(45deg, #1e7e34, var(--success-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Quality Selection */
.quality-option {
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem 1.5rem;
    background: white;
    text-align: center;
    font-weight: 600;
    min-width: 80px;
}

.quality-option:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.quality-option.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

/* Video Preview */
#videoPreview img {
    max-height: 200px;
    object-fit: cover;
    width: 100%;
}

#videoTitle {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Loading Animation */
.spinner-border {
    animation: spin 1s linear infinite;
}

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

/* Alert Styles */
.alert {
    border-radius: var(--border-radius);
    border: none;
    font-weight: 500;
}

.alert-danger {
    background: linear-gradient(45deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.alert-success {
    background: linear-gradient(45deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-info {
    background: linear-gradient(45deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

/* Feature Cards */
.feature-card {
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card .display-4 {
    transition: var(--transition);
}

.feature-card:hover .display-4 {
    transform: scale(1.1);
}

/* Ad Space */
.ad-space {
    position: sticky;
    top: 2rem;
    height: 600px;
}

.ad-space .card {
    border: 2px dashed #dee2e6;
    background: rgba(248, 249, 250, 0.5);
}

/* Supported Icons */
#supported-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#supported-icons i {
    font-size: 1.5rem;
    transition: var(--transition);
    background: #fff;
    padding: 5px;
    border-radius: 7px;
}

#supported-icons i:hover {
    transform: scale(1.2);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #8c8c8c, #a7d3ff) !important
}

footer i {
    font-size: 1.5rem;
    transition: var(--transition);
}

footer i:hover {
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    main {
        margin: 1rem;
        padding: 1rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    #videoPreview .row {
        flex-direction: column;
    }
    
    #videoPreview img {
        margin-bottom: 1rem;
    }
    
    .quality-option {
        min-width: 60px;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Improve container spacing */
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Better card spacing */
    .card {
        margin-bottom: 1.5rem;
    }
    
    /* Improve navigation */
    .navbar .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Better input group styling */
    .input-group-lg {
        box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    }
    
    /* Improve loading spinner visibility */
    #loading .spinner-border {
        width: 3rem;
        height: 3rem;
    }
    
    /* Better error message styling */
    .alert {
        margin-bottom: 1rem;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .display-4 {
        font-size: 1.8rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .input-group-lg .form-control {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
    
    #qualityOptions {
        justify-content: center;
    }
    
    /* Additional mobile improvements */
    .mobile-input-container .form-control {
        font-size: 16px !important; /* Prevents zoom on iOS */
        border-radius: 0.375rem;
    }
    
    .mobile-input-container .input-group-text {
        border-radius: 0.375rem 0 0 0.375rem;
    }
    
    /* Improve video preview on mobile */
    #videoPreview .card-body {
        padding: 1rem;
    }
    
    #videoPreview .row {
        margin: 0;
    }
    
    #videoPreview .col-md-4,
    #videoPreview .col-md-8 {
        padding: 0;
    }
    
    #videoPreview .col-md-8 {
        margin-top: 1rem;
    }
    
    /* Better quality selection on mobile */
    .quality-option {
        min-width: 50px;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        margin: 0.25rem;
    }
    
    /* Improve download button */
    #downloadBtn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        width: 100%;
    }
    
    /* Better spacing for features section */
    .features-section .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Improve hero section */
    .hero-section {
        padding: 2rem 1rem;
    }
    
    /* Better footer layout */
    footer .col-md-6 {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    footer .stats-counter {
        margin-bottom: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Progress Bar */
.progress {
    height: 8px;
    border-radius: var(--border-radius);
    background: #e9ecef;
}

.progress-bar {
    background: linear-gradient(45deg, var(--primary-color), #764ba2);
    border-radius: var(--border-radius);
    transition: width 0.3s ease;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.border-0 {
    border: 0 !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--primary-color), #764ba2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #764ba2, var(--primary-color));
}

/* Download Statistics Styling */
.download-stats {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-counter {
    text-align: center;
    margin: 1rem 0;
}

.total-downloads {
    position: relative;
    display: inline-block;
}

.counter-number {
    display: block;
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #fff566);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
    font-family: 'Arial Black', Arial, sans-serif;
    letter-spacing: 2px;
    line-height: 1;
}

.counter-label {
    display: block;
    font-size: 0.9rem;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

.monthly-stats {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.platform-breakdown {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.platform-stat {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    margin: 0.1rem;
    display: inline-block;
}

.text-gradient {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* Glow animation for counter */
@keyframes glow {
    from {
        text-shadow: 
            0 0 10px rgba(255, 215, 0, 0.5),
            0 0 20px rgba(255, 215, 0, 0.5),
            0 0 30px rgba(255, 215, 0, 0.5);
    }
    to {
        text-shadow: 
            0 0 20px rgba(255, 215, 0, 0.8),
            0 0 30px rgba(255, 215, 0, 0.8),
            0 0 40px rgba(255, 215, 0, 0.8);
    }
}

/* Counter animation */
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.counter-number.animate {
    animation: countUp 0.6s ease-out;
}

/* Pulse effect for new downloads */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.stats-counter.updated {
    animation: pulse 0.5s ease-in-out;
}

/* Creative number styling */
.counter-number::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .download-stats {
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .counter-number {
        font-size: 2.5rem;
    }
    
    .monthly-stats {
        text-align: center;
    }
    
    .platform-breakdown {
        text-align: center;
    }
    
    /* Mobile input improvements */
    .mobile-input-container {
        margin-top: 0.5rem;
    }
    
    .mobile-input-container .input-group {
        margin-bottom: 0.75rem;
    }
    
    .mobile-input-container .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem 1rem;
    }
    
    .mobile-input-container .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1.1rem;
        border-radius: 0.5rem;
    }
    
    /* Improve card padding on mobile */
    .card-body {
        padding: 1.5rem 1rem;
    }
    
    /* Better spacing for form elements */
    .form-text {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    /* Adjust hero section for mobile */
    .display-4 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .lead {
        font-size: 1rem;
        line-height: 1.4;
    }
}


