:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --bg: #f3f4f6;
    --card: #ffffff;
    --text: #1f2937;
}

body { font-family: 'Tajawal', sans-serif; background: var(--bg); color: var(--text); margin: 0; padding: 0; direction: rtl; }
a { text-decoration: none; color: inherit; }

.navbar { background: var(--card); padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.logo { font-weight: 900; font-size: 1.5rem; color: var(--primary); }
.nav-links a { margin-right: 15px; font-weight: bold; color: #555; }
.nav-links a.active { color: var(--primary); }

.hero { text-align: center; padding: 50px 20px; background: linear-gradient(135deg, #4f46e5 0%, #818cf8 100%); color: white; border-radius: 0 0 30px 30px; }
.hero h1 { margin: 0 0 10px; font-size: 2.5rem; }

.container { max-width: 800px; margin: -40px auto 40px; padding: 0 20px; position: relative; z-index: 10; }

.upload-area { background: var(--card); padding: 40px; border-radius: 20px; text-align: center; border: 2px dashed #ccc; cursor: pointer; transition: 0.3s; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.upload-area:hover { border-color: var(--primary); background: #fdfdff; }
.upload-icon { font-size: 3rem; color: var(--primary); margin-bottom: 15px; }

#previewSection { text-align: center; margin-top: 20px; background: var(--card); padding: 20px; border-radius: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
#imagePreview { max-width: 100%; max-height: 300px; border-radius: 10px; margin-bottom: 20px; }

.btn-primary { background: var(--primary); color: white; border: none; padding: 12px 30px; font-size: 1.1rem; border-radius: 50px; cursor: pointer; width: 100%; font-family: inherit; font-weight: bold; transition: 0.3s; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }

.hidden { display: none; }

.spinner { border: 4px solid rgba(0,0,0,0.1); border-left-color: var(--primary); border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 20px auto; }
@keyframes spin { 100% { transform: rotate(360deg); } }
#loading { text-align: center; margin-top: 30px; }

.result-card { background: var(--card); padding: 30px; border-radius: 20px; margin-top: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); animation: slideUp 0.5s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.result-item { display: flex; justify-content: space-between; border-bottom: 1px solid #eee; padding: 10px 0; }
.label { font-weight: bold; color: #666; }
.value { font-weight: bold; color: #000; }

.price-box { background: #eff6ff; padding: 15px; border-radius: 15px; text-align: center; margin: 20px 0; border: 1px solid #dbeafe; }
.price-box h1 { margin: 10px 0 0; color: var(--primary); font-size: 2rem; }

.description-box, .tips-box { background: #f9fafb; padding: 15px; border-radius: 15px; margin-bottom: 15px; }
.copy-btn { background: #333; color: white; border: none; padding: 5px 15px; border-radius: 5px; cursor: pointer; font-size: 0.8rem; float: left; }

.btn-secondary { display: block; text-align: center; background: white; border: 2px solid var(--primary); color: var(--primary); padding: 12px; border-radius: 50px; font-weight: bold; margin-top: 20px; }
.btn-secondary:hover { background: var(--primary); color: white; }

/* Blog Section */
.blog-preview { margin-top: 50px; }
.section-title { text-align: center; margin-bottom: 30px; color: #333; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.blog-card { background: white; padding: 20px; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: 0.3s; }
.blog-card:hover { transform: translateY(-5px); }
.blog-card h3 { margin-top: 0; font-size: 1.1rem; }
.blog-card a { color: var(--primary); font-weight: bold; font-size: 0.9rem; }

footer { text-align: center; padding: 20px; color: #888; font-size: 0.9rem; margin-top: 40px; }
