:root {
    --bg-color: #0d0f17;
    --primary: #5c38ff;
    --primary-hover: #4a2ad4;
    --accent: #ff2a5f;
    --text-main: #ffffff;
    --text-muted: #9499ad;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(25, 28, 41, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #111424 0%, var(--bg-color) 100%);
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.blob1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
    border-radius: 50%;
}

.blob2 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: -50px;
    right: -50px;
    border-radius: 50%;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
    margin-bottom: 1rem;
    animation: fadeInDown 0.8s ease-out;
}

.logo {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

.logo span {
    color: var(--primary);
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Glass Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out;
}

.input-group {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(92, 56, 255, 0.3);
}

.icon-link {
    color: var(--text-muted);
    padding: 0 1rem;
    font-size: 1.2rem;
}

#url-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    outline: none;
    padding: 0.8rem 0;
}

#url-input::placeholder {
    color: var(--text-muted);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(92, 56, 255, 0.4);
}

.error-msg {
    color: var(--accent);
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
    min-height: 1.2rem;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 2rem 0;
    animation: fadeIn 0.3s ease;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin: 0 auto 1rem;
}

.info-center{
    margin-top: 50px;
    color: var(--text-muted);
    font-size: 17px;
    text-align: justify;
    animation: fadeInUp 0.8s ease-out;
}

.info-center p{
    margin-top: 15px;
}

.info-center strong{
    color: var(--primary);
}

footer{
    font-size: 14px;
    display:flex;
    justify-content: center;
    padding: 20px;
    position: relative;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    
}

footer div{
    border-top: solid 1px #9499ad80;
    color: rgb(117, 122, 127);
    padding-top: 15px;
}

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

/* Results Section */
.results-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.video-info {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.thumbnail-wrapper {
    position: relative;
    width: 200px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.thumbnail-wrapper img {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    padding: 0.2rem 0.5rem;
    border-radius: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.meta h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.downloads-container h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.formats-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.format-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.format-card:hover {
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.format-details {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.format-res {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
}

.format-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.format-badge {
    background: rgba(92, 56, 255, 0.2);
    color: #bfaaff;
    padding: 0.2rem 0.5rem;
    border-radius: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.btn-download {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-download:hover {
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(92, 56, 255, 0.4);
}

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

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

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

/* Responsive */
@media (max-width: 600px) {
    .video-info {
        flex-direction: column;
        text-align: center;
    }
    .thumbnail-wrapper {
        width: 100%;
        max-width: 320px;
    }
    .input-group {
        flex-direction: column;
        background: transparent;
        border: none;
    }
    .input-group:focus-within {
        box-shadow: none;
    }
    #url-input {
        width: 100%;
        background: rgba(0,0,0,0.2);
        border: 1px solid var(--glass-border);
        border-radius: 1rem;
        padding: 1rem;
        margin-bottom: 0.5rem;
    }
    .btn-primary {
        width: 100%;
        justify-content: center;
    }
    .icon-link {
        display: none;
    }

    /*aaaaaaaaaaaaaaaaaaqqqqqqqqqqqqqqqqqqquiiiiiiiiiiiiiiiiiiiiiiiiiiii*/
    .format-card{
        display: block;
        width: 230px;
    }

    .btn-download{
        width: 100%;
        margin-top: 0.5rem;
        justify-content: center;
    }
}
