:root{
    --main: #2aabee;
    --bg0: #05070f;
    --bg1: #070a14;

    --text: #ffffff;
    --muted: rgba(255,255,255,0.72);
    --muted2: rgba(255,255,255,0.55);

    --card: linear-gradient(180deg, rgba(255,255,255,0.085), rgba(255,255,255,0.04));
    --cardBorder: rgba(255,255,255,0.12);

    --panel: rgba(0,0,0,0.18);
    --panelBorder: rgba(255,255,255,0.10);

    --pillBg: rgba(255,255,255,0.06);
    --pillBorder: rgba(255,255,255,0.12);

    --link: rgba(255,255,255,0.92);
    --linkHover: rgba(255,255,255,0.98);

    --accentBorder: rgba(42,171,238,0.35);

    --shadow: 0 22px 70px rgba(0,0,0,0.60);
    --radius: 22px;
    --radiusSm: 16px;

    --barBg: rgba(255,255,255,0.12);
    --glow: 0 0 22px rgba(42,171,238,0.22);
}

[data-theme="light"]{
    --bg0: #f5f7fa;
    --bg1: #ffffff;

    --text: #1a1a1a;
    --muted: rgba(0,0,0,0.68);
    --muted2: rgba(0,0,0,0.50);

    --card: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.90));
    --cardBorder: rgba(0,0,0,0.10);

    --panel: rgba(0,0,0,0.03);
    --panelBorder: rgba(0,0,0,0.08);

    --pillBg: rgba(0,0,0,0.03);
    --pillBorder: rgba(0,0,0,0.10);

    --link: rgba(0,0,0,0.82);
    --linkHover: rgba(0,0,0,0.92);

    --accentBorder: rgba(42,171,238,0.30);

    --shadow: 0 22px 70px rgba(0,0,0,0.12);
    --barBg: rgba(0,0,0,0.10);
    --glow: 0 0 22px rgba(42,171,238,0.12);
}

*{ box-sizing: border-box; }
html{
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}
html, body { height: 100%; }
body{
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    line-height: 1.45;
    color: var(--text);
    background:
            radial-gradient(900px 520px at 20% 0%, rgba(42,171,238,0.22), transparent 60%),
            radial-gradient(900px 520px at 85% 10%, rgba(42,171,238,0.12), transparent 60%),
            linear-gradient(180deg, var(--bg0), var(--bg1));
    overflow-x: hidden;
}

/* subtle grain */
body:before{
    content:"";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
    background-size: 180px 180px;
    mix-blend-mode: overlay;
}

.container{
    width: min(1120px, 100% - 36px);
    margin: 0 auto;
    padding: 28px 0 84px;
    position: relative;
}

/* PREMIUM HEADER */
.header{
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.15));
    border-bottom: 1px solid rgba(255,255,255,0.10);
}

