:root {
    --bg-dark: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-primary: #fe2c55;
    --accent-secondary: #25f4ee;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Background animated shapes for premium look */
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite alternate;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(254, 44, 85, 0.4) 0%, rgba(15, 23, 42, 0) 70%);
}

.shape-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(37, 244, 238, 0.3) 0%, rgba(15, 23, 42, 0) 70%);
    animation-delay: -5s;
}

.shape-3 {
    top: 40%;
    left: 50%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, rgba(15, 23, 42, 0) 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(10%, 15%) scale(1.2);
    }
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
}

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

.logo-img {
    height: 32px;
    width: 32px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 0 10px rgba(37, 244, 238, 0.3);
}

nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-secondary);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero {
    text-align: center;
    width: 100%;
    max-width: 800px;
    margin-bottom: 4rem;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Input Form */
.search-container {
    padding: 1rem;
    border-radius: 99px;
    margin-bottom: 2rem;
}

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

.input-group:focus-within {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 20px rgba(37, 244, 238, 0.2);
    background: rgba(0, 0, 0, 0.4);
}

.input-icon {
    padding: 0 1rem 0 1.5rem;
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.input-group:focus-within .input-icon {
    color: var(--accent-secondary);
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    padding: 1.2rem 1rem 1.2rem 0;
    width: 100%;
}

.input-group input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

button {
    background: linear-gradient(135deg, var(--accent-primary), #d91c45);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 99px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--accent-primary);
}

button:active {
    transform: translateY(0);
}

/* States */
.hidden {
    display: none !important;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

.error-message {
    background: rgba(254, 44, 85, 0.2);
    border: 1px solid var(--accent-primary);
    color: #ffb3c1;
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    animation: fadeIn 0.3s ease;
}

/* Result Container */
.result-container {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    text-align: left;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-cover {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    aspect-ratio: 9/16;
    max-height: 400px;
    background: #000;
}

.result-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--accent-secondary);
}

.video-title {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: auto;
}

.btn-download {
    width: 100%;
    justify-content: center;
    text-decoration: none;
    background: linear-gradient(135deg, var(--accent-primary), #d91c45);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 99px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--accent-primary);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

/* Features */
.features-section {
    width: 100%;
    padding: 3rem;
    margin-top: 2rem;
}

.features-section h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 1.5rem;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    .result-container {
        grid-template-columns: 1fr;
    }

    .result-cover {
        max-height: 300px;
        width: max-content;
        margin: 0 auto;
    }

    .search-container {
        padding: 0.5rem;
    }

    .input-group {
        flex-direction: column;
        border-radius: 24px;
        background: transparent;
        border: none;
    }

    .input-group input {
        width: 100%;
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 99px;
        padding: 1.2rem 1.5rem;
        margin-bottom: 1rem;
    }

    button {
        width: 100%;
        justify-content: center;
    }
}

/* Profile Card */
.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    width: 100%;
    grid-column: 1 / -1;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--accent-secondary);
    object-fit: cover;
    box-shadow: 0 10px 25px -5px rgba(37, 244, 238, 0.3);
}

.profile-info h2 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.profile-username {
    color: var(--accent-secondary);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.profile-bio {
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 500px;
    margin: 0 auto;
}

.profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    width: 100%;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}