@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #ff3e00;
    --primary-gradient: linear-gradient(135deg, #ff3e00, #ff8c00);
    --bg-color: #0f0f13;
    --card-bg: rgba(23, 23, 28, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --danger-color: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(255, 62, 0, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(255, 140, 0, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Header */
.header {
    text-align: center;
    animation: fadeInDown 0.8s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo h1 {
    font-size: 2.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Main Card */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* Input Section */
.input-section {
    margin-bottom: 2rem;
}

.input-section label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-wrapper {
    display: flex;
    gap: 1rem;
}

input[type="text"] {
    flex: 1;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 62, 0, 0.1);
}

.btn-fetch {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-fetch:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 62, 0, 0.2);
}

/* Search History */
.history-container {
    margin-top: 1.5rem;
    width: 100%;
    animation: fadeIn 0.5s ease-out;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.history-header h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.clear-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.search-history {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.8rem;
}

.history-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.history-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
}

.history-thumb {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.history-info {
    flex: 1;
    min-width: 0;
}

.history-title {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.history-channel {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

/* Preview */
.video-preview {
    display: flex;
    gap: 1.5rem;
    background: var(--glass-bg);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    animation: slideUp 0.5s ease-out;
}

.video-preview img {
    width: 200px;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 12px;
}

.video-info h3 {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Download Options */
.download-options {
    animation: slideUp 0.5s ease-out 0.1s backwards;
}

.format-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.format-tab {
    flex: 1;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.format-tab.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
}

.quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.quality-option {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quality-option:hover,
.quality-option.selected {
    border-color: var(--primary-color);
    color: white;
}

.quality-option.selected {
    background: rgba(255, 62, 0, 0.1);
}

.btn-download {
    width: 100%;
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 62, 0, 0.3);
}

.btn-download:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Progress */
.download-progress {
    margin-top: 2rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.progress-bar {
    height: 8px;
    background: var(--glass-bg);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    transition: width 0.3s ease;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    margin-top: 1rem;
}

.feature {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature h4 {
    margin-bottom: 0.5rem;
}

.feature p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Footer */
.footer {
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.7;
}

.hidden {
    display: none !important;
}

.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Media Queries */
@media (max-width: 768px) {
    .features {
        grid-template-columns: 1fr;
    }

    .video-preview {
        flex-direction: column;
    }

    .video-preview img {
        width: 100%;
    }

    .card {
        padding: 1.5rem;
    }

    .logo h1 {
        font-size: 1.8rem;
    }
}. a d - s p a c e  
   w i d t h :   1 0 0 % ;   m a r g i n :   1 . 5 r e  
 m   0 ;   d i s p l a y :   f l e x ;   j u s t i f y  
 - c o n t e n t :   c e n t e r ;   a l i g n - i t e  
 m s :   c e n t e r ;    
 / *   A d s   * /  
 . a d - s p a c e   {  
         w i d t h :   1 0 0 % ;  
         m a r g i n :   1 . 5 r e m   0 ;  
         d i s p l a y :   f l e x ;  
         j u s t i f y - c o n t e n t :   c e n t e r ;  
         a l i g n - i t e m s :   c e n t e r ;  
         a n i m a t i o n :   f a d e I n   0 . 5 s   e a s e - o u t ;  
 }  
  
 . a d - p l a c e h o l d e r   {  
         w i d t h :   1 0 0 % ;  
         m a x - w i d t h :   7 2 8 p x ;  
         h e i g h t :   9 0 p x ;  
         b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 3 ) ;  
         b o r d e r :   1 p x   d a s h e d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 1 ) ;  
         b o r d e r - r a d i u s :   1 2 p x ;  
         d i s p l a y :   f l e x ;  
         j u s t i f y - c o n t e n t :   c e n t e r ;  
         a l i g n - i t e m s :   c e n t e r ;  
         c o l o r :   v a r ( - - t e x t - s e c o n d a r y ) ;  
         f o n t - s i z e :   0 . 9 r e m ;  
         l e t t e r - s p a c i n g :   1 p x ;  
         o v e r f l o w :   h i d d e n ;  
 }  
  
 . g l o b e - a d   . a d - p l a c e h o l d e r   {  
         m a x - w i d t h :   1 0 0 % ;  
         h e i g h t :   1 2 0 p x ;  
 }  
  
 @ m e d i a   ( m a x - w i d t h :   6 0 0 p x )   {  
         . a d - p l a c e h o l d e r   {  
                 h e i g h t :   1 0 0 p x ;  
                 / *   M o b i l d É "!  h Ã ¼ n d Ã ¼ r l Ã ¼ k   * /  
                 m a x - w i d t h :   3 0 0 p x ;  
         }  
 }  
 / *   S e r v e r   O v e r l a y   * /  
 . s e r v e r - o v e r l a y   {  
         p o s i t i o n :   f i x e d ;  
         t o p :   0 ;  
         l e f t :   0 ;  
         w i d t h :   1 0 0 % ;  
         h e i g h t :   1 0 0 % ;  
         b a c k g r o u n d :   # 0 f 0 f 1 3 ;  
         z - i n d e x :   9 9 9 9 ;  
         d i s p l a y :   f l e x ;  
         j u s t i f y - c o n t e n t :   c e n t e r ;  
         a l i g n - i t e m s :   c e n t e r ;  
         f l e x - d i r e c t i o n :   c o l u m n ;  
         t r a n s i t i o n :   o p a c i t y   0 . 5 s   e a s e ;  
 }  
  
 . s e r v e r - s t a t u s - c o n t e n t   {  
         t e x t - a l i g n :   c e n t e r ;  
         p a d d i n g :   2 r e m ;  
         m a x - w i d t h :   4 0 0 p x ;  
 }  
  
 . s t a t u s - l o g o   {  
         w i d t h :   6 0 p x ;  
         h e i g h t :   6 0 p x ;  
         m a r g i n - b o t t o m :   1 . 5 r e m ;  
         f i l t e r :   d r o p - s h a d o w ( 0   0   1 0 p x   r g b a ( 2 5 5 ,   0 ,   0 ,   0 . 5 ) ) ;  
 }  
  
 . s e r v e r - l o a d e r   {  
         w i d t h :   6 0 p x ;  
         h e i g h t :   6 0 p x ;  
         b o r d e r :   4 p x   s o l i d   r g b a ( 2 5 5 ,   6 2 ,   0 ,   0 . 1 ) ;  
         b o r d e r - t o p - c o l o r :   v a r ( - - p r i m a r y - c o l o r ) ;  
         b o r d e r - r a d i u s :   5 0 % ;  
         p o s i t i o n :   a b s o l u t e ;  
         t o p :   5 0 % ;  
         l e f t :   5 0 % ;  
         m a r g i n - t o p :   - 9 0 p x ;  
         m a r g i n - l e f t :   - 3 0 p x ;  
         a n i m a t i o n :   s p i n   1 s   l i n e a r   i n f i n i t e ;  
 }  
  
 . s e r v e r - o v e r l a y   h 3   {  
         f o n t - s i z e :   1 . 5 r e m ;  
         m a r g i n - b o t t o m :   0 . 5 r e m ;  
         c o l o r :   w h i t e ;  
 }  
  
 . s e r v e r - o v e r l a y   p   {  
         c o l o r :   v a r ( - - t e x t - s e c o n d a r y ) ;  
 }  
  
 . w a i t - t i m e r   {  
         m a r g i n - t o p :   1 . 5 r e m ;  
         p a d d i n g - t o p :   1 . 5 r e m ;  
         b o r d e r - t o p :   1 p x   s o l i d   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 1 ) ;  
         a n i m a t i o n :   f a d e I n   0 . 5 s   e a s e ;  
 }  
  
 . p r o g r e s s - l i n e   {  
         w i d t h :   1 0 0 % ;  
         h e i g h t :   4 p x ;  
         b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 1 ) ;  
         b o r d e r - r a d i u s :   2 p x ;  
         m a r g i n :   1 r e m   0 ;  
         o v e r f l o w :   h i d d e n ;  
         p o s i t i o n :   r e l a t i v e ;  
 }  
  
 . p r o g r e s s - l i n e : : a f t e r   {  
         c o n t e n t :   ' ' ;  
         p o s i t i o n :   a b s o l u t e ;  
         t o p :   0 ;  
         l e f t :   0 ;  
         h e i g h t :   1 0 0 % ;  
         w i d t h :   4 0 % ;  
         b a c k g r o u n d :   v a r ( - - p r i m a r y - g r a d i e n t ) ;  
         a n i m a t i o n :   l o a d i n g L i n e   2 s   i n f i n i t e   e a s e - i n - o u t ;  
         b o r d e r - r a d i u s :   2 p x ;  
 }  
  
 @ k e y f r a m e s   l o a d i n g L i n e   {  
         0 %   {  
                 l e f t :   - 4 0 % ;  
         }  
  
         1 0 0 %   {  
                 l e f t :   1 4 0 % ;  
         }  
 }  
  
 . s e r v e r - o v e r l a y . f a d e - o u t   {  
         o p a c i t y :   0 ;  
         p o i n t e r - e v e n t s :   n o n e ;  
 }  
 