* {
    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: 20px;
    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: 2px;
}

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

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

.story-card {
    background: rgba(255,255,255,0.08);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    backdrop-filter: blur(2px);
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: 1.2rem;
}

.card-filename {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.card-preview {
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.9;
}

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

.full-story-content {
    background: rgba(0,0,0,0.3);
    padding: 1.2rem;
    border-radius: 16px;
    margin: 1rem 0;
}

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

/* أزرار المشاركة الصغيرة */
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.share-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
    color: white;
    transition: 0.2s;
}

.share-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.02);
}

/* ========== القسم السفلي ========== */
.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.9rem;
}

.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: 1.5rem 0;
    font-size: 0.7rem;
    opacity: 0.8;
}

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

/* خدمة كتابة القصة */
.story-writer {
    background: rgba(255,255,255,0.05);
    border-radius: 24px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.story-writer h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.writer-input {
    width: 100%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.7rem;
    border-radius: 12px;
    margin-bottom: 0.8rem;
    font-family: inherit;
    resize: vertical;
}

.writer-input:focus {
    outline: none;
    border-color: white;
}

.primary-btn {
    background: #2c7a6e;
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 40px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
    width: 100%;
}

.primary-btn:hover {
    background: #1e5a50;
    transform: scale(1.01);
}

/* تكبير الخط */
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: 12px; }
    .site-title { font-size: 1.8rem; }
    .stories-grid { grid-template-columns: 1fr; }
    .footer-row { flex-direction: column; text-align: center; }
}
