﻿/* =========================================================
   SERPERSEARCH - MODERN RESPONSIVE SEARCH UI
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #202124;
    background: #ffffff;
    min-height: 100vh;
}

/* =========================================================
   HEADER
   ========================================================= */

.search-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eeeeee;
}

.header-inner {
    min-height: 76px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 28px;
    display: flex;
    align-items: center;
    gap: 35px;
}

.logo {
    flex-shrink: 0;
}

    .logo a {
        text-decoration: none;
        font-size: 25px;
        font-weight: 700;
        letter-spacing: -0.7px;
        color: #202124;
    }

.search-form {
    width: min(680px, 100%);
    position: relative;
}

.search-box {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    position: relative;
    border: 1px solid #dfe1e5;
    border-radius: 26px;
    background: #ffffff;
    transition: all 0.2s ease;
}

    .search-box:hover {
        box-shadow: 0 2px 8px rgba(60, 64, 67, 0.15);
    }

    .search-box:focus-within {
        border-color: #c7c9cc;
        box-shadow: 0 2px 10px rgba(60, 64, 67, 0.18);
    }

.search-icon {
    width: 45px;
    text-align: center;
    color: #777;
    font-size: 17px;
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    width: 100%;
    height: 100%;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: #202124;
    padding: 0 8px;
    min-width: 0;
}

    .search-box input::placeholder {
        color: #8a8a8a;
    }

.clear-btn {
    width: 38px;
    height: 38px;
    margin-right: 4px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #777;
    font-size: 22px;
    cursor: pointer;
}

    .clear-btn:hover {
        background: #f1f3f4;
    }

.search-btn {
    height: 38px;
    margin-right: 5px;
    padding: 0 18px;
    border: 0;
    border-radius: 20px;
    background: #1a73e8;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .search-btn:hover {
        background: #1557b0;
    }

/* =========================================================
   AUTOCOMPLETE
   ========================================================= */

.autocomplete-box {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 54px;
    z-index: 2000;
    background: #ffffff;
    border: 1px solid #e1e3e6;
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

    .autocomplete-box:empty {
        display: none;
    }

.suggestion {
    padding: 13px 18px;
    cursor: pointer;
    border-bottom: 1px solid #f3f3f3;
    font-size: 14px;
}

    .suggestion:last-child {
        border-bottom: 0;
    }

    .suggestion:hover {
        background: #f5f7fa;
    }

/* =========================================================
   TABS
   ========================================================= */

.search-tabs {
    background: #ffffff;
    border-bottom: 1px solid #eeeeee;
}

.tabs-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
}

    .tabs-container::-webkit-scrollbar {
        display: none;
    }

.tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 15px 18px 13px;
    color: #5f6368;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

    .tab:hover {
        color: #1a73e8;
        background: #f8faff;
    }

    .tab.active {
        color: #1a73e8;
        font-weight: 600;
        border-bottom-color: #1a73e8;
    }

/* =========================================================
   MAIN CONTAINER
   ========================================================= */

.search-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 28px 70px;
}

.search-info {
    color: #70757a;
    font-size: 13px;
    margin-bottom: 24px;
}

    .search-info strong {
        color: #3c4043;
    }

/* =========================================================
   WEB RESULTS
   ========================================================= */

.results-list {
    max-width: 780px;
}

.result-card {
    margin-bottom: 30px;
}

.result-url {
    color: #5f6368;
    font-size: 13px;
    margin-bottom: 5px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-title {
    margin: 0 0 7px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 500;
}

    .result-title a {
        color: #1a0dab;
        text-decoration: none;
    }

        .result-title a:hover {
            text-decoration: underline;
        }

.result-snippet {
    margin: 0;
    color: #4d5156;
    font-size: 14px;
    line-height: 1.6;
}

/* =========================================================
   NEWS
   ========================================================= */

.news-list {
    max-width: 850px;
}

.news-card {
    display: flex;
    gap: 20px;
    padding: 0 0 23px;
    margin-bottom: 23px;
    border-bottom: 1px solid #eeeeee;
}

.news-image {
    width: 180px;
    height: 115px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #f1f3f4;
}

    .news-image img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        transition: transform 0.25s ease;
    }

    .news-image:hover img {
        transform: scale(1.04);
    }

.news-content {
    min-width: 0;
}

.news-source {
    color: #5f6368;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}

.news-content h2 {
    margin: 0 0 7px;
    font-size: 19px;
    line-height: 1.35;
    font-weight: 500;
}

    .news-content h2 a {
        color: #1a0dab;
        text-decoration: none;
    }

        .news-content h2 a:hover {
            text-decoration: underline;
        }

.news-date {
    color: #777;
    font-size: 12px;
    margin-bottom: 7px;
}

.news-content p {
    margin: 0;
    color: #4d5156;
    font-size: 14px;
    line-height: 1.5;
}

/* =========================================================
   IMAGE GRID
   ========================================================= */

.image-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.image-card {
    min-width: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #eeeeee;
    transition: all 0.2s ease;
}

    .image-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 18px rgba(0, 0, 0, 0.10);
    }

.image-link {
    display: block;
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: #f5f5f5;
}

    .image-link img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

.image-card:hover .image-link img {
    transform: scale(1.05);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 30px;
}

.image-info {
    padding: 11px 13px 13px;
}

.image-title {
    font-size: 13px;
    line-height: 1.4;
}

    .image-title a {
        color: #202124;
        text-decoration: none;
    }

        .image-title a:hover {
            color: #1a73e8;
        }

.image-source {
    color: #777;
    font-size: 11px;
    margin-top: 6px;
}

/* =========================================================
   VIDEO GRID
   ========================================================= */

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.video-card {
    min-width: 0;
    border: 1px solid #eeeeee;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    transition: all 0.2s ease;
}

    .video-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
    }