.headerInner{
    width: min(1120px, 100% - 36px);
    margin: 0 auto;
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.brand{
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
    cursor: pointer;
    transition: opacity 120ms ease;
}

.brand:hover{
    opacity: 0.85;
}

.brandMark{
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 900;
    letter-spacing: 0.4px;
    background:
            radial-gradient(18px 18px at 30% 25%, rgba(255,255,255,0.35), transparent 55%),
            linear-gradient(135deg, rgba(42,171,238,1), rgba(42,171,238,0.55));
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 18px 42px rgba(42,171,238,0.14), var(--glow);
}

.brandText{
    display: grid;
    gap: 2px;
    line-height: 1.1;
}

.brandTitle{
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.25px;
    margin: 0;
}

.brandSub{
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}

.nav{
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav a{
    text-decoration: none;
    color: rgba(255,255,255,0.86);
    font-weight: 700;
    font-size: 12px;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.nav a:hover{
    transform: translateY(-1px);
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.18);
}

.cta{
    border: 0;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
    letter-spacing: 0.2px;
    color: rgba(0,0,0,0.92);
    background:
            radial-gradient(18px 18px at 30% 25%, rgba(255,255,255,0.35), transparent 60%),
            linear-gradient(90deg, rgba(42,171,238,1), rgba(42,171,238,0.78));
    box-shadow: 0 18px 44px rgba(42,171,238,0.16), var(--glow);
    transition: transform 120ms ease, opacity 120ms ease;
    white-space: nowrap;
}
.cta:hover{ transform: translateY(-1px); opacity: 0.98; }
.cta:active{ transform: translateY(0px) scale(0.99); }

.themeToggle{
    border: 0;
    cursor: pointer;
    padding: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 16px;
    transition: transform 120ms ease, background 120ms ease;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
}
.themeToggle:hover{ transform: translateY(-1px); background: rgba(255,255,255,0.12); }
.themeToggle:active{ transform: translateY(0px) scale(0.96); }

@media (max-width: 920px){
    .headerInner{ flex-direction: column; align-items: flex-start; }
    .brand{ min-width: unset; }
    .nav{ justify-content: flex-start; }
}

/* HERO */
.hero{
    margin-top: 18px;
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--cardBorder);
    background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.04));
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero:before{
    content:"";
    position:absolute;
    inset: 0;
    border-radius: inherit;
    background:
            radial-gradient(680px 240px at 10% 0%, rgba(42,171,238,0.18), transparent 55%),
            radial-gradient(680px 240px at 90% 20%, rgba(42,171,238,0.12), transparent 55%);
    pointer-events: none;
    filter: blur(1px);
    z-index: 0;
}

.heroInner{
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 16px;
    align-items: center;
}
@media (max-width: 920px){ .heroInner{ grid-template-columns: 1fr; } }

.hero h2{
    margin: 0 0 8px;
    font-size: 22px;
    letter-spacing: 0.2px;
}

.hero p{
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 520px){
    .hero h2{ font-size: 20px; }
}

.heroRight{
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
@media (max-width: 920px){ .heroRight{ justify-content: flex-start; } }

.btnGhost{
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.14);
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
    color: rgba(255,255,255,0.92);
    background: rgba(255,255,255,0.06);
    transition: transform 120ms ease, background 120ms ease;
    white-space: nowrap;
}
.btnGhost:hover{ transform: translateY(-1px); background: rgba(255,255,255,0.08); }

/* SECTION HEADER */
.sectionHeader{
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.3px;
    margin: 0 0 12px;
    padding-left: 4px;
    color: var(--text);
}

/* FEATURED ANIMAL */
.featured{
    margin-top: 16px;
    padding: 16px;
    overflow: visible;
}

.featured h3{
    margin: 0 0 10px;
    padding: 0;
}

.featuredGrid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: stretch;
}
@media (max-width: 920px){ .featuredGrid{ grid-template-columns: 1fr; } }

.featuredArt{
    position: relative;
    min-height: 420px;
    border-radius: var(--radiusSm);
    overflow: hidden;
    border: 1px solid var(--panelBorder);
    background: linear-gradient(135deg, rgba(42,171,238,0.06), rgba(42,171,238,0.01));
    display: grid;
    place-items: stretch;
    padding: 0;
}

@media (max-width: 520px){
    .featuredArt{ min-height: 320px; }
}

.featuredArt img{
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
    display: block;
}

.featuredContent{
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 920px){
    .featuredContent{ padding: 18px; }
}

.featuredHeader{
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.featuredWeek{
    font-size: 11px;
    font-weight: 900;
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(42,171,238,0.85), rgba(42,171,238,0.65));
    color: rgba(0,0,0,0.90);
    letter-spacing: 0.3px;
}

.featuredTitle{
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 0.3px;
    margin: 0;
}

@media (max-width: 520px){
    .featuredTitle{ font-size: 24px; }
}

