@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --bg-deep: #031127;
    --bg-mid: #0a2d59;
    --bg-soft: #d9ebff;
    --card: #f4faff;
    --card-strong: #ffffff;
    --text-main: #0c2347;
    --text-soft: #446389;
    --blue-main: #0f7bff;
    --blue-strong: #0057c2;
    --accent: #00b7ff;
    --accent-warm: #ffc247;
    --line: #c8dbf5;
    --shadow: 0 18px 42px rgba(5, 27, 61, 0.16);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(90rem 45rem at -8% -12%, #2b7ddd 0%, transparent 62%),
        radial-gradient(70rem 40rem at 105% 18%, #0d4ea8 0%, transparent 65%),
        linear-gradient(180deg, var(--bg-deep) 0%, #123f78 46%, #d4e8ff 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 18px 46px;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
    z-index: 0;
}

body::before {
    top: -120px;
    left: -90px;
    background: radial-gradient(circle, rgba(173, 220, 255, 0.36) 0%, rgba(173, 220, 255, 0) 72%);
}

body::after {
    bottom: -140px;
    right: -110px;
    background: radial-gradient(circle, rgba(39, 159, 255, 0.3) 0%, rgba(39, 159, 255, 0) 74%);
}

.header-actions,
h1,
.top-bar,
.search-container,
form,
.result,
.count,
.img-grid,
.video-grid,
.pagination,
p {
    position: relative;
    z-index: 1;
}

h1 {
    width: min(1160px, 100%);
    margin: 8px 0 18px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 3.4rem);
    letter-spacing: -0.03em;
    line-height: 1.06;
    color: #f5fbff;
    text-shadow: 0 8px 26px rgba(4, 20, 44, 0.5);
    animation: fadeUp 600ms ease-out both;
}

.header-actions {
    width: min(1160px, 100%);
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.donate-paypal {
    text-decoration: none;
    color: #08244a;
    background: linear-gradient(140deg, #9ed9ff 0%, #f1fbff 100%);
    border: 1px solid rgba(208, 233, 255, 0.9);
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 0.92rem;
    box-shadow: 0 12px 24px rgba(2, 21, 45, 0.2);
    transition: transform 170ms ease, box-shadow 170ms ease;
}

.donate-paypal:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 28px rgba(2, 21, 45, 0.3);
}

.top-bar {
    width: min(1160px, 100%);
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin: 4px 0 16px;
}

.link {
    text-decoration: none;
    color: #eaf6ff;
    background: rgba(13, 39, 77, 0.45);
    backdrop-filter: blur(3px);
    border: 1px solid rgba(174, 210, 243, 0.38);
    border-radius: 999px;
    padding: 10px 20px;
    font-weight: 700;
    min-width: 96px;
    text-align: center;
    transition: transform 170ms ease, background-color 170ms ease, border-color 170ms ease;
}

.link:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 246, 219, 0.8);
    background: rgba(21, 74, 143, 0.82);
}

