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

body {
    background-color: #0a2f3a; /* كحلي داكن */
    color: #f0f8ff; /* أبيض ثلجي */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    padding: 1.5rem;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ========== القسم العلوي ========== */
.site-header {
    text-align: center;
    padding: 2rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 2rem;
}

.site-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.site-title .highlight {
    color: #7fc1c5;
}

.welcome-message {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.8;
}

/* ========== الأقسام العامة ========== */
h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1.5rem;
    color: #7fc1c5;
    border-left: 4px solid #7fc1c5;
    padding-left: 1rem;
}

/* ========== بطاقات الأدوات ========== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
    margin-bottom: 2rem;
}

.tool-card {
    background: rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 1.5rem;
    transition: transform 0.2s, background 0.2s;
    text-align: center;
    backdrop-filter: blur(2px);
}

.tool-card:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.12);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tool-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.tool-card p {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.tool-link {
    display: inline-block;
    background: #2c7a6e;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: bold;
    transition: 0.2s;
}

.tool-link:hover {
    background: #1e5a50;
    transform: scale(1.02);
}

/* ========== بطاقات الأساطير ========== */
.legends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.8rem;
    margin-bottom: 2rem;
}

.legend-card {
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.2s;
    cursor: pointer;
}

.legend-card:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.1);
}

.legend-card .card-content {
    padding: 1.2rem;
}

.legend-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #7fc1c5;
}

.legend-preview {
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.5;
}

/* المحتوى الموسع */
.expanded-legend {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.full-legend {
    background: rgba(0,0,0,0.3);
    padding: 1.2rem;
    border-radius: 16px;
    margin: 1rem 0;
    line-height: 1.7;
}

.full-legend img {
    max-width: 100%;
    border-radius: 12px;
    margin: 1rem 0;
}

/* ========== القسم السفلي ========== */
.site-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.8rem;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.datetime {
    font-family: monospace;
    font-size: 0.85rem;
}

.small-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: 0.2s;
}

.small-btn:hover {
    background: rgba(255,255,255,0.2);
}

.features {
    text-align: center;
    margin: 1rem 0;
    font-size: 0.7rem;
    opacity: 0.8;
}

.tiny {
    font-size: 0.65rem;
    margin-top: 0.3rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.footer-links a {
    color: #7fc1c5;
    text-decoration: none;
    font-size: 0.75rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* ========== تكبير الخط ========== */
body.zoom-level-1 { font-size: 110%; }
body.zoom-level-2 { font-size: 125%; }
body.zoom-level-3 { font-size: 140%; }

/* ========== استجابة للجوال ========== */
@media (max-width: 640px) {
    body { padding: 1rem; }
    .site-title { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }
    .tools-grid, .legends-grid { grid-template-columns: 1fr; }
    .footer-row { flex-direction: column; text-align: center; }
}
