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

:root {
    --primary: #ff0000;
    --primary-glow: rgba(255, 0, 0, 0.5);
    --bg-dark: #0a0a0a;
    --card-bg: rgba(18, 18, 18, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--bg-dark);
    /* Grid Background Effect */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Navbar */
nav {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    color: white;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.logo i {
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.nav-icons {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 1.1rem;
}

.nav-icons i {
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
}

.nav-icons i:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

/* Main Wrapper */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* Main Card */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px 30px;
    width: 100%;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,0,0,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.icon-header i {
    font-size: 4.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px var(--primary-glow));
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 15px var(--primary-glow)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 25px var(--primary-glow)); }
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 12px;
    font-weight: 800;
    letter-spacing: -1px;
}

.highlight {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.subtitle {
    color: #999;
    font-size: 1rem;
    margin-bottom: 35px;
    font-weight: 400;
}

/* Input */
.input-group {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 18px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s, box-shadow 0.3s;
}

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

.input-group i {
    color: #666;
    margin-right: 15px;
    font-size: 1.1rem;
}

.input-group input {
    background: transparent;
    border: none;
    color: white;
    width: 100%;
    outline: none;
    font-size: 1rem;
    font-weight: 500;
}

.input-group input::placeholder {
    color: #555;
}

.options select {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 12px;
    width: 100%;
    margin-bottom: 25px;
    outline: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.options select:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Button */
button {
    background: var(--primary);
    color: white;
    border: none;
    width: 100%;
    padding: 18px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 10px 20px rgba(255, 0, 0, 0.2);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 0, 0, 0.4);
    background: #ff1a1a;
}

button:active {
    transform: translateY(-1px);
}

button:disabled {
    background: #444;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    width: 100%;
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.f-icon {
    background: rgba(255, 255, 255, 0.05);
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    color: var(--primary);
    font-size: 1.2rem;
    transition: transform 0.3s, background 0.3s;
}

.feature-item:hover .f-icon {
    transform: rotate(10deg);
    background: rgba(255, 255, 255, 0.08);
}

.feature-item span {
    font-size: 0.65rem;
    font-weight: 800;
    color: #777;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* How to Use */
.how-to-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 25px;
    width: 100%;
    text-align: left;
}

.how-to-card h2 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.step {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #ccc;
    font-weight: 500;
}

.step:last-child {
    margin-bottom: 0;
}

.step-num {
    background: var(--primary);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.footer-text {
    margin-top: 50px;
    color: #333;
    font-size: 0.75rem;
    letter-spacing: 4px;
    font-weight: 800;
    text-transform: uppercase;
}

/* Loading & Result Styles */
.result-area {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
}

#videoTitle {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #eee;
    font-weight: 600;
}

.download-final {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    padding: 15px 25px;
    background: white;
    color: black;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s;
}

.download-final:hover {
    transform: translateY(-2px);
    background: #f0f0f0;
}

.loader {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
    margin: 0 auto;
}

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

/* Responsive */
@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    h1 {
        font-size: 1.8rem;
    }
}
