/* ═══════════════════════════════════════════
   Magazine Caption Tool — Frontend Styles
═══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&display=swap');

.mct-wrap {
    font-family: 'Cairo', sans-serif;
    background: #0e0e1a;
    color: #fff;
    border-radius: 20px;
    padding: 28px 24px;
    margin: 20px 0;
    direction: rtl;
}

/* Header */
.mct-header { text-align: center; margin-bottom: 28px; }
.mct-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f5a623, #ff6b6b);
    color: #fff;
    border-radius: 30px;
    padding: 5px 18px;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 10px;
}
.mct-title { font-size: 26px; font-weight: 900; margin: 6px 0 4px; color: #fff; }
.mct-updated { color: #666; font-size: 13px; margin: 0; }

/* Grid */
.mct-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 700px) {
    .mct-grid { grid-template-columns: 1fr; }
}

/* Section title */
.mct-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 14px;
    color: #fff;
}
.mct-step {
    background: #f5a623;
    color: #000;
    border-radius: 50%;
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 900;
    flex-shrink: 0;
}

/* Filters */
.mct-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.mct-filter {
    background: rgba(255,255,255,.08);
    color: #ccc;
    border: none;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: all .2s;
}
.mct-filter.active {
    background: var(--cat-color, #f5a623);
    color: #fff;
}

/* News list */
.mct-news-list { display: flex; flex-direction: column; gap: 10px; max-height: 480px; overflow-y: auto; }
.mct-news-list::-webkit-scrollbar { width: 4px; }
.mct-news-list::-webkit-scrollbar-track { background: rgba(255,255,255,.05); }
.mct-news-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

.mct-news-item {
    background: rgba(255,255,255,.04);
    border: 2px solid rgba(255,255,255,.08);
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    transition: all .2s;
}
.mct-news-item:hover { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.07); }
.mct-news-item.active { border-color: #f5a623; background: rgba(245,166,35,.08); }
.mct-news-item.hidden { display: none; }

.mct-news-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mct-news-emoji { font-size: 20px; }
.mct-news-cat { font-size: 11px; font-weight: 800; padding: 2px 10px; border-radius: 10px; }
.mct-news-headline { margin: 0 0 5px; font-size: 13px; font-weight: 700; line-height: 1.6; color: #fff; }
.mct-news-summary { margin: 0; font-size: 12px; color: #888; line-height: 1.6; }
.mct-empty { color: #555; font-size: 13px; text-align: center; padding: 20px 0; }

/* Settings box */
.mct-settings-box, .mct-preview-box {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 16px;
}

.mct-field { margin-bottom: 16px; }
.mct-field label { display: block; color: #aaa; font-size: 12px; font-weight: 700; margin-bottom: 8px; }

/* Option buttons */
.mct-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.mct-opt {
    background: rgba(255,255,255,.08);
    color: #ccc;
    border: none;
    border-radius: 20px;
    padding: 6px 15px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: all .2s;
}
.mct-opt.active { background: linear-gradient(135deg,#f5a623,#ff6b6b); color: #fff; }

/* Inputs */
.mct-field input[type="text"],
.mct-field textarea {
    width: 100%;
    background: rgba(0,0,0,.3);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    color: #fff;
    padding: 10px 12px;
    font-size: 13px;
    font-family: 'Cairo', sans-serif;
    resize: none;
    outline: none;
    box-sizing: border-box;
}
.mct-field input::placeholder, .mct-field textarea::placeholder { color: #555; }

/* Generate button */
.mct-generate-btn {
    width: 100%;
    background: linear-gradient(135deg, #f5a623, #ff6b6b);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 13px 0;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: all .2s;
    margin-top: 4px;
}
.mct-generate-btn:disabled { opacity: .4; cursor: not-allowed; }
.mct-generate-btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(245,166,35,.3); }

/* Preview */
.mct-char-count { margin-right: auto; font-size: 12px; color: #666; font-weight: 400; }
.mct-loading { display: flex; align-items: center; gap: 10px; color: #aaa; font-size: 14px; padding: 20px 0; }
.mct-spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,.1);
    border-top-color: #f5a623;
    border-radius: 50%;
    animation: mct-spin .7s linear infinite;
}
@keyframes mct-spin { to { transform: rotate(360deg); } }

.mct-caption-text {
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.9;
    color: #e8e8e8;
    white-space: pre-line;
    min-height: 100px;
}

.mct-twitter-warn {
    color: #ff6b6b;
    font-size: 12px;
    margin-bottom: 10px;
    text-align: center;
}

.mct-copy-btn {
    width: 100%;
    background: linear-gradient(135deg, #f5a623, #ff6b6b);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 13px 0;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: all .2s;
}
.mct-copy-btn.copied { background: linear-gradient(135deg, #20c997, #12b886); }
.mct-copy-btn:hover { transform: translateY(-1px); }
