:root {
    --primary-red: #E60023;
    --primary-red-hover: #ad001a;
    --text-dark: #111111;
    --text-grey: #666666;
    --bg-light: #F9F9F9;
    --white: #FFFFFF;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: var(--text-dark);
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
}

.separator {
    margin: 0 10px;
    color: #ddd;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f9f9f9 100%);
}

.hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero p {
    color: var(--text-grey);
    margin-bottom: 40px;
}

.input-container {
    max-width: 600px;
    margin: 0 auto 20px;
    position: relative;
}

.input-container input {
    width: 100%;
    padding: 18px 50px 18px 25px;
    border-radius: 30px;
    border: 1px solid #ddd;
    font-size: 16px;
    outline: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.input-container input:focus {
    border-color: #bbb;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.input-icons {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-grey);
    cursor: pointer;
    font-size: 20px;
}

button#downloadBtn {
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 16px 60px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(230, 0, 35, 0.3);
    transition: background 0.3s, transform 0.2s;
}

button#downloadBtn:hover {
    background-color: var(--primary-red-hover);
    transform: translateY(-2px);
}

.subtext {
    font-size: 13px;
    margin-top: 15px;
    color: #888;
}

/* Loading & Result */
.hidden {
    display: none;
}

#loading {
    margin-top: 30px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-red);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

.result-card {
    background: white;
    max-width: 500px;
    margin: 40px auto 0;
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#videoThumb {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    max-height: 300px;
}

.download-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--text-dark);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.download-action-btn:hover {
    background-color: #333;
}

/* Sections */
h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    width: 100%;
}

h2:after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: #eee;
    margin-top: 20px;
}

h2 span {
    background: var(--bg-light);
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* How It Works */
.how-it-works, .features, .formats {
    padding: 40px 10%;
    text-align: center;
}

.steps-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.step-card {
    background: white;
    padding: 30px 20px;
    border-radius: 16px;
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    box-shadow: var(--shadow);
    position: relative;
}

.step-icon {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-red);
    color: white;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-main {
    font-size: 40px;
    color: var(--text-dark);
    margin-bottom: 20px;
    margin-top: 20px;
}

/* Features */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    font-weight: 600;
}

/* Formats */
.format-tags {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.tag {
    background: white;
    padding: 10px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-weight: 500;
    border: 1px solid #eee;
}

.tag.bold {
    font-weight: 800;
}
