/* Allrecipes-Inspired Magazine Template — White · Tomato Red · Navy Banner */

:root {
    /* Brand tomato-red */
    --red:            #e84a1c;
    --red-deep:       #c63a12;
    --red-mid:        #f06240;
    --red-light:      #fff1ec;
    --red-border:     rgba(232, 74, 28, 0.3);

    /* Navy accent (banner strip) */
    --navy:           #1a3a5c;
    --navy-deep:      #0f2540;
    --navy-light:     #e8edf3;

    /* Neutral text */
    --ink:            #1a1a1a;
    --ink-mid:        #333333;
    --ink-soft:       #6b6b6b;
    --ink-faint:      #b0b0b0;

    /* Surfaces */
    --bg:             #f5f5f5;
    --surface:        #ffffff;
    --rule:           #e4e4e4;
    --rule-dark:      #cccccc;

    /* Radii — Allrecipes is mostly square/very slight */
    --r-xs:           2px;
    --r-sm:           4px;
    --r-md:           6px;
    --r-lg:           8px;
    --r-pill:         999px;

    /* Motion */
    --ease:           cubic-bezier(0.22, 1, 0.36, 1);
    --trans:          all 0.18s var(--ease);

    /* Shadows */
    --sh-xs:          0 1px 4px rgba(0,0,0,0.06);
    --sh-sm:          0 2px 10px rgba(0,0,0,0.09);
    --sh-md:          0 5px 18px rgba(0,0,0,0.12);
    --sh-red:         0 3px 14px rgba(232,74,28,0.22);

    --maxw:           1080px;
    --gap:            7px;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                 'Microsoft YaHei', Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════
   TOPBAR  (Allrecipes 白色顶栏)
   ══════════════════════════════ */
.tophead {
    background: var(--surface);
    border-bottom: 1px solid var(--rule);
    padding: 10px 0;
    box-shadow: var(--sh-xs);
}

.tophead-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

.ar-brand-lnk {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

/* Allrecipes 风格斜体橙红品牌名 */
.ar-brand-name {
    font-size: 26px;
    font-weight: 900;
    color: var(--red);
    letter-spacing: -0.8px;
    line-height: 1;
    font-style: italic;
    border-bottom: none;
}

/* 品牌名后跟一个小竖线隔开 */
.ar-sep {
    width: 1px;
    height: 24px;
    background: var(--rule-dark);
    flex-shrink: 0;
}

.ar-domain-cluster {
    display: flex;
    align-items: center;
    gap: 9px;
}

.ar-domain-pill {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: var(--surface);
    background: var(--red);
    padding: 2px 8px;
    border-radius: var(--r-pill);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

.ar-domain-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.05px;
    white-space: nowrap;
}

/* ══════════════════════════════
   NAV BAR  (Allrecipes 横向黑色导航)
   ══════════════════════════════ */
.ar-navbar {
    background: var(--navy);
    border-bottom: 2px solid var(--red);
    margin-bottom: var(--gap);
    box-shadow: var(--sh-xs);
}

.ar-navbar-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.ar-navbar-row:last-child { border-bottom: none; }

.ar-nav-label {
    background: var(--red);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    width: 10%;
    min-width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 5px;
    flex-shrink: 0;
    letter-spacing: 0.2px;
    line-height: 1.3;
}

.ar-nav-items {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 10px;
    align-items: center;
    background: var(--navy);
}

.ar-nav-items a {
    display: inline-block;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--r-xs);
    transition: var(--trans);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    white-space: nowrap;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    width: calc((100% - 35px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
    letter-spacing: 0.1px;
}

.ar-nav-items a:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
    box-shadow: var(--sh-xs);
}

.ar-nav-items a.active {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
    font-weight: 700;
}

/* ══════════════════════════════
   CONTAINER
   ══════════════════════════════ */
.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 16px;
}

.content { padding: 6px 0; }

/* ══════════════════════════════
   BANNER / AD SLOT
   ══════════════════════════════ */
.bnr-shelf {
    width: 100%;
    overflow: hidden;
    border-radius: var(--r-sm);
    margin: 4px 0;
    box-shadow: var(--sh-sm);
}
.bnr-shelf img { display:block; width:100%; }

/* ══════════════════════════════
   SEARCH BAR  (方形 Allrecipes 风)
   ══════════════════════════════ */
.sitesearch {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-top: 2px solid var(--red);
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    padding: 10px 14px;
    margin-bottom: var(--gap);
    box-shadow: var(--sh-xs);
}

.sitesearch form {
    display: flex;
    gap: 0;
    align-items: stretch;
    flex-wrap: nowrap;
    border: 1.5px solid var(--rule-dark);
    border-radius: var(--r-sm);
    overflow: hidden;
    transition: var(--trans);
}

.sitesearch form:focus-within {
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--red-light);
}

