:root {
    --primary-color: #0d9488; /* تركواز طبي مريح */
    --primary-hover: #0f766e;
    --bg-light: #f0fdfa;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: #f8fafc;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
}

/* الهيدر */
.main-header {
    background-color: #ffffff;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-icon {
    margin-left: 10px;
    font-size: 1.6rem;
}

/* محتوى الصفحة الرئيسي */
.main-content {
    flex: 1;
    padding: 40px 0;
}

.hero-section {
    text-align: center;
    margin-bottom: 30px;
}

.hero-section h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.hero-section p {
    color: var(--text-light);
    font-size: 1.05rem;
}

/* كارد الرفع والمسح */
.scanner-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    text-align: center;
}

.upload-area {
    border: 3px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px 20px;
    background-color: var(--bg-light);
    transition: border-color 0.3s;
}

.upload-area:hover {
    border-color: var(--primary-color);
}

.upload-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.upload-area h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.upload-area p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* الأزرار */
.btn-primary, .btn-success, .btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-success {
    background-color: #22c55e;
    color: white;
    width: 100%;
    margin-top: 15px;
}

.btn-success:hover {
    background-color: #16a34a;
}

.btn-secondary {
    background-color: #e2e8f0;
    color: var(--text-dark);
    margin-top: 20px;
}

.btn-secondary:hover {
    background-color: #cbd5e1;
}

/* المعاينة والنتائج */
.preview-container img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    margin: 15px 0;
    object-fit: cover;
}

/* لودينج بسيط وعصري */
.loading-container {
    padding: 30px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* تنسيق النتائج */
.result-container {
    text-align: right;
}

.result-header {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.result-header i {
    font-size: 1.8rem;
    margin-left: 10px;
}

.result-body h4 {
    color: var(--primary-color);
    margin-top: 15px;
    font-size: 1.15rem;
}

.result-body p {
    line-height: 1.7;
    margin-bottom: 15px;
    color: #4b5563;
}

.error-msg {
    color: #ef4444;
    background-color: #fef2f2;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #fee2e2;
}

/* الفوتر */
.main-footer {
    background-color: #1e293b;
    color: #94a3b8;
    text-align: center;
    padding: 15px 0;
    font-size: 0.9rem;
}