:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.3);
    --secondary: #818cf8;
    --accent: #f472b6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --error: #fb7185;
    --glass-border: rgba(255, 255, 255, 0.1);
    --premium-gradient: linear-gradient(135deg, #f472b6 0%, #818cf8 100%);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% -20%, #1e293b 0%, #0f172a 100%);
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--primary-glow) 0%, transparent 80%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: move 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    right: -10%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, transparent 70%);
}

.blob-2 {
    bottom: -10%;
    left: -10%;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.15) 0%, transparent 70%);
    animation-delay: -5s;
}

@keyframes move {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(100px, 50px) scale(1.1); }
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
}

.logo-text span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.brand-tag {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-premium {
    background: var(--premium-gradient);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(244, 114, 182, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 114, 182, 0.4);
}

/* Hero */
.hero {
    text-align: center;
    padding: 4rem 0 3rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

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

.hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Search Section */
.search-section {
    margin-bottom: 3rem;
}

.search-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.input-wrapper {
    display: flex;
    gap: 1rem;
}

input[type="text"] {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    padding: 1.2rem 1.5rem;
    border-radius: 14px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.btn-primary {
    background: var(--primary);
    color: #0f172a;
    border: none;
    padding: 0 2rem;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background: #7dd3fc;
    transform: scale(1.02);
}

.error-message {
    color: var(--error);
    margin-top: 1rem;
    font-size: 0.9rem;
    display: none;
}

/* Ad Placeholder */
.ad-placeholder {
    background: rgba(30, 41, 59, 0.4);
    border: 1px dashed var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.ad-label {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--glass-border);
    padding: 2px 8px;
    font-size: 0.7rem;
    color: var(--text-muted);
    border-bottom-right-radius: 8px;
}

.ad-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.ad-visual {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #334155, #475569);
    border-radius: 10px;
}

.ad-text {
    flex: 1;
}

.ad-text p {
    font-weight: 600;
    margin-bottom: 2px;
}

.ad-text span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.btn-outline-sm {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.btn-outline-sm:hover {
    background: var(--glass-border);
}

/* Results Section */
.results-section {
    animation: fadeIn 0.6s ease-out;
    margin-bottom: 4rem;
}

.result-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.preview-card {
    background: var(--card-bg);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge.hd {
    background: #10b981;
    color: white;
}

.img-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-download {
    width: 100%;
    background: var(--primary);
    color: #0f172a;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1.1rem;
}

.side-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-card {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s, border-color 0.3s;
}

.option-card:hover {
    transform: translateX(10px);
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.9);
}

.option-info h4 {
    font-size: 1rem;
}

.option-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-download-sm {
    background: var(--glass-border);
    color: var(--text-main);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

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

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-item h3 {
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: var(--text-muted);
}

/* Footer */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: #1e293b;
    margin: 10% auto;
    padding: 3rem;
    border: 1px solid var(--glass-border);
    width: 450px;
    border-radius: 32px;
    position: relative;
    text-align: center;
    animation: modalSlide 0.4s ease-out;
}

@keyframes modalSlide {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.premium-header {
    margin-bottom: 2rem;
}

.crown {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.premium-features {
    list-style: none;
    text-align: left;
    margin-bottom: 2.5rem;
}

.premium-features li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.btn-premium-large {
    width: 100%;
    background: var(--premium-gradient);
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 1rem;
}

.trial-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(15, 23, 42, 0.3);
    border-top-color: #0f172a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .result-grid {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
}