.featuredMeta{
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.shelterLogo{
    width: 48px;
    height: 48px;
    border-radius: 0;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    object-fit: cover;
}

.shelterInfo{
    flex: 1;
    min-width: 180px;
}

.shelterName{
    font-weight: 900;
    font-size: 14px;
    margin-bottom: 4px;
}

.shelterLinks{
    display: flex;
    gap: 8px;
    font-size: 12px;
    flex-wrap: wrap;
}

.shelterLinks a{
    color: rgba(255,255,255,0.86);
    text-decoration: none;
    font-weight: 800;
}

.shelterLinks a.iconLink{
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
    white-space: nowrap;
}

.shelterLinks a.iconLink:hover{
    transform: translateY(-1px);
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
}

.shelterLinks a.iconLink:active{
    transform: translateY(0px);
}

.shelterLinks .linkIcon{
    width: 14px;
    height: 14px;
    color: var(--main);
    flex: 0 0 auto;
}

@media (max-width: 520px){
    .shelterLinks .linkText{ display: none; }
    .shelterLinks a.iconLink{ padding: 7px 10px; }
}

.shelterLinks .linkText{
    line-height: 1;
}

.story{
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    border-left: 3px solid rgba(42,171,238,0.35);
    padding-left: 14px;
    margin: 8px 0;
}

.storyBody > :first-child{ margin-top: 0; }
.storyBody > :last-child{ margin-bottom: 0; }
.storyBody a{ color: var(--main); font-weight: 800; text-decoration: none; }
.storyBody a:hover{ text-decoration: underline; }

.socialProof{
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.socialProof a{
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.86);
    text-decoration: none;
    font-weight: 700;
    transition: all 120ms ease;
}
.socialProof a:hover{
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-1px);
}

.hashtag{
    margin-top: 16px;
    padding: 14px;
    border-radius: var(--radiusSm);
    background: rgba(42,171,238,0.08);
    border: 1px solid rgba(42,171,238,0.18);
    text-align: center;
    font-weight: 900;
    font-size: 15px;
    letter-spacing: 0.3px;
    color: var(--main);
}

/* GRID */
.grid{
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 16px;
    margin-top: 16px;
}
@media (max-width: 920px){ .grid{ grid-template-columns: 1fr; } }

.card{
    border-radius: var(--radius);
    border: 1px solid var(--cardBorder);
    background: var(--card);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    padding: 18px;
}

.card h3{
    margin: 0 0 10px;
    font-size: 15px;
    letter-spacing: 0.2px;
}

.muted{ color: var(--muted); }
.small{ font-size: 12.5px; line-height: 1.5; }

.stats{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
}
@media (max-width: 520px){ .stats{ grid-template-columns: 1fr; } }

.stat{
    padding: 12px;
    border-radius: var(--radiusSm);
    border: 1px solid var(--panelBorder);
    background: var(--panel);
    transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}
.stat:hover{
    transform: translateY(-1px);
    border-color: var(--accentBorder);
}
.stat .label{ font-size: 12px; color: var(--muted2); margin-bottom: 6px; }
.stat .value{ font-size: 18px; font-weight: 900; }

/* PROGRESS */
.progressBlock{
    margin-top: 14px;
    padding: 12px;
    border-radius: var(--radiusSm);
    border: 1px solid var(--panelBorder);
    background: var(--panel);
}

.progressHead{
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 10px;
}
.progressTitle{ font-weight: 900; font-size: 13px; }
.progressMeta{ color: var(--muted2); font-size: 12px; white-space: nowrap; }

.bar{
    width: 100%;
    height: 14px;
    background: var(--barBg);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.bar > span{
    display: block;
    height: 100%;
    width: var(--pct, 0%);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(42,171,238,1), rgba(42,171,238,0.65));
    box-shadow: 0 10px 28px rgba(42,171,238,0.16), var(--glow);
    transition: width 260ms ease;
}

.hint{
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
}
.hint strong{ color: rgba(255,255,255,0.92); }

