:root {
    --primary-color: #D4AF37; /* Royal Gold / Luxurious Elements */
    --primary-light: #FBE69B;
    --primary-dark: #b8860b;
    --bg-dark: #0F1A1C; /* Dark Teal Background */
    --surface-dark: rgba(47, 93, 98, 0.6); /* Teal #2F5D62 Glass */
    --text-main: #EDE6DD; /* Light Text */
    --text-muted: #BFA181; /* Details */
    --border-color: rgba(212, 175, 55, 0.22);
    --glow: rgba(212, 175, 55, 0.4);
}

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

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

/* Background Animated Shapes */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 20s infinite ease-in-out alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(212, 175, 55, 0.15);
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: rgba(47, 93, 98, 0.25);
    bottom: -50px;
    left: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: rgba(191, 161, 129, 0.15);
    top: 40%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(50px, 50px) rotate(10deg); }
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Screens */
.screen {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.screen.active {
    display: flex;
    justify-content: center;
    opacity: 1;
    transform: translateY(0);
}

/* Glassmorphism Card */
.glass-card {
    background: var(--surface-dark);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 48px;
    text-align: center;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-20deg);
    animation: shine 8s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

/* Typography */
.brand-name {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-light);
    letter-spacing: 1px;
    margin-bottom: 24px;
    text-shadow: 0 0 15px var(--glow);
    position: relative;
    display: inline-block;
}
.brand-name::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 10%;
    width: 80%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(to right, var(--text-main), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 24px;
}

p {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 32px;
}

.icon-sparkle {
    font-size: 3rem;
    margin-bottom: 16px;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #0F1A1C;
    box-shadow: 0 8px 20px var(--glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px var(--glow);
    filter: brightness(1.1);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    margin-top: 16px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

/* Quiz Styles */
.quiz-card {
    text-align: right;
    padding: 40px;
}

.progress-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 24px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 25%;
    transition: width 0.4s ease;
    border-radius: 10px;
}

.question-header {
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 700;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 24px;
}

.option-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 16px;
    color: var(--text-main);
    font-size: 1.1rem;
    text-align: right;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    transform: translateX(-5px);
}

/* Loader */
.loading-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
}

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

/* Result Styles */
.result-card {
    padding: 40px;
    text-align: right;
}

.result-title {
    text-align: center;
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 40px;
}

.product-showcase {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: center;
}

.image-container {
    flex: 1;
    position: relative;
    border-radius: 20px;
    padding: 10px;
}

.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    transform: translate(-50%, -50%);
    background: var(--primary-color);
    filter: blur(60px);
    opacity: 0.2;
    z-index: 0;
}

#result-image {
    width: 100%;
    border-radius: 16px;
    position: relative;
    z-index: 1;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s ease;
}

#result-image:hover {
    transform: scale(1.02);
}

.product-details {
    flex: 1;
}

#result-perfume-name {
    font-size: 2.2rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.badge {
    background: rgba(212, 175, 55, 0.2);
    color: var(--primary-light);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 20px;
    border: 1px solid var(--primary-dark);
}

.traits h4 {
    margin-bottom: 12px;
    color: var(--text-muted);
}

.traits ul {
    list-style: none;
    margin-bottom: 30px;
}

.traits li {
    margin-bottom: 8px;
    padding-right: 24px;
    position: relative;
}

.traits li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--primary-color);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.buy-btn {
    width: 100%;
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

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

/* Responsive */
@media (max-width: 768px) {
    .product-showcase {
        flex-direction: column;
    }
    
    .glass-card {
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
}