.sitesearch input[type="text"] {
    flex: 1;
    min-width: 150px;
    padding: 9px 14px;
    border: none;
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
    outline: none;
}

.sitesearch input[type="text"]::placeholder { color: var(--ink-faint); }

.sitesearch button {
    padding: 9px 16px;
    border: none;
    border-left: 1.5px solid var(--rule-dark);
    background: var(--red);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: var(--trans);
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.2px;
    border-radius: 0;
}

.sitesearch button:hover {
    background: var(--red-deep);
}

/* ══════════════════════════════
   HOT TAGS
   ══════════════════════════════ */
.hottags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 9px 12px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--red);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    margin-bottom: var(--gap);
    box-shadow: var(--sh-xs);
}

.hottag {
    padding: 4px 11px;
    background: var(--red-light);
    border-radius: var(--r-pill);
    color: var(--red-deep);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: var(--trans);
    border: 1px solid var(--red-border);
}

.hottag:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

/* ══════════════════════════════
   SECTION BLOCK
   ══════════════════════════════ */
.artblock { margin-bottom: var(--gap); }

.artblock-hd {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--ink);
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.artblock-hd::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 44px;
    height: 2px;
    background: var(--red);
}

.artblock-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
    margin: 0;
    letter-spacing: -0.3px;
    text-transform: uppercase;
    font-size: 15px;
}

.artblock-title a {
    color: var(--ink);
    text-decoration: none;
    transition: var(--trans);
}

.artblock-title a:hover { color: var(--red); }

/* ══════════════════════════════
   FILM GRID  (ratio 600:350)
   ══════════════════════════════ */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    list-style: none;
    padding: 0;
}

.recipe-grid li { animation: arrise 0.38s var(--ease) backwards; }
.recipe-grid li:nth-child(1){animation-delay:.04s}
.recipe-grid li:nth-child(2){animation-delay:.08s}
.recipe-grid li:nth-child(3){animation-delay:.12s}
.recipe-grid li:nth-child(4){animation-delay:.16s}
.recipe-grid li:nth-child(5){animation-delay:.20s}
.recipe-grid li:nth-child(6){animation-delay:.24s}
.recipe-grid li:nth-child(7){animation-delay:.28s}
.recipe-grid li:nth-child(8){animation-delay:.32s}

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

/* 封面宽高比 600:350 */
.recipe-img-lnk {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--r-sm);
    aspect-ratio: 600 / 350;
    background: var(--rule);
    border: 1px solid var(--rule);
    transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.recipe-img-lnk img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.38s var(--ease);
    display: block;
}

.recipe-img-lnk:hover {
    box-shadow: var(--sh-md);
    transform: translateY(-2px);
    border-color: var(--red-border);
}

.recipe-img-lnk:hover img { transform: scale(1.07); }

.recipe-img-lnk::after {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: rgba(255,255,255,0.96);
    background: rgba(232,74,28,0.32);
    opacity: 0;
    transition: opacity 0.18s;
}

.recipe-img-lnk:hover::after { opacity: 1; }

.recipe-caption { padding: 7px 2px 0; }

.recipe-caption h5 {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    letter-spacing: -0.1px;
}

.recipe-caption h5 a {
    color: inherit;
    text-decoration: none;
    transition: var(--trans);
}

.recipe-caption h5 a:hover { color: var(--red); }

/* ══════════════════════════════
   ENTRY TITLE
   ══════════════════════════════ */
.entry-hed {
    line-height: 1.7;
    text-align: left;
    padding: 13px 18px;
    font-size: 15px;
    margin: 6px 0;
    word-break: break-all;
    background: var(--surface);
    border-left: 4px solid var(--red);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    border-right: 1px solid var(--rule);
    box-shadow: var(--sh-xs);
}