.link.active {
    color: #08244a;
    background: linear-gradient(130deg, #9dd9ff 0%, #fff4ce 100%);
    border-color: rgba(255, 240, 197, 0.9);
}

.search-container {
    width: min(1160px, 100%);
    margin-bottom: 22px;
    animation: fadeUp 720ms ease-out both;
}

form {
    width: 100%;
    background: linear-gradient(160deg, rgba(239, 248, 255, 0.98) 0%, rgba(228, 242, 255, 0.98) 100%);
    border: 1px solid rgba(175, 207, 236, 0.96);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

label {
    color: var(--text-main);
    font-size: 0.92rem;
    font-weight: 600;
}

input[type="text"],
select {
    border: 1px solid var(--line);
    background: var(--card-strong);
    border-radius: 12px;
    min-height: 46px;
    padding: 0 14px;
    font-size: 0.99rem;
    color: var(--text-main);
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

input[type="text"] {
    flex: 1 1 360px;
}

input[type="text"]:focus,
select:focus {
    border-color: #6cb4ff;
    box-shadow: 0 0 0 3px rgba(47, 143, 255, 0.22);
}

input[type="checkbox"] {
    accent-color: var(--blue-main);
    transform: translateY(1px);
}

button {
    border: none;
    border-radius: 12px;
    min-height: 46px;
    padding: 0 18px;
    background: linear-gradient(125deg, var(--blue-main) 0%, #2ca5ff 56%, var(--accent) 100%);
    color: white;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(11, 85, 186, 0.35);
    transition: transform 170ms ease, box-shadow 170ms ease, filter 170ms ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(11, 85, 186, 0.42);
    filter: brightness(1.03);
}

.count {
    width: min(1160px, 100%);
    color: #eaf4ff;
    font-weight: 600;
    margin: 8px 0 16px;
    text-shadow: 0 4px 16px rgba(6, 31, 66, 0.5);
}

.result {
    width: min(1160px, 100%);
    background: linear-gradient(160deg, rgba(249, 253, 255, 0.98) 0%, rgba(238, 247, 255, 0.98) 100%);
    border: 1px solid #d8e8fa;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 12px;
    box-shadow: 0 8px 24px rgba(6, 28, 62, 0.12);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.result:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(6, 28, 62, 0.2);
}

.result a {
    color: #0a3a7f;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.08rem;
}

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

.url {
    margin-top: 5px;
    color: #1457b0;
    font-size: 0.88rem;
    word-break: break-word;
}

.snippet {
    margin-top: 8px;
    color: var(--text-soft);
    line-height: 1.54;
}

.img-grid {
    width: min(1160px, 100%);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 4px;
}

.thumb {
    background: linear-gradient(155deg, rgba(248, 253, 255, 0.99) 0%, rgba(237, 247, 255, 0.99) 100%);
    border: 1px solid #d6e6fa;
    border-radius: 14px;
    padding: 9px;
    box-shadow: 0 10px 26px rgba(7, 33, 70, 0.14);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.thumb:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(7, 33, 70, 0.2);
}

.thumb img {
    width: 100%;
    height: 150px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}

.thumb-url {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #c6daf3;
}

.thumb-url a {
    color: #155ab4;
    font-size: 0.78rem;
    text-decoration: none;
    word-break: break-all;
}

.thumb-url a:hover {
    text-decoration: underline;
}

.video-grid {
    width: min(1160px, 100%);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 6px;
}

.video-card {
    background: linear-gradient(165deg, rgba(248, 253, 255, 0.99) 0%, rgba(235, 246, 255, 0.99) 100%);
    border: 1px solid #d3e5fb;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 10px 24px rgba(7, 32, 67, 0.15);
}

.video-container {
    position: relative;
    height: 0;
    padding-bottom: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    background: #07172f;
}

.video-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-title {
    display: block;
    margin-top: 10px;
    color: #0a3a7f;
    font-weight: 700;
}

.platform-badge {
    display: inline-flex;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #042248;
    background: linear-gradient(130deg, #9ed8ff 0%, #ffd684 100%);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.pagination {
    width: min(1160px, 100%);
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.pagination span {
    color: #f6fbff;
    font-weight: 700;
    margin-right: 4px;
}

.page-link,
.pagination a {
    text-decoration: none;
    color: #083064;
    background: rgba(241, 249, 255, 0.98);
    border: 1px solid #cddff6;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 700;
    transition: transform 160ms ease, background-color 160ms ease;
}

.page-link:hover,
.pagination a:hover {
    transform: translateY(-1px);
    background: #ffffff;
}

p {
    width: min(1160px, 100%);
    color: #eaf4ff;
    font-weight: 500;
}

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

@media (max-width: 760px) {
    body {
        padding: 18px 12px 36px;
    }

    .header-actions {
        justify-content: center;
    }

    .top-bar {
        justify-content: center;
    }

    .link {
        flex: 1 1 calc(33% - 8px);
        min-width: 0;
        padding: 10px 8px;
    }

    form {
        padding: 12px;
        border-radius: 14px;
    }

    input[type="text"],
    select,
    button {
        width: 100%;
    }

    label {
        width: auto;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }
}