.video-thumbnail {
    display: block;
    position: relative;
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: #eeeeee;
}

    .video-thumbnail img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

.video-card:hover .video-thumbnail img {
    transform: scale(1.04);
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #777;
}

.play-button {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.78);
    color: white;
    font-size: 19px;
    padding-left: 3px;
    transition: all 0.2s ease;
}

.video-card:hover .play-button {
    transform: translate(-50%, -50%) scale(1.08);
}

.video-content {
    padding: 14px;
}

    .video-content h2 {
        margin: 0 0 8px;
        font-size: 16px;
        line-height: 1.4;
        font-weight: 600;
    }

        .video-content h2 a {
            color: #202124;
            text-decoration: none;
        }

            .video-content h2 a:hover {
                color: #1a73e8;
            }

.video-channel {
    color: #5f6368;
    font-size: 12px;
    margin-bottom: 5px;
}

.video-date {
    color: #777;
    font-size: 12px;
    margin-bottom: 6px;
}

.video-content p {
    margin: 0;
    color: #5f6368;
    font-size: 13px;
    line-height: 1.45;
}

/* =========================================================
   NO RESULTS
   ========================================================= */

.no-results {
    max-width: 650px;
    margin: 90px auto;
    text-align: center;
}

.no-results-icon {
    font-size: 45px;
    margin-bottom: 15px;
    opacity: 0.65;
}

.no-results h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 500;
}

.no-results p {
    margin: 0;
    color: #777;
    font-size: 14px;
}

/* =========================================================
   WELCOME
   ========================================================= */

.welcome-section {
    min-height: 55vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
}

.welcome-icon {
    width: 82px;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f6ff;
    color: #1a73e8;
    font-size: 34px;
    margin-bottom: 22px;
}

.welcome-section h1 {
    margin: 0 0 12px;
    font-size: 38px;
    font-weight: 600;
    letter-spacing: -1px;
}

.welcome-section p {
    margin: 0;
    color: #70757a;
    font-size: 16px;
}

/* =========================================================
   PAGINATION
   ========================================================= */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 50px 0 20px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 17px;
    border: 1px solid #dadce0;
    border-radius: 20px;
    color: #1a73e8;
    background: #ffffff;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

    .page-btn:hover {
        background: #f8faff;
        border-color: #1a73e8;
    }

.page-number {
    color: #5f6368;
    font-size: 14px;
}

/* =========================================================
   ERROR
   ========================================================= */

.error-box {
    padding: 16px 18px;
    margin-bottom: 25px;
    border: 1px solid #f5c2c0;
    border-radius: 10px;
    background: #fff5f5;
    color: #b42318;
}

    .error-box strong {
        display: block;
        margin-bottom: 5px;
    }

    .error-box p {
        margin: 0;
        font-size: 14px;
    }

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    border-top: 1px solid #eeeeee;
    padding: 25px 20px;
    text-align: center;
    color: #777;
    font-size: 12px;
    background: #fafafa;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .header-inner {
        gap: 20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .logo a {
        font-size: 22px;
    }

    .search-container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .tabs-container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .image-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .header-inner {
        min-height: 68px;
        padding: 10px 12px;
    }

    .logo {
        display: none;
    }

    .search-form {
        width: 100%;
    }

    .search-box {
        height: 46px;
    }

    .search-icon {
        width: 40px;
        font-size: 15px;
    }

    .search-box input {
        font-size: 14px;
    }

    .search-btn {
        padding: 0 13px;
        font-size: 13px;
    }

    .clear-btn {
        width: 32px;
        font-size: 20px;
    }

    .tabs-container {
        padding: 0 10px;
        gap: 0;
    }

    .tab {
        padding: 14px 13px 12px;
        font-size: 13px;
    }

    .search-container {
        padding: 20px 14px 50px;
    }

    .search-info {
        margin-bottom: 20px;
    }

    /* Web */

    .result-card {
        margin-bottom: 25px;
    }

    .result-title {
        font-size: 18px;
    }

    .result-snippet {
        font-size: 13px;
        line-height: 1.55;
    }

    /* News */

    .news-card {
        gap: 12px;
        padding-bottom: 18px;
        margin-bottom: 18px;
    }

    .news-image {
        width: 105px;
        height: 75px;
        border-radius: 7px;
    }

    .news-content h2 {
        font-size: 15px;
        margin-bottom: 5px;
    }

    .news-source {
        font-size: 11px;
    }

    .news-date {
        font-size: 10px;
    }

    .news-content p {
        display: none;
    }

    /* Images */

    .image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .image-link {
        height: 145px;
    }

    .image-info {
        padding: 9px 10px;
    }

    .image-title {
        font-size: 12px;
    }

    /* Videos */

    .video-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .video-thumbnail {
        height: 200px;
    }

    /* Welcome */

    .welcome-section {
        min-height: 60vh;
        padding: 40px 15px;
    }

    .welcome-icon {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }

    .welcome-section h1 {
        font-size: 29px;
    }

    .welcome-section p {
        font-size: 14px;
        line-height: 1.5;
    }

    /* Pagination */

    .pagination {
        gap: 10px;
        margin-top: 35px;
    }

    .page-btn {
        padding: 0 13px;
        font-size: 13px;
    }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .search-btn {
        padding: 0 10px;
        font-size: 12px;
    }

    .search-box input {
        font-size: 13px;
    }

    .tab {
        padding-left: 10px;
        padding-right: 10px;
        font-size: 12px;
    }

    .image-link {
        height: 125px;
    }

    .video-thumbnail {
        height: 180px;
    }

    .news-image {
        width: 92px;
        height: 68px;
    }

    .news-content h2 {
        font-size: 14px;
    }
}
