@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

.container {
    max-width: 800px;
    width: 100%;
    margin-top: 5rem;
    text-align: center;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #ff0050, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 0, 80, 0.3);
}

p.subtitle {
    font-size: 1.2rem;
    color: #a0a0b0;
    margin-bottom: 3rem;
}

.search-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 0.5rem;
    display: flex;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 242, 254, 0.2);
}

input {
    flex: 1;
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    color: #fff;
    outline: none;
}

input::placeholder {
    color: #888;
}

button.btn-download {
    background: linear-gradient(45deg, #ff0050, #8a2387);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 40px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 0, 80, 0.4);
}

button.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 80, 0.6);
}

button.btn-download:active {
    transform: translateY(1px);
}

/* Loading state */
.loader {
    display: none;
    margin: 2rem auto;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: #00f2fe;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Result Section */
.result-container {
    margin-top: 3rem;
    display: none;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-wrapper {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
}

video {
    width: 100%;
    max-height: 500px;
    outline: none;
}

.video-info {
    text-align: left;
    margin-bottom: 1.5rem;
}

.video-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.video-author {
    color: #a0a0b0;
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-action {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
}

.btn-action:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-action.primary {
    background: #00f2fe;
    color: #0f0c29;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.4);
}

.btn-action.primary:hover {
    background: #19d7e3;
    color: #0f0c29;
}

.error-message {
    color: #ff4757;
    margin-top: 1rem;
    font-weight: 600;
    display: none;
}

@media (max-width: 600px) {
    h1 {
        font-size: 2.5rem;
    }

    .search-box {
        flex-direction: column;
        border-radius: 20px;
        padding: 1rem;
    }

    input {
        margin-bottom: 1rem;
    }

    button.btn-download {
        width: 100%;
    }
}

/* Navbar */
.navbar {
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(to right, #ff0050, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #00f2fe;
}

/* Main Content & Footer Layout adjustments */
body {
    padding: 0;
}

.main-content {
    flex: 1;
    margin-top: 8rem;
    /* to account for navbar */
    margin-bottom: 4rem;
    padding: 0 2rem;
}

footer {
    width: 100%;
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    background: rgba(0, 0, 0, 0.2);
}

footer p {
    color: #a0a0b0;
    font-size: 0.9rem;
}

/* Page Content (About & Instructions) */
.page-content {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    text-align: left;
    margin-top: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.page-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #00f2fe;
    margin-top: 1rem;
}

.page-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #e0e0e0;
}

.page-content ol,
.page-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.page-content li {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
    color: #e0e0e0;
}

.page-content strong {
    color: #ff0050;
}

/* Responsive updates for navigation */
@media (max-width: 600px) {
    .navbar {
        height: auto;
        flex-direction: column;
        gap: 1rem;
        position: relative;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        margin: 0.5rem;
    }

    .main-content {
        margin-top: 2rem;
    }

    .page-content {
        padding: 1.5rem;
    }
}