@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #FE2C55; /* TikTok Red/Pink */
    --secondary: #25F4EE; /* TikTok Cyan */
    --dark: #121212;
    --dark-card: #1E1E1E;
    --light: #FFFFFF;
    --gray: #8A8B91;
    --gradient: linear-gradient(135deg, #FE2C55 0%, #25F4EE 100%);
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
    --radius: 16px;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Utilities */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center { text-align: center; }
.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient);
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(254, 44, 85, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 244, 238, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.2);
    color: var(--light);
}

.btn-outline:hover {
    border-color: var(--light);
    background: rgba(255,255,255,0.05);
}

/* Header */
header {
    padding: 1.5rem 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 10;
}

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

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(254, 44, 85, 0.15) 0%, rgba(18, 18, 18, 0) 70%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    width: 100%;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 3rem;
}

/* Search Box - UPDATED */
.search-container {
    background: var(--dark-card);
    padding: 0.8rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 1.5rem; /* Increased gap significantly */
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    transition: all 0.3s ease;
}

.search-container:focus-within {
    border-color: var(--secondary);
    box-shadow: 0 0 20px rgba(37, 244, 238, 0.2);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    color: var(--light);
    font-size: 1.1rem;
    font-family: inherit;
    outline: none;
    min-width: 0;
}

.paste-btn {
    /* Removed absolute positioning */
    background: rgba(255,255,255,0.1);
    color: var(--light);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 40px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.paste-btn:hover {
    background: rgba(255,255,255,0.2);
}

.download-btn {
    border-radius: 40px;
    padding: 0.8rem 2.5rem;
    white-space: nowrap;
}

/* Result Area */
.result-area {
    margin-top: 3rem;
    display: none; /* Hidden by default */
}

.result-card {
    background: var(--dark-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    gap: 2rem;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.1);
    animation: slideUp 0.5s ease-out;
}

.video-thumb {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    background: #333;
}

.video-info {
    flex: 1;
    text-align: left;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-author {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
}

/* Features */
.features {
    padding: 5rem 0;
    background: var(--dark-card);
}

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

.feature-card {
    padding: 2rem;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-15px) scale(1.02);
    background: rgba(255,255,255,0.06);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.feature-card:nth-child(1) .feature-icon { animation: float 3s ease-in-out infinite; }
.feature-card:nth-child(2) .feature-icon { animation: float 3.5s ease-in-out infinite 0.5s; }
.feature-card:nth-child(3) .feature-icon { animation: float 4s ease-in-out infinite 1s; }

/* Footer */
footer {
    margin-top: auto;
    padding: 2rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
}

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

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

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(254, 44, 85, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(254, 44, 85, 0); }
    100% { box-shadow: 0 0 0 0 rgba(254, 44, 85, 0); }
}

.animate-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.animate-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-fade {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.animate-fade.visible {
    opacity: 1;
}

.floating {
    animation: float 3s ease-in-out infinite;
}

.pulse-effect {
    animation: pulse 2s infinite;
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* Responsive - UPDATED */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    
    .search-container {
        flex-direction: column;
        border-radius: 24px;
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .search-input {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 1rem;
    }
    
    .paste-btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .download-btn {
        width: 100%;
    }

    .result-card { flex-direction: column; text-align: center; }
    .video-info { text-align: center; }
    .video-author { justify-content: center; }
    .action-buttons { justify-content: center; }
    .video-thumb { width: 100%; height: 200px; }
}
