/* تنظیمات پایه */
:root {
    --bg-color: #0f131a;
    --card-bg: #1c222b;
    --primary-orange: #f59e0b;
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --border-color: #2d3748;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Vazirmatn', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* پس زمینه طرح دار نقشه جهان */
.bg-world {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./assets/world.svg'); /* اگر این فایل را ندارید، تاثیری در خرابی ظاهر ندارد */
    background-repeat: no-repeat;
    background-position: center 20%;
    background-size: 150%;
    opacity: 0.03;
    z-index: -1;
    pointer-events: none;
}

.app-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* هدر */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.icon-btn {
    background: #252b36;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: #2d3542;
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.logo-icon {
    font-size: 28px;
    background: rgba(245, 158, 11, 0.1);
    padding: 10px;
    border-radius: 50%;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.logo-text {
    text-align: center;
}

.logo-text h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 2px;
}

.logo-text span {
    font-size: 12px;
    color: var(--primary-orange);
    font-weight: 500;
}

/* اطلاعات آپدیت */
.update-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 10px;
}

/* استایل کارت های خبر */
#news-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: #3f4a5e;
}

.card-image {
    width: 35%;
    min-width: 140px;
    background-size: cover;
    background-position: center;
}

.card-content {
    padding: 16px;
    width: 65%;
    display: flex;
    flex-direction: column;
}

.card-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.05);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    color: var(--text-muted);
    width: fit-content;
    margin-bottom: 12px;
}

.card-tag .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
    line-height: 1.5;
}

.card-summary {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.btn-read {
    background-color: var(--primary-orange);
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-read:hover {
    background-color: #d97706;
}

.time-ago {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
}

.loading, .error-msg {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px dashed var(--border-color);
}

.error-msg {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

/* فوتر */
.app-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* ریسپانسیو برای گوشی‌های خیلی کوچک */
@media screen and (max-width: 600px) {
    .news-card {
        flex-direction: column;
    }
    .card-image {
        width: 100%;
        height: 180px;
    }
    .card-content {
        width: 100%;
    }
    .app-footer {
        flex-direction: column;
        gap: 10px;
    }
}
