:root {
    --primary: #FF0000;
    --primary-glow: rgba(255, 0, 0, 0.4);
    --bg-dark: #0F0F0F;
    --bg-card: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --text-main: #FFFFFF;
    --text-muted: #AAAAAA;
    --accent-gradient: linear-gradient(135deg, #FF0000 0%, #FF4D4D 100%);
    --glass-blur: blur(20px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Background Animated Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.6;
}

.blob-1 { top: -10%; right: -10%; animation: float 15s infinite alternate; }
.blob-2 { bottom: -10%; left: -5%; animation: float 20s infinite alternate-reverse; }
.blob-3 { top: 40%; left: 30%; width: 20vw; height: 20vw; background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%); }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-50px, 100px) scale(1.1); }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
    width: 100%;
    flex: 1;
}

header {
    text-align: center;
    margin-bottom: 60px;
}

.title {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

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

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Glass UI Elements */
.glass {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.search-box {
    padding: 40px;
    margin-bottom: 40px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-box:focus-within {
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-2px);
}

.input-wrapper {
    display: flex;
    gap: 12px;
}

input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 20px;
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.2s;
    outline: none;
}

input:focus {
    border-color: var(--primary);
}

.btn-primary {
    background: var(--accent-gradient);
    border: none;
    border-radius: 14px;
    padding: 0 32px;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.5s;
}

.btn-primary:hover .btn-shine {
    left: 100%;
}

.error-text {
    color: #ff4d4d;
    font-size: 0.9rem;
    margin-top: 12px;
    margin-left: 4px;
}

.hidden {
    display: none !important;
}

/* Preview Area */
.preview-area {
    margin-top: 20px;
    animation: fadeIn 0.5s ease-out;
}

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

.preview-card {
    padding: 24px;
    text-align: center;
}

.image-container {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.image-container img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.image-container:hover img {
    transform: scale(1.02);
}

.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #000;
    border: none;
    padding: 14px 40px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-download:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,255,255,0.2);
}

.icon {
    width: 20px;
    height: 20px;
}

.how-to {
    text-align: center;
    margin-top: 40px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 600px) {
    .title { font-size: 2.2rem; }
    .search-box { padding: 24px; }
    .input-wrapper { flex-direction: column; }
    .btn-primary { padding: 16px; }
}
