@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&display=swap');

/* ══════════════════════════════════
   Aura News Dashboard — Styles
══════════════════════════════════ */

#and-wrap {
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    background: #07070f;
    color: #fff;
    border-radius: 24px;
    padding: 28px 24px;
    margin: 16px 0;
    min-height: 600px;
    direction: rtl;
}

/* ── Header ─────────────────────── */
.and-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}
.and-header-right { display: flex; align-items: center; gap: 14px; }
.and-header-left  { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.and-logo { font-size: 36px; line-height: 1; }
.and-title {
    margin: 0;
    font-size: clamp(18px, 3vw, 28px);
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.and-subtitle { margin: 2px 0 0; color: #555; font-size: 12px; }

/* Search */
.and-search-wrap {
    position: relative;
}
.and-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    pointer-events: none;
}
#and-search {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 24px;
    padding: 9px 36px 9px 16px;
    color: #fff;
    font-size: 13px;
    width: 200px;
    font-family: 'Cairo', sans-serif;
    outline: none;
    transition: border-color .2s;
}
#and-search:focus { border-color: rgba(255,255,255,.3); }
#and-search::placeholder { color: #444; }

/* Refresh btn */
.and-btn-refresh {
    background: linear-gradient(135deg, #f5a623, #ff6b6b);
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity .2s;
    white-space: nowrap;
}
.and-btn-refresh:disabled { opacity: .5; cursor: wait; }
.and-spin-icon.spinning { display: inline-block; animation: and-spin .8s linear infinite; }

/* ── Ticker ──────────────────────── */
.and-ticker {
    background: rgba(255, 212, 59, .08);
    border: 1px solid rgba(255, 212, 59, .2);
    border-radius: 12px;
    padding: 10px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    min-height: 42px;
}
.and-ticker-badge {
    background: #FFD43B;
    color: #000;
    font-size: 11px;
    font-weight: 900;
    padding: 3px 12px;
    border-radius: 20px;
    flex-shrink: 0;
}
.and-ticker-text {
    color: #e0e0e0;
    font-size: 13px;
    font-weight: 600;
    transition: opacity .4s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Progress ──────────────────── */
.and-progress-wrap {
    background: rgba(255,255,255,.05);
    border-radius: 4px;
    height: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}
.and-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f5a623, #ff6b6b);
    border-radius: 4px;
    transition: width .4s ease;
}

/* ── Tabs ──────────────────────── */
.and-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.and-tab {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    color: #888;
    border-radius: 24px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.and-tab:hover { border-color: rgba(255,255,255,.2); color: #ccc; }
.and-tab.active {
    border-color: currentColor;
    background: rgba(255,255,255,.06);
    color: #fff;
}
.and-count {
    background: rgba(255,255,255,.1);
    border-radius: 20px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 700;
}

/* ── Grid ──────────────────────── */
.and-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
    min-height: 200px;
}
@media (max-width: 640px) {
    .and-grid { grid-template-columns: 1fr; }
    #and-search { width: 150px; }
}

/* Loading state */
.and-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    color: #444;
    gap: 16px;
}
.and-spinner {
    width: 36px; height: 36px;
    border: 3px solid rgba(255,255,255,.08);
    border-top-color: #f5a623;
    border-radius: 50%;
    animation: and-spin .7s linear infinite;
}

/* Empty state */
.and-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 0;
    color: #444;
}
.and-empty-icon { font-size: 48px; margin-bottom: 12px; }

/* ── Card ──────────────────────── */
.and-card {
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 18px;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    animation: and-fadeUp .35s ease both;
    display: flex;
    flex-direction: column;
}
.and-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0,0,0,.5);
    border-color: rgba(255,255,255,.15);
}
.and-card-bar { height: 3px; flex-shrink: 0; }

.and-card-img {
    height: 160px;
    overflow: hidden;
    background: #111;
    flex-shrink: 0;
}
.and-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: .85;
    transition: opacity .2s;
}
.and-card:hover .and-card-img img { opacity: 1; }

.and-card-body { padding: 14px 16px; display: flex; flex-direction: column; flex: 1; }

.and-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.and-card-cat {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
}
.and-card-source { color: #555; font-size: 11px; }

.and-card-title {
    color: #f0f0f0;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.6;
    cursor: pointer;
    transition: color .2s;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.and-card-title:hover { color: #f5a623; }

.and-card-desc {
    color: #777;
    font-size: 12px;
    line-height: 1.7;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.and-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}
.and-card-time { color: #444; font-size: 11px; }
.and-card-actions { display: flex; gap: 6px; }

.and-btn-open,
.and-btn-copy {
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.06);
    color: #bbb;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.and-btn-open:hover  { background: rgba(255,255,255,.12); color: #fff; }
.and-btn-copy:hover  { background: rgba(245,166,35,.2); color: #f5a623; border-color: #f5a623; }
.and-btn-copy.copied { background: rgba(32,201,151,.2); color: #20c997; border-color: #20c997; }

/* ── Pagination ────────────────── */
.and-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.and-page-btn {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    color: #aaa;
    border-radius: 10px;
    padding: 8px 16px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 13px;
    transition: all .2s;
}
.and-page-btn:hover  { border-color: rgba(255,255,255,.3); color: #fff; }
.and-page-btn.active { background: linear-gradient(135deg,#f5a623,#ff6b6b); border-color: transparent; color: #fff; }
.and-page-btn:disabled { opacity: .3; cursor: default; }

/* ── Footer ────────────────────── */
.and-footer {
    text-align: center;
    margin-top: 36px;
    color: #2a2a3a;
    font-size: 11px;
    line-height: 1.8;
}

/* ── Animations ─────────────────── */
@keyframes and-spin    { to { transform: rotate(360deg); } }
@keyframes and-fadeUp  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
