:root {
    --bg-dark: #0a0a0c;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --accent-1: #ff7e5f;
    --accent-2: #feb47b;
    --accent-3: #7b2cbf;
    --font-main: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Background Blobs for Premium Aesthetic */
.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
}

.blob {
    position: absolute;
    filter: blur(100px);
    border-radius: 50%;
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-3);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-1);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: var(--accent-2);
    bottom: 20%;
    left: 20%;
    opacity: 0.2;
    animation-delay: -10s;
}

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

/* Main Container */
.container {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    z-index: 1;
}

.hero {
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
}

/* Display Area (Cards, Loaders) */
.display-area {
    width: 100%;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    perspective: 1000px;
}

.hidden {
    display: none !important;
}

/* Glassmorphism Card */
.glass-card {
    width: 100%;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    animation: cardAppear 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes cardAppear {
    0% { transform: scale(0.8) translateY(20px) rotateX(10deg); opacity: 0; }
    100% { transform: scale(1) translateY(0) rotateX(0deg); opacity: 1; }
}

.image-wrapper {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.glass-card:hover .image-wrapper img {
    transform: scale(1.05);
}

.price-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 6px 14px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.info-wrapper h2 {
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.affiliate-btn {
    background: #fff;
    color: #000;
    text-decoration: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.affiliate-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255,255,255,0.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    color: var(--text-muted);
}
.mystery-box {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite ease-in-out;
}

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

/* Loading State */
#loading-state {
    text-align: center;
    color: var(--accent-1);
}

.loader {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 126, 95, 0.2);
    border-radius: 50%;
    border-top-color: var(--accent-1);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 1rem auto;
}

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

/* Generate Button */
.glow-btn {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    border: none;
    border-radius: 30px;
    padding: 16px 32px;
    color: white;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 126, 95, 0.4);
    z-index: 2;
}

.glow-btn::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
    z-index: -1;
    border-radius: 32px;
    filter: blur(12px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow-btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.glow-btn:hover::before {
    opacity: 1;
}

.glow-btn:active {
    transform: translateY(1px);
}

.sparkle-icon {
    width: 20px;
    height: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 480px) {
    .container { padding: 1.5rem; }
    .hero h1 { font-size: 2.5rem; }
    .glass-card { padding: 1rem; }
}
