:root {
    --primary: #007bff;
    --secondary: #6f42c1;
    --success: #28a745;
    --danger: #dc3545;
    --bg: #f0f2f5;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    padding: 20px;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Logo and Language Switcher */
.logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo img {
    max-height: 80px;
}

.language-switcher {
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.language-switcher a {
    margin: 0 8px;
    text-decoration: none;
    color: var(--primary);
    font-weight: bold;
    transition: 0.3s;
}

.language-switcher a:hover {
    color: var(--secondary);
}

.header-area {
    text-align: center;
    border-bottom: 2px solid #eee;
    margin-bottom: 25px;
    padding-bottom: 10px;
}

h1 {
    color: var(--primary);
    margin-bottom: 5px;
    font-size: 28px;
}

h2 {
    color: #666;
    font-size: 18px;
    font-weight: normal;
    margin-top: 0;
}

.section {
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    background: #fafafa;
    position: relative;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
    display: none;
}

.info-item {
    background: #fff;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
}

.info-item b {
    display: block;
    color: var(--primary);
    margin-bottom: 5px;
}

.preview-panel {
    background: #eef6ff;
    border: 1px dashed var(--primary);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.preview-panel h4 {
    margin: 0 0 10px 0;
    color: var(--primary);
    font-size: 14px;
}

.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    font-size: 12px;
    text-align: center;
}

.preview-grid span {
    font-weight: bold;
    color: var(--secondary);
}

input[type="text"],
input[type="file"],
input[type="number"] {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
}

.btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 14px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    transition: 0.3s;
    font-size: 16px;
    font-family: inherit;
}

.btn:hover {
    filter: brightness(1.1);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-check {
    background: var(--secondary);
    margin-top: 10px;
}

.options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin: 25px 0;
}

@media (max-width: 600px) {
    .options {
        grid-template-columns: 1fr;
    }
}

.option-box {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.status {
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    display: none;
    text-align: center;
    font-weight: bold;
}

.vector {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.raster {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.progress-wrapper {
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    margin: 15px 0;
    overflow: hidden;
    display: none;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s;
    text-align: center;
    color: white;
    font-size: 12px;
    line-height: 20px;
    font-weight: bold;
}

.result-panel {
    border-color: var(--success);
    background: #f8fff9;
    margin-top: 20px;
}

.error-text {
    color: var(--danger) !important;
    font-weight: bold;
}

label {
    font-weight: bold;
    font-size: 14px;
    color: #444;
}

.range-val {
    color: var(--secondary);
    font-weight: bold;
    font-size: 16px;
}

.footer-privacy {
    margin-top: 30px;
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: #666;
    border-top: 1px solid #ddd;
}

.footer-privacy i {
    color: var(--success);
    font-style: normal;
    font-weight: bold;
}

.success-msg {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* زر الرجوع للرئيسية */
.home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary);
    font-weight: bold;
    font-size: 14px;
    padding: 8px 15px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #eee;
    transition: 0.3s;
    margin-bottom: 10px;
}

.home-link:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transform: translateX(-3px); /* حركة بسيطة لليمين في العربي */
}

/* تنسيق شريط التنقل العلوي */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto 10px auto;
    width: 100%;
}