.entry-hed a {
    color: var(--red);
    text-decoration: none;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-right: 10px;
    background: var(--red-light);
    padding: 2px 8px;
    border-radius: var(--r-pill);
}

/* ══════════════════════════════
   DETAIL SPEC
   ══════════════════════════════ */
.recipe-specs {
    font-size: 14px;
    line-height: 1.9;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-top: 2px solid var(--red);
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    margin: 6px 0;
    box-shadow: var(--sh-xs);
}

/* ══════════════════════════════
   CAPTURE PREVIEW
   ══════════════════════════════ */
.recipe-shots { margin-top: 10px; }

.recipe-shots picture,
.recipe-shots img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--r-xs);
}

/* ══════════════════════════════
   DOWNLOAD BUTTONS
   ══════════════════════════════ */
.dl-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 14px;
    margin: 6px 0;
    flex-wrap: wrap;
}

.dl-btn {
    display: inline-block;
    padding: 11px 24px;
    background: var(--red);
    color: #fff;
    text-decoration: none;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--trans);
    letter-spacing: 0.3px;
    box-shadow: var(--sh-red);
    text-transform: uppercase;
}

.dl-btn:hover {
    background: var(--red-deep);
    box-shadow: 0 5px 18px rgba(232,74,28,0.32);
    transform: translateY(-1px);
}

/* ══════════════════════════════
   SHARE STRIP
   ══════════════════════════════ */
.share-panel {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--r-sm);
    margin: 6px 0;
    box-shadow: var(--sh-xs);
    flex-wrap: nowrap;
}

.share-url-holder {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    min-width: 0;
    background: var(--bg);
    border: 1px solid var(--rule);
    border-radius: var(--r-sm);
    padding: 7px 12px;
    overflow: hidden;
}

.share-url-lbl {
    font-size: 10px;
    font-weight: 700;
    color: var(--red);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.share-url-text {
    font-size: 11px;
    color: var(--ink-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.share-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: var(--r-sm);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--trans);
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: var(--sh-red);
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.share-copy-btn:hover { background: var(--red-deep); }
.share-ico { font-size: 13px; line-height: 1; }

/* ══════════════════════════════
   BT CLIENT HINTS
   ══════════════════════════════ */
.btcl-d, .btcl-m {
    text-align: center;
    padding: 9px;
}

.btcl-d a, .btcl-m a {
    color: var(--red);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--trans);
}

.btcl-d a:hover, .btcl-m a:hover {
    color: var(--red-deep);
    text-decoration: underline;
}

/* ══════════════════════════════
   PAGINATION
   ══════════════════════════════ */
.pgr {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    padding: 15px 0;
    align-items: center;
}

.pgr-lnk, .pgr-cur {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 13px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 600;
    min-width: 36px;
    text-align: center;
    transition: var(--trans);
}

.pgr-lnk {
    background: var(--surface);
    color: var(--ink);
    border: 1.5px solid var(--rule-dark);
    text-decoration: none;
}

.pgr-lnk:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.pgr-cur {
    background: var(--red);
    color: #fff;
    border: 1.5px solid var(--red);
    cursor: default;
    box-shadow: var(--sh-red);
}

/* ══════════════════════════════
   FOOTER
   ══════════════════════════════ */
.site-footer {
    padding: 16px 0;
    text-align: center;
    border-top: 3px solid var(--navy);
    margin-top: 12px;
    background: var(--navy);
}

.site-footer p { margin: 4px 0; color: rgba(255,255,255,0.7); font-size: 12px; }
.site-footer a { color: rgba(255,255,255,0.7); text-decoration: none; transition: var(--trans); }
.site-footer a:hover { color: var(--red-mid); }

/* ══════════════════════════════
   FRIENDLY LINKS
   ══════════════════════════════ */
.flink-area {
    padding: 9px 12px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--r-sm);
}

.flink-area dl  { margin:0; }
.flink-area dd  { display:inline-block; margin:2px 4px; }

.flink-area a {
    color: var(--red-deep);
    text-decoration: none;
    font-size: 12px;
    transition: var(--trans);
}