/* LIST ROWS */
.row{
    margin-top: 12px;
    padding: 12px;
    border-radius: var(--radiusSm);
    border: 1px solid var(--panelBorder);
    background: var(--panel);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.row:hover{
    transform: translateY(-1px);
    border-color: var(--accentBorder);
}

.pagination{
    margin-top: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.pageBtn{
    cursor: pointer;
    border: 1px solid var(--pillBorder);
    background: var(--pillBg);
    color: var(--link);
    font-weight: 900;
    font-size: 12px;
    padding: 10px 14px;
    border-radius: 999px;
    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, opacity 120ms ease;
}

.pageBtn:hover{
    transform: translateY(-1px);
    border-color: var(--accentBorder);
    background: rgba(255,255,255,0.08);
}

.pageBtn:disabled{
    cursor: default;
    opacity: 0.45;
    transform: none;
}

.pageMeta{
    font-size: 12px;
    color: var(--muted2);
    font-weight: 800;
}

.rowTop{
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.badge{
    font-size: 11px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.86);
}

.title{
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 0.2px;
}

.meta{
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted2);
    line-height: 1.4;
}

.meta a{
    color: var(--main);
    font-weight: 800;
    text-decoration: none;
}

.meta a:hover{
    text-decoration: underline;
}

.amount{
    font-weight: 900;
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--pillBorder);
    background: var(--pillBg);
    white-space: nowrap;
}

a{ color: var(--link); text-decoration: none; }
a:hover{ color: var(--linkHover); text-decoration: underline; }

a:focus-visible,
button:focus-visible{
    outline: 2px solid rgba(42,171,238,0.55);
    outline-offset: 3px;
}

footer{
    margin-top: 18px;
    text-align: center;
    color: var(--muted2);
    font-size: 12px;
}

/* AUTH */
.authCard{
    max-width: 540px;
    margin: 16px auto 0;
}

.authAlert{
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: var(--radiusSm);
    border: 1px solid rgba(255, 90, 90, 0.35);
    background: rgba(255, 90, 90, 0.10);
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    font-weight: 700;
}

[data-theme="light"] .authAlert{
    color: rgba(0, 0, 0, 0.84);
}

.authForm{
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.authLabel{
    display: block;
    font-size: 12px;
    font-weight: 900;
    color: var(--muted2);
    margin-bottom: 6px;
}

.authInput{
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radiusSm);
    border: 1px solid var(--panelBorder);
    background: rgba(0,0,0,0.18);
    color: var(--text);
    font-size: 14px;
}

[data-theme="light"] .authInput{
    background: rgba(0,0,0,0.03);
}

.authInput:focus{
    outline: none;
    border-color: var(--accentBorder);
    box-shadow: var(--glow);
}

.authActions{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

/* MAIN FOOTER */
.mainFooter{
    margin-top: 60px;
    padding: 60px 0 30px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.2));
    border-top: 1px solid rgba(255,255,255,0.10);
}

.footerContainer{
    width: min(1120px, 100% - 36px);
    margin: 0 auto;
}

.footerGrid{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 920px){
    .footerGrid{
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 600px){
    .footerGrid{
        grid-template-columns: 1fr;
    }
}

.footerCol h4{
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.3px;
    margin: 0 0 16px;
    color: var(--text);
}

.footerText{
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
    margin: 0;
}

.footerLogo{
    display: flex;
    align-items: center;
    margin-top: 20px;
    color: var(--text);
}

.footerLinks{
    list-style: none;
    padding: 0;
    margin: 0;
}

.footerLinks li{
    margin-bottom: 10px;
}

.footerLinks a{
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    transition: color 120ms ease;
}

.footerLinks a:hover{
    color: var(--main);
    text-decoration: none;
    opacity: 1;
}

.socialLinks{
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.socialLink{
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    text-decoration: none;
    transition: all 120ms ease;
}

.socialLink:hover{
    transform: translateY(-2px);
    background: rgba(255,255,255,0.08);
    border-color: rgba(42,171,238,0.5);
}

.footerBottom{
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: var(--muted2);
    font-size: 12px;
}

.footerBottom p{
    margin: 0;
}
