* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #202124;
    color: #e8eaed;
    direction: rtl;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    border-bottom: 1px solid #3c4043;
}

.logo {
    font-size: 30px;
    font-weight: bold;
    color: #fff;
}

.logo a{
    color: #fff;
}

.search-bar {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 30px;
}

.search-box {
    width: 700px;
    background: #303134;
    height: 48px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 10px;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 16px;
}

.search-box span {
    font-size: 18px;
}

.container {
    width: 1200px;
    max-width: 95%;
    margin: 30px auto;
    display: flex;
    flex-direction: row-reverse;
    gap: 40px;
}

/* نتایج */

.results {
    flex: 1;
}

.result {
    margin-bottom: 30px;
}

.site {
    color: #9aa0a6;
    font-size: 13px;
    margin-bottom: 6px;
}

.title {
    color: #8ab4f8;
    text-decoration: none;
    font-size: 18px;
}

.title:hover {
    text-decoration: underline;
}

.desc {
    color: #bdc1c6;
    margin-top: 8px;
    line-height: 2;
        font-size: 14px;
}

/* سایدبار */

.sidebar {
    width: 350px;
    border-right: 1px solid #3c4043;
    padding-right: 25px;
}

.sidebar h2 {
    margin-bottom: 15px;
}

.sidebar p {
    color: #bdc1c6;
    line-height: 2;
}

/* خدمات */

.services {
    margin-top: 35px;
}

.services h2 {
    margin-bottom: 15px;
}

.service-item {
    background: #303134;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    transition: .3s;
    cursor: pointer;
}

.service-item:hover {
    background: #3c4043;
}

.service-item h3 {
    color: #8ab4f8;
    margin-bottom: 8px;
}

.service-item p {
    color: #d2d2d2;
    line-height: 1.8;
}

@media(max-width:900px) {

    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border: none;
        padding: 0;
    }

    .search-box {
        width: 100%;
    }

}

.header-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.header-btn {
    text-decoration: none;
    background: #303134;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    transition: .3s;
    font-size: 14px;
    border: 1px solid #3c4043;
}

.header-btn:hover {
    background: #4285f4;
}

.support {
    background: #0f9d58;
}

.support:hover {
    background: #0b8043;
}


@media(max-width:900px) {

    .header-buttons {
        margin-top: 10px;
        justify-content: center;
        width: 100%;
    }

    header {
        flex-wrap: wrap;
        gap: 15px;
    }

}

/* ===== Theme ===== */

:root {
    --bg: #202124;
    --text: #e8eaed;
    --header-border: #3c4043;
    --box: #303134;
    --box-hover: #3c4043;
    --title: #8ab4f8;
    --desc: #bdc1c6;
    --site: #9aa0a6;
    --footer: #171717;
}

body.light {
    --bg: #ffffff;
    --text: #202124;
    --header-border: #dadce0;
    --box: #f1f3f4;
    --box-hover: #e8eaed;
    --title: #1a73e8;
    --desc: #3c4043;
    --site: #5f6368;
    --footer: #f8f9fa;
}

body {
    background: var(--bg);
    color: var(--text);
}

header {
    border-bottom: 1px solid var(--header-border);
}

.logo {
    color: var(--text);
}

.logo a{
     color: var(--text);
}
.search-box {
    background: var(--box);
}

.search-box input {
    color: var(--text);
}

.sidebar {
    border-right: 1px solid var(--header-border);
}

.site {
    color: var(--site);
}

.title {
    color: var(--title);
}

.desc,
.sidebar p,
.service-item p {
    color: var(--desc);
}

.service-item {
    background: var(--box);
}

.service-item:hover {
    background: var(--box-hover);
}

.service-item h3 {
    color: var(--title);
}

.header-btn {
    background: var(--box);
    color: var(--text);
    border: 1px solid var(--header-border);
}


.pagination{
    display:flex;
    justify-content:center;
    gap:8px;
    margin-top:30px;
    flex-wrap:wrap;
}

.pagination button{
    background:#303134;
    color:#fff;
    border:1px solid #3c4043;
    padding:8px 14px;
    border-radius:8px;
    cursor:pointer;
    transition:.3s;
}

.pagination button:hover{
    background:#4285f4;
}

.pagination button.active{
    background:#4285f4;
}
body.light .pagination button{
    background:#f1f3f4;
    color:#202124;
    border:1px solid #dadce0;
}

body.light .pagination button.active{
    background:#1a73e8;
    color:#fff;
}

  .ecfRules-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.55);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:99999;
    padding:20px;
}

.ecfRules-modal.ecfRules-hide{
    display:none;
}

.ecfRules-box{
    width:100%;
    max-width:480px;
    background:#fff;
    border-radius:15px;
    overflow:hidden;
    box-shadow:0 15px 40px rgba(0,0,0,.2);
    animation:ecfRulesPopup .25s ease;
}

@keyframes ecfRulesPopup{
    from{
        opacity:0;
        transform:scale(.9);
    }
    to{
        opacity:1;
        transform:scale(1);
    }
}

.ecfRules-header{
    background:#2563eb;
    color:#fff;
    padding:18px;
    font-size:20px;
    font-weight:bold;
}

.ecfRules-body{
    padding:25px;
    line-height:2;
    color:#444;
}

.ecfRules-link{
    display:inline-block;
    margin-top:15px;
    color:#2563eb;
    text-decoration:none;
    font-weight:bold;
}

.ecfRules-link:hover{
    text-decoration:underline;
}

.ecfRules-footer{
    padding:20px;
    border-top:1px solid #eee;
    text-align:left;
}

#ecfRulesAcceptBtn{
    border:none;
    background:#2563eb;
    color:#fff;
    padding:12px 22px;
    border-radius:8px;
    cursor:pointer;
    font-family:inherit;
    transition:.2s;
}

#ecfRulesAcceptBtn:hover{
    background:#1d4ed8;
}

.title-row{
    display:flex;
    align-items:center;
    gap:8px;
}

.favorite{
    cursor:pointer;
    color:#999;
    font-size:18px;
    transition:.2s;
}

.favorite.active{
    color:#f5b301;
}

.favorite:hover{
    transform:scale(1.15);
}