/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
}

/* RGB Border Animation - Enhanced for cross-platform compatibility */
@-webkit-keyframes rgb-border {
    0% { border-color: #ff0000; }
    16% { border-color: #ff8000; }
    33% { border-color: #ffff00; }
    50% { border-color: #80ff00; }
    66% { border-color: #00ff80; }
    83% { border-color: #0080ff; }
    100% { border-color: #8000ff; }
}

@keyframes rgb-border {
    0% { border-color: #ff0000; }
    16% { border-color: #ff8000; }
    33% { border-color: #ffff00; }
    50% { border-color: #80ff00; }
    66% { border-color: #00ff80; }
    83% { border-color: #0080ff; }
    100% { border-color: #8000ff; }
}

/* Bright RGB Border Animation for Intro Section - Enhanced */
@-webkit-keyframes bright-rgb-border {
    0% { 
        border-color: #ff3366; 
        box-shadow: 0 0 20px #ff3366, 0 0 40px #ff3366, 0 0 60px #ff3366;
    }
    16% { 
        border-color: #ffaa00; 
        box-shadow: 0 0 20px #ffaa00, 0 0 40px #ffaa00, 0 0 60px #ffaa00;
    }
    33% { 
        border-color: #ffff33; 
        box-shadow: 0 0 20px #ffff33, 0 0 40px #ffff33, 0 0 60px #ffff33;
    }
    50% { 
        border-color: #33ff33; 
        box-shadow: 0 0 20px #33ff33, 0 0 40px #33ff33, 0 0 60px #33ff33;
    }
    66% { 
        border-color: #33ffff; 
        box-shadow: 0 0 20px #33ffff, 0 0 40px #33ffff, 0 0 60px #33ffff;
    }
    83% { 
        border-color: #3366ff; 
        box-shadow: 0 0 20px #3366ff, 0 0 40px #3366ff, 0 0 60px #3366ff;
    }
    100% { 
        border-color: #cc33ff; 
        box-shadow: 0 0 20px #cc33ff, 0 0 40px #cc33ff, 0 0 60px #cc33ff;
    }
}

@keyframes bright-rgb-border {
    0% { 
        border-color: #ff3366; 
        box-shadow: 0 0 20px #ff3366, 0 0 40px #ff3366, 0 0 60px #ff3366;
    }
    16% { 
        border-color: #ffaa00; 
        box-shadow: 0 0 20px #ffaa00, 0 0 40px #ffaa00, 0 0 60px #ffaa00;
    }
    33% { 
        border-color: #ffff33; 
        box-shadow: 0 0 20px #ffff33, 0 0 40px #ffff33, 0 0 60px #ffff33;
    }
    50% { 
        border-color: #33ff33; 
        box-shadow: 0 0 20px #33ff33, 0 0 40px #33ff33, 0 0 60px #33ff33;
    }
    66% { 
        border-color: #33ffff; 
        box-shadow: 0 0 20px #33ffff, 0 0 40px #33ffff, 0 0 60px #33ffff;
    }
    83% { 
        border-color: #3366ff; 
        box-shadow: 0 0 20px #3366ff, 0 0 40px #3366ff, 0 0 60px #3366ff;
    }
    100% { 
        border-color: #cc33ff; 
        box-shadow: 0 0 20px #cc33ff, 0 0 40px #cc33ff, 0 0 60px #cc33ff;
    }
}

.rgb-border {
    border: 2px solid #ff0000 !important;
    -webkit-animation: rgb-border 3s linear infinite;
    animation: rgb-border 3s linear infinite;
}

.card {
    border: 2px solid #ff0000 !important;
    -webkit-animation: rgb-border 3s linear infinite;
    animation: rgb-border 3s linear infinite;
    border-radius: 15px !important;
}

.form-control {
    border: 2px solid #ff0000 !important;
    -webkit-animation: rgb-border 3s linear infinite;
    animation: rgb-border 3s linear infinite;
    border-radius: 10px !important;
}

.btn-primary {
    border: 2px solid #ff0000 !important;
    -webkit-animation: rgb-border 3s linear infinite;
    animation: rgb-border 3s linear infinite;
    border-radius: 10px !important;
}

.btn-success {
    border: 2px solid #ff0000 !important;
    -webkit-animation: rgb-border 3s linear infinite;
    animation: rgb-border 3s linear infinite;
    border-radius: 10px !important;
    background-color: #28a745 !important;
}

.btn-outline-primary {
    border: 2px solid #ff0000 !important;
    -webkit-animation: rgb-border 3s linear infinite;
    animation: rgb-border 3s linear infinite;
    border-radius: 10px !important;
    background-color: #ffffff !important;
    color: #007bff !important;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 20px;
}

.btn-outline-primary:hover {
    background-color: #007bff !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

#pasteBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

/* Mobile responsive styles */
@media (max-width: 576px) {
    .d-flex.gap-2 {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    #pasteBtn {
        width: 100% !important;
        min-width: unset !important;
        font-size: 18px;
        padding: 15px 20px;
    }
    
    #videoUrl {
        font-size: 16px;
        padding: 15px 20px;
    }
}

@media (max-width: 576px) {
    .d-flex.flex-column.flex-sm-row {
        flex-direction: column !important;
    }
    
    #installAppBtn {
        width: 100% !important;
        margin-top: 10px;
    }
}

.bright-rgb-border {
    border: 3px solid #ff3366 !important;
    -webkit-animation: bright-rgb-border 2s linear infinite;
    animation: bright-rgb-border 2s linear infinite;
    position: relative;
    overflow: hidden;
}

.bright-rgb-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff3366, #ffaa00, #ffff33, #33ff33, #33ffff, #3366ff, #cc33ff);
    border-radius: 15px;
    z-index: -1;
    -webkit-animation: bright-rgb-border 2s linear infinite;
    animation: bright-rgb-border 2s linear infinite;
}

/* Wave loading animation */
.centerV {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

.wave {
    width: 5px;
    height: 100px;
    background: linear-gradient(45deg, cyan, #fff);
    margin: 10px;
    animation: wave 1s linear infinite;
    border-radius: 20px;
}

.wave:nth-child(2) { animation-delay: 0.1s; }
.wave:nth-child(3) { animation-delay: 0.2s; }
.wave:nth-child(4) { animation-delay: 0.3s; }
.wave:nth-child(5) { animation-delay: 0.4s; }
.wave:nth-child(6) { animation-delay: 0.5s; }
.wave:nth-child(7) { animation-delay: 0.6s; }
.wave:nth-child(8) { animation-delay: 0.7s; }
.wave:nth-child(9) { animation-delay: 0.8s; }
.wave:nth-child(10) { animation-delay: 0.9s; }

@keyframes wave {
    0%, 40%, 100% { transform: scaleY(0.4); }
    20% { transform: scaleY(1); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.logo h1 {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-top: 10px;
}

/* Main content */
.main-content {
    flex: 1;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* Download section */
.download-section {
    margin-bottom: 40px;
}

.input-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.url-input {
    flex: 1;
    padding: 18px 24px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.url-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.url-input::placeholder {
    color: #999;
}

.download-btn {
    padding: 18px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

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

/* Supported platforms */
.supported-platforms {
    text-align: center;
    color: #666;
}

.supported-platforms p {
    margin-bottom: 10px;
    font-weight: 500;
}

.platform-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.platform-icons i {
    font-size: 1.5rem;
    color: #667eea;
    transition: all 0.3s ease;
    cursor: pointer;
}

.platform-icons i:hover {
    transform: scale(1.2);
    color: #764ba2;
}

.more-text {
    color: #999;
    font-style: italic;
}

/* Loading state */
.loading-state {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Error state */
.error-state {
    text-align: center;
    padding: 60px 20px;
    color: #e74c3c;
}

.error-state i {
    font-size: 3rem;
    margin-bottom: 20px;
}

.error-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.error-state p {
    margin-bottom: 20px;
    color: #666;
}

.retry-btn {
    padding: 12px 24px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #c0392b;
}

/* Video info */
.video-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    border: 2px solid #f0f0f0;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.video-card:hover {
    border-color: #667eea;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.video-thumbnail {
    position: relative;
    display: inline-block;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover {
    transform: scale(1.02);
}

.video-thumbnail img {
    border-radius: 12px;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.play-overlay:hover {
    background: rgba(0,0,0,0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Video Modal Styles */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-modal .modal-content {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    position: relative;
    border: 2px solid #ff0000;
    animation: rgb-border 3s linear infinite;
}

.video-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.video-modal .modal-header h3 {
    margin: 0;
    color: #333;
}

.video-modal .close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-modal .close-modal:hover {
    color: #ff0000;
}

.video-modal .video-container {
    width: 100%;
    max-width: 800px;
}

.video-modal video {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.video-details h2 {
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

.video-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9rem;
}

.duration {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.author {
    font-weight: 500;
}

.description {
    color: #666;
    line-height: 1.5;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Download options */
.download-options h3 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.download-links {
    display: grid;
    gap: 15px;
}

.download-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
}

.download-link:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.quality-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.quality {
    font-weight: 600;
    font-size: 1.1rem;
}

.file-info {
    color: #666;
    font-size: 0.9rem;
}

.download-action {
    background: #667eea;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-action:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.empty-state p {
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Dark RGB Footer */
.dark-rgb-footer {
    background: linear-gradient(90deg, #1a0d0d, #0d1a0d, #0d0d1a);
    -webkit-animation: dark-rgb-glow 4s linear infinite;
    animation: dark-rgb-glow 4s linear infinite;
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-rgb-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 0 20px;
}

.dark-wave {
    width: 8px;
    height: 100%;
    background: linear-gradient(45deg, #1a0d0d, #ff0000);
    animation: dark-rgb-wave 2s ease-in-out infinite;
    border-radius: 4px 4px 0 0;
    margin: 0 2px;
}

.dark-wave:nth-child(2) { animation-delay: 0.2s; }
.dark-wave:nth-child(3) { animation-delay: 0.4s; }
.dark-wave:nth-child(4) { animation-delay: 0.6s; }
.dark-wave:nth-child(5) { animation-delay: 0.8s; }
.dark-wave:nth-child(6) { animation-delay: 1.0s; }
.dark-wave:nth-child(7) { animation-delay: 1.2s; }
.dark-wave:nth-child(8) { animation-delay: 1.4s; }
.dark-wave:nth-child(9) { animation-delay: 1.6s; }
.dark-wave:nth-child(10) { animation-delay: 1.8s; }

.footer-content {
    z-index: 2;
    position: relative;
}

.dark-rgb-text {
    font-weight: 700;
    font-size: 1.2rem;
    -webkit-animation: dark-rgb-text 3s linear infinite;
    animation: dark-rgb-text 3s linear infinite;
    margin-bottom: 15px;
}

.footer-animation-bar {
    width: 200px;
    height: 4px;
    margin: 0 auto;
    background: linear-gradient(90deg, 
        #ff0000, #ff8000, #ffff00, #80ff00, 
        #00ff80, #0080ff, #8000ff, #ff0000
    );
    background-size: 200% 100%;
    animation: gradient-shift 2s linear infinite;
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

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

/* Mobile Menu Styles */
.mobile-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-radius: 0 0 15px 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    min-width: 280px;
    border: 2px solid #ff0000;
    animation: rgb-border 3s linear infinite;
}

.mobile-menu-dropdown.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    padding: 20px;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #444;
}

.mobile-menu-header h5 {
    color: #fff;
    margin: 0;
    font-weight: 600;
    animation: dark-rgb-text 3s linear infinite;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* RGB glow for hamburger (three horizontal lines) toggle */
#mobileMenuToggle {
    position: relative;
    border-radius: 10px;
}

#mobileMenuToggle.rgb::after {
    content: "";
    position: absolute;
    top: -4px; left: -4px; right: -4px; bottom: -4px;
    background: linear-gradient(90deg, #ff0040, #ff9900, #ffee00, #33ff00, #00ffee, #0066ff, #cc00ff, #ff0040);
    background-size: 400% 400%;
    filter: blur(8px);
    border-radius: 12px;
    animation: rgb-flow 6s linear infinite;
    z-index: -1;
}

.mobile-menu-close:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff0000;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    background: linear-gradient(45deg, #333, #444);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.mobile-menu-link:hover {
    color: #fff;
    background: linear-gradient(45deg, #444, #555);
    border-color: #ff0000;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}

.mobile-menu-link i {
    font-size: 1.3rem;
    width: 25px;
    text-align: center;
}

.mobile-menu-link:nth-child(1) i { color: #1877f2; }
.mobile-menu-link:nth-child(2) i { color: #e4405f; }
.mobile-menu-link:nth-child(3) i { color: #ff6b6b; }

.mobile-menu-link span {
    font-weight: 500;
    font-size: 1.1rem;
}

/* Hide mobile menu on desktop */
@media (min-width: 992px) {
    .mobile-menu-dropdown {
        display: none;
    }
}

/* Logo RGB Animation */
.logo-rgb-animation {
    box-shadow: 0 0 20px #ff0000;
    animation: logo-rgb-glow 3s linear infinite;
    transition: transform 0.3s ease;
}

.logo-rgb-animation:hover {
    transform: scale(1.1);
}

@keyframes logo-rgb-glow {
    0% { 
        box-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000, 0 0 60px #ff0000;
        filter: drop-shadow(0 0 10px #ff0000);
    }
    16% { 
        box-shadow: 0 0 20px #ff8000, 0 0 40px #ff8000, 0 0 60px #ff8000;
        filter: drop-shadow(0 0 10px #ff8000);
    }
    33% { 
        box-shadow: 0 0 20px #ffff00, 0 0 40px #ffff00, 0 0 60px #ffff00;
        filter: drop-shadow(0 0 10px #ffff00);
    }
    50% { 
        box-shadow: 0 0 20px #80ff00, 0 0 40px #80ff00, 0 0 60px #80ff00;
        filter: drop-shadow(0 0 10px #80ff00);
    }
    66% { 
        box-shadow: 0 0 20px #00ff80, 0 0 40px #00ff80, 0 0 60px #00ff80;
        filter: drop-shadow(0 0 10px #00ff80);
    }
    83% { 
        box-shadow: 0 0 20px #0080ff, 0 0 40px #0080ff, 0 0 60px #0080ff;
        filter: drop-shadow(0 0 10px #0080ff);
    }
    100% { 
        box-shadow: 0 0 20px #8000ff, 0 0 40px #8000ff, 0 0 60px #8000ff;
        filter: drop-shadow(0 0 10px #8000ff);
    }
}

/* Show mobile menu button only on mobile */
@media (max-width: 991px) {
    .navbar-collapse {
        display: none !important;
    }
}

/* RGB animated accent for top-right social links and 3-dots menu */
.rgb-accent {
    position: relative;
}

.rgb-accent::after {
    content: "";
    position: absolute;
    top: -2px;
    right: -2px;
    bottom: -2px;
    left: -2px;
    background: linear-gradient(90deg, #ff0040, #ff9900, #ffee00, #33ff00, #00ffee, #0066ff, #cc00ff, #ff0040);
    background-size: 400% 400%;
    z-index: -1;
    filter: blur(6px);
    border-radius: 12px;
    animation: rgb-flow 6s linear infinite;
}

@keyframes rgb-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Apply to contact links and 3-dots menu container */
.navbar .nav-link.rgb, .mobile-menu-close.rgb, .mobile-menu-link.rgb {
    position: relative;
}

.navbar .nav-link.rgb::before,
.mobile-menu-close.rgb::before,
.mobile-menu-link.rgb::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 10px;
    padding: 2px;
    background: linear-gradient(90deg, #ff0040, #ff9900, #ffee00, #33ff00, #00ffee, #0066ff, #cc00ff, #ff0040);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    animation: rgb-flow 6s linear infinite;
}

.navbar .nav-link.rgb,
.mobile-menu-link.rgb {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

.three-dots.rgb {
    position: relative;
}

.three-dots.rgb::after {
    content: "";
    position: absolute;
    top: -4px;
    right: -4px;
    bottom: -4px;
    left: -4px;
    background: linear-gradient(90deg, #ff0040, #ff9900, #ffee00, #33ff00, #00ffee, #0066ff, #cc00ff, #ff0040);
    background-size: 400% 400%;
    filter: blur(8px);
    border-radius: 50%;
    animation: rgb-flow 6s linear infinite;
    opacity: 0.7;
}

/* Original Footer (for compatibility) */
.footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    margin-top: 20px;
}

/* Utility classes */
.hidden {
    display: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .input-container {
        flex-direction: column;
    }
    
    .download-btn {
        justify-content: center;
    }
    
    .video-card {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .platform-icons {
        gap: 15px;
    }
    
    .platform-icons i {
        font-size: 1.2rem;
    }
    
    .download-link {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .url-input {
        padding: 15px 20px;
        font-size: 14px;
    }
    
    .download-btn {
        padding: 15px 20px;
        font-size: 14px;
    }
}

/* Dark RGB Animations for Footer - Enhanced with webkit prefixes */
@-webkit-keyframes dark-rgb-glow {
    0% { 
        background: linear-gradient(90deg, #1a0d0d, #0d1a0d, #0d0d1a);
        box-shadow: 0 0 30px #ff0000aa, 0 0 60px #ff0000;
    }
    16% { 
        background: linear-gradient(90deg, #1a0f0d, #0d1a0f, #0f0d1a);
        box-shadow: 0 0 30px #ff8000aa, 0 0 60px #ff8000;
    }
    33% { 
        background: linear-gradient(90deg, #1a1a0d, #0d1a1a, #1a0d1a);
        box-shadow: 0 0 30px #ffff00aa, 0 0 60px #ffff00;
    }
    50% { 
        background: linear-gradient(90deg, #0f1a0d, #0d1a0f, #0d0f1a);
        box-shadow: 0 0 30px #80ff00aa, 0 0 60px #80ff00;
    }
    66% { 
        background: linear-gradient(90deg, #0d1a0f, #0d0f1a, #0f1a0d);
        box-shadow: 0 0 30px #00ff80aa, 0 0 60px #00ff80;
    }
    83% { 
        background: linear-gradient(90deg, #0d0f1a, #0f0d1a, #1a0f0d);
        box-shadow: 0 0 30px #0080ffaa, 0 0 60px #0080ff;
    }
    100% { 
        background: linear-gradient(90deg, #0f0d1a, #1a0d0f, #0d0f1a);
        box-shadow: 0 0 30px #8000ffaa, 0 0 60px #8000ff;
    }
}

@keyframes dark-rgb-glow {
    0% { 
        background: linear-gradient(90deg, #1a0d0d, #0d1a0d, #0d0d1a);
        box-shadow: 0 0 30px #ff0000aa, 0 0 60px #ff0000;
    }
    16% { 
        background: linear-gradient(90deg, #1a0f0d, #0d1a0f, #0f0d1a);
        box-shadow: 0 0 30px #ff8000aa, 0 0 60px #ff8000;
    }
    33% { 
        background: linear-gradient(90deg, #1a1a0d, #0d1a1a, #1a0d1a);
        box-shadow: 0 0 30px #ffff00aa, 0 0 60px #ffff00;
    }
    50% { 
        background: linear-gradient(90deg, #0f1a0d, #0d1a0f, #0d0f1a);
        box-shadow: 0 0 30px #80ff00aa, 0 0 60px #80ff00;
    }
    66% { 
        background: linear-gradient(90deg, #0d1a0f, #0d0f1a, #0f1a0d);
        box-shadow: 0 0 30px #00ff80aa, 0 0 60px #00ff80;
    }
    83% { 
        background: linear-gradient(90deg, #0d0f1a, #0f0d1a, #1a0f0d);
        box-shadow: 0 0 30px #0080ffaa, 0 0 60px #0080ff;
    }
    100% { 
        background: linear-gradient(90deg, #0f0d1a, #1a0d0f, #0d0f1a);
        box-shadow: 0 0 30px #8000ffaa, 0 0 60px #8000ff;
    }
}

@-webkit-keyframes dark-rgb-text {
    0% { color: #ff3366; text-shadow: 0 0 20px #ff3366, 0 0 40px #ff3366; }
    16% { color: #ffaa33; text-shadow: 0 0 20px #ffaa33, 0 0 40px #ffaa33; }
    33% { color: #ffff33; text-shadow: 0 0 20px #ffff33, 0 0 40px #ffff33; }
    50% { color: #33ff33; text-shadow: 0 0 20px #33ff33, 0 0 40px #33ff33; }
    66% { color: #33ffff; text-shadow: 0 0 20px #33ffff, 0 0 40px #33ffff; }
    83% { color: #3366ff; text-shadow: 0 0 20px #3366ff, 0 0 40px #3366ff; }
    100% { color: #cc33ff; text-shadow: 0 0 20px #cc33ff, 0 0 40px #cc33ff; }
}

@keyframes dark-rgb-text {
    0% { color: #ff3366; text-shadow: 0 0 20px #ff3366, 0 0 40px #ff3366; }
    16% { color: #ffaa33; text-shadow: 0 0 20px #ffaa33, 0 0 40px #ffaa33; }
    33% { color: #ffff33; text-shadow: 0 0 20px #ffff33, 0 0 40px #ffff33; }
    50% { color: #33ff33; text-shadow: 0 0 20px #33ff33, 0 0 40px #33ff33; }
    66% { color: #33ffff; text-shadow: 0 0 20px #33ffff, 0 0 40px #33ffff; }
    83% { color: #3366ff; text-shadow: 0 0 20px #3366ff, 0 0 40px #3366ff; }
    100% { color: #cc33ff; text-shadow: 0 0 20px #cc33ff, 0 0 40px #cc33ff; }
}

@keyframes dark-rgb-wave {
    0%, 100% { 
        transform: translateY(0px) scaleY(1);
        background: linear-gradient(45deg, #1a0d0d, #ff0000);
    }
    25% { 
        transform: translateY(-10px) scaleY(1.2);
        background: linear-gradient(45deg, #1a0f0d, #ff8000);
    }
    50% { 
        transform: translateY(-5px) scaleY(0.8);
        background: linear-gradient(45deg, #1a1a0d, #ffff00);
    }
    75% { 
        transform: translateY(-15px) scaleY(1.5);
        background: linear-gradient(45deg, #0f1a0d, #80ff00);
    }
}

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

.video-info {
    animation: fadeIn 0.5s ease;
}

.download-link {
    animation: fadeIn 0.3s ease;
}

.download-link:nth-child(2) {
    animation-delay: 0.1s;
}

.download-link:nth-child(3) {
    animation-delay: 0.2s;
}

.download-link:nth-child(4) {
    animation-delay: 0.3s;
}

/* Video Modal Styles */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
    max-width: calc(100% - 50px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: #f0f0f0;
    color: #333;
}

.video-container {
    position: relative;
    padding: 0;
}

.video-container video {
    width: 100%;
    height: auto;
    max-height: 70vh;
    display: block;
}

@media (max-width: 768px) {
    .video-modal .modal-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .video-modal .modal-header {
        padding: 15px;
    }
    
    .video-modal .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .video-modal .video-container video {
        max-height: 60vh;
    }
}

/* Fast Loading Overlay for Auto-Download */
#fastLoadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

#fastLoadingOverlay > div {
    text-align: center;
    color: white;
    padding: 40px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

#fastLoadingOverlay h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

#fastLoadingOverlay p {
    margin: 0;
    font-size: 16px;
    opacity: 0.8;
    line-height: 1.4;
}

/* Loading spinner animation */
#fastLoadingOverlay .loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    margin: 0 auto 25px;
    animation: spin 1s linear infinite;
}

/* Success checkmark */
#fastLoadingOverlay .success-check {
    width: 60px;
    height: 60px;
    background: #28a745;
    border-radius: 50%;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    animation: scaleIn 0.5s ease;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* Responsive design for fast loading */
@media (max-width: 768px) {
    #fastLoadingOverlay > div {
        padding: 30px 20px;
        margin: 20px;
    }
    
    #fastLoadingOverlay h3 {
        font-size: 18px;
    }
    
    #fastLoadingOverlay p {
        font-size: 14px;
    }
    
    #fastLoadingOverlay .loading-spinner,
    #fastLoadingOverlay .success-check {
        width: 50px;
        height: 50px;
        margin-bottom: 20px;
    }
}

/* Thin RGB header bar */
.rgb-header-bar {
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, #ff0040, #ff9900, #ffee00, #33ff00, #00ffee, #0066ff, #cc00ff, #ff0040);
    background-size: 400% 400%;
    animation: rgb-flow 6s linear infinite;
}