.flink-area a:hover { color: var(--red); text-decoration: underline; }
.flink-area a.pd5  { padding: 2px 4px; }

/* ══════════════════════════════
   VISIBILITY
   ══════════════════════════════ */
.pc-only  { display:block; }
.mob-only { display:block; }

@media (max-width: 768px) { .pc-only  { display:none !important; } }
@media (min-width: 769px) { .mob-only { display:none !important; } }

/* clearfix / lazy */
.clearfix::after { content:""; display:table; clear:both; }
img[data-original] { background: var(--rule); }

/* ══════════════════════════════════
   TABLET  ≤768px
   ══════════════════════════════════ */
@media (max-width: 768px) {
    .container { padding: 0 10px; }
    .content   { padding: 4px 0; }

    .tophead-row  { gap: 10px; }
    .ar-brand-name { font-size: 21px; }
    .ar-sep       { height: 20px; }
    .ar-domain-val  { font-size: 15px; }
    .ar-domain-pill { font-size: 9px; }

    /* Nav: 15% label / 85% links, 4-per-row, 14px */
    .ar-nav-label {
        width: 15%;
        min-width: 0;
        font-size: 10px;
        padding: 8px 3px;
        letter-spacing: 0;
        word-break: break-all;
        line-height: 1.25;
    }

    .ar-nav-items {
        width: 85%;
        gap: 4px;
        padding: 7px 5px;
    }

    .ar-nav-items a {
        font-size: 14px;
        padding: 5px 2px;
        width: calc((100% - 12px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    .recipe-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .artblock-title { font-size: 14px; }

    .sitesearch { padding: 9px 10px; }
    .sitesearch input[type="text"] { font-size: 13px; padding: 7px 10px; }
    .sitesearch button { padding: 7px 11px; font-size: 11px; }

    .entry-hed   { font-size: 13px; padding: 10px 13px; }
    .recipe-specs{ padding: 12px 14px; font-size: 13px; }

    .dl-panel { gap: 8px; padding: 10px 6px; flex-wrap: nowrap; }
    .dl-btn   { padding: 9px 14px; font-size: 12px; }

    .share-panel    { padding: 8px 10px; gap: 6px; }
    .share-copy-btn { padding: 7px 10px; font-size: 11px; }

    .hottags { gap: 5px; padding: 8px 10px; }
    .hottag  { font-size: 11px; padding: 3px 9px; }

    .pgr { padding: 11px 0; gap: 4px; }
    .pgr-lnk, .pgr-cur { padding: 5px 9px; font-size: 12px; min-width: 30px; }

    .artblock { margin-bottom: 5px; }
}

/* ══════════════════════════════════
   PHONE  ≤480px
   ══════════════════════════════════ */
@media (max-width: 480px) {
    .ar-brand-name { font-size: 18px; }
    .ar-domain-val { font-size: 14px; }

    .ar-nav-label {
        width: 15%;
        font-size: 10px;
        padding: 6px 2px;
    }

    .ar-nav-items {
        width: 85%;
        gap: 3px;
        padding: 6px 3px;
    }

    .ar-nav-items a {
        font-size: 12px;
        padding: 4px 1px;
        width: calc((100% - 9px) / 4);
    }

    .recipe-grid { gap: 7px; }
    .recipe-caption h5 { font-size: 12px; }

    .dl-panel { gap: 5px; padding: 8px 3px; flex-wrap: nowrap; }
    .dl-btn   { padding: 8px 11px; font-size: 11px; }

    .share-panel     { padding: 6px 8px; gap: 5px; }
    .share-url-holder{ padding: 6px 9px; }
    .share-url-lbl   { font-size: 9px; }
    .share-url-text  { font-size: 10px; }
    .share-copy-btn  { padding: 6px 9px; font-size: 11px; }
    .share-ico       { font-size: 12px; }
}

/* ══════════════════════════════════
   PC  ≥769px
   ══════════════════════════════════ */
@media (min-width: 769px) {
    .ar-nav-label { width: 10%; font-size: 13px; }
    .ar-nav-items { width: 90%; }
    .ar-nav-items a { width: calc((100% - 35px) / 8); font-size: 13px; }
    .recipe-grid { grid-template-columns: repeat(4, 1fr); }
}
