/* =========================================================
   Past Paper Finder — standalone stylesheet
   ========================================================= */

:root {
    --primary-color: #ff758c;
    --text-color: #2d2a45;
    --text-muted: #6f6a85;
    --bg-grad-1: #fff5f8;
    --bg-grad-2: #f3f0ff;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--bg-grad-1), var(--bg-grad-2));
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.6;
}

/* ===== Header / Footer ===== */
.site-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 2rem;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    position: sticky; top: 0; z-index: 50;
}
.brand { font-weight: 800; font-size: 1.15rem; color: var(--primary-color); display: flex; align-items: center; gap: 0.5rem; }
.header-btn {
    background: var(--primary-color); color: #fff; border: none;
    padding: 0.55rem 1.1rem; border-radius: 50px; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 0.4rem; transition: transform 0.15s, box-shadow 0.15s;
}
.header-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255, 117, 140, 0.35); }
.site-footer { text-align: center; padding: 2rem 1rem 3rem; color: var(--text-muted); font-size: 0.85rem; }

/* ===== Page / Hero ===== */
.page { max-width: 1000px; margin: 0 auto; padding: 2rem 1rem; }
.blog-hero { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2rem; padding: 2.5rem 2rem 3.5rem; }
.hero-copy .eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem; color: var(--primary-color); font-weight: 700; margin: 0 0 0.5rem; }
.hero-copy h1 { font-size: 2.4rem; margin: 0 0 0.8rem; }
.hero-copy p { color: var(--text-muted); max-width: 560px; margin: 0; }
.hero-badge { display: inline-block; background: linear-gradient(135deg, #ff7eb3, #ff758c); color: #fff; padding: 0.5rem 1.1rem; border-radius: 50px; font-weight: 700; font-size: 0.85rem; }

/* ===== Selector Panel ===== */
.paper-selector-glass {
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-top: -1rem;
    position: relative; z-index: 10;
}
.selector-header { text-align: center; margin-bottom: 2rem; }
.selector-header h2 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.selector-header p { color: var(--text-muted); font-size: 0.95rem; }

.paper-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: var(--text-color); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.5px; }
.form-group select, .form-group input {
    width: 100%; box-sizing: border-box; padding: 0.8rem 1rem;
    border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.8); font-size: 0.95rem; color: #333;
    outline: none; transition: all 0.3s ease;
}
.form-group select { cursor: pointer; appearance: none; }
.form-group select:focus, .form-group input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(255, 117, 140, 0.2); }

.form-submit { grid-column: 1 / -1; display: flex; justify-content: center; margin-top: 1rem; }
.btn-generate {
    background: linear-gradient(135deg, #ff7eb3, #ff758c);
    color: #fff; border: none; padding: 1rem 2.5rem; font-size: 1.1rem; font-weight: 600;
    border-radius: 50px; cursor: pointer; box-shadow: 0 4px 15px rgba(255, 117, 140, 0.4);
    transition: all 0.3s ease; display: flex; align-items: center; gap: 0.5rem;
}
.btn-generate:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 117, 140, 0.6); }

/* ===== Results ===== */
.results-section {
    margin-top: 3rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 15px; padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.results-header { text-align: center; margin-bottom: 2rem; }
.results-header h3 { font-size: 1.4rem; }
.results-file-name {
    display: inline-block; background: rgba(0, 0, 0, 0.05);
    padding: 0.5rem 1rem; border-radius: 8px; font-family: monospace; font-size: 1.05rem;
    color: var(--primary-color); margin-top: 0.5rem; border: 1px dashed rgba(0, 0, 0, 0.1);
}
.mirrors-grid { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-bottom: 1.5rem; }
.mirror-btn {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.8rem 1.5rem; border-radius: 10px; color: #fff; font-weight: 500;
    text-decoration: none; transition: all 0.3s ease;
}
.mirror-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.mirror-btn.beh { background: linear-gradient(135deg, #00b894, #00cec9); }
.mirror-btn.ppc { background: linear-gradient(135deg, #0984e3, #74b9ff); }
.mirror-btn.ggl { background: linear-gradient(135deg, #6c5ce7, #a29bfe); }
.mirror-btn.official, .mirror-btn.oxford { background: linear-gradient(135deg, #2d3436, #636e72); }
.mirror-btn.mme { background: linear-gradient(135deg, #e17055, #fab1a0); }
.mirror-btn.source { background: linear-gradient(135deg, #6b7c93, #95a5a6); }

.notice-alert {
    background: rgba(255, 126, 179, 0.1); color: #d63031;
    padding: 1rem; border-radius: 10px; font-size: 0.9rem; text-align: center;
    border: 1px solid rgba(255, 126, 179, 0.2); margin-top: 1.5rem;
}

/* ===== Threshold card ===== */
.threshold-card {
    background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 128, 174, 0.3); border-radius: 16px;
    padding: 1.5rem; margin-top: 2rem; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    display: none; animation: fadeIn 0.4s ease-out;
}
.threshold-header { display: flex; align-items: center; gap: 10px; margin-bottom: 1rem; color: #221b3f; font-size: 1.1rem; font-weight: 700; }
.threshold-header i { color: #ff4f91; }
.threshold-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 1rem; }
.t-box { background: #fff; border-radius: 12px; padding: 1rem; text-align: center; border: 1px solid rgba(0,0,0,0.05); }
.t-box.t-astar { background: linear-gradient(135deg, #fff0f6, #f3e8f0); border: 2px solid #ff4f91; transform: scale(1.02); }
.t-label { font-size: 0.85rem; color: #6f6484; margin-bottom: 0.5rem; font-weight: 600; }
.t-astar .t-label { color: #ff4f91; }
.t-value { font-size: 1.7rem; font-weight: 800; color: #24213a; }
.t-astar .t-value { color: #d93f7b; }
.t-disclaimer { margin-top: 1rem; font-size: 0.8rem; color: #888; text-align: center; font-style: italic; }
.t-disclaimer code { background: rgba(0,0,0,0.05); padding: 1px 5px; border-radius: 4px; }

/* ===== Settings Modal ===== */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px); z-index: 999;
    display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal-content { width: 100%; max-width: 520px; margin-top: 0; }
.modal-content h3 { margin: 0 0 0.6rem; display: flex; align-items: center; gap: 0.5rem; }
.modal-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.field-hint { display: block; margin-top: 0.4rem; color: #888; font-size: 0.78rem; line-height: 1.4; }
.field-hint code { background: rgba(0,0,0,0.05); padding: 1px 5px; border-radius: 4px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 1.5rem; }
.btn-primary { background: var(--primary-color); color: #fff; border: none; padding: 0.7rem 1.5rem; border-radius: 10px; font-weight: 600; cursor: pointer; }
.btn-secondary { background: transparent; color: #666; border: 1px solid rgba(0,0,0,0.12); padding: 0.7rem 1.5rem; border-radius: 10px; font-weight: 600; cursor: pointer; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
    .paper-form { grid-template-columns: 1fr; }
    .paper-selector-glass { padding: 1.5rem; }
    .blog-hero { grid-template-columns: 1fr; text-align: center; }
    .hero-copy h1 { font-size: 1.8rem; }
    .site-header { padding: 1rem; }
}
