@font-face {
    font-family: 'Estedad';
    src: url('https://rozup.ir/view/4248437/Estedad-Medium.ttf') format('truetype');
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Estedad', Tahoma, sans-serif;
    background: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ===== صفحه اصلی ===== */
#homePage {
    width: 100%;
    max-width: 700px;
    text-align: center;
}
.logo-container {
    margin-bottom: 30px;
}
.logo-icon {
    font-size: 64px;
    color: #4285F4;
    display: block;
}
.logo-container h1 {
    font-size: 48px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 8px 0 4px;
}
.highlight { color: #4285F4; }
.sub {
    color: #6B7280;
    font-size: 14px;
}

/* ===== کادر جستجو ===== */
.search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #dfe1e5;
    border-radius: 30px;
    padding: 0 16px;
    transition: all 0.3s;
    box-shadow: 0 1px 6px rgba(32,33,36,0.08);
}
.search-box:focus-within {
    border-color: #4285F4;
    box-shadow: 0 1px 12px rgba(66,133,244,0.15);
}
.search-box button {
    background: none;
    border: none;
    color: #4285F4;
    font-size: 20px;
    cursor: pointer;
    padding: 8px 4px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}
.search-box button:hover { transform: scale(1.05); }
.search-box input {
    flex: 1;
    padding: 14px 0;
    border: none;
    background: transparent;
    font-family: 'Estedad', Tahoma, sans-serif;
    font-size: 16px;
    outline: none;
    color: #1a1a2e;
}
.search-box input::placeholder { color: #9aa0a6; }

/* ===== تبلیغات ===== */
.ad-container {
    margin-top: 20px;
    display: none;
}
.ad-box {
    background: linear-gradient(135deg, #f8f9fa, #e8eaed);
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    border: 1px solid #e8eaed;
}
.ad-label {
    background: #4285F4;
    color: #fff;
    padding: 2px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
}
.ad-title {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a2e;
}
.ad-text {
    font-size: 13px;
    color: #6B7280;
}
.ad-box a {
    color: #4285F4;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    margin-right: auto;
}
.ad-box a:hover { text-decoration: underline; }

/* ===== سایت‌های پیشنهادی ===== */
.suggestions-container {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid #e8eaed;
}
.suggestions-title {
    font-size: 14px;
    font-weight: 600;
    color: #6B7280;
    margin-bottom: 14px;
}
.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    padding: 10px 14px;
    border-radius: 30px;
    border: 1px solid #e8eaed;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: #1a1a2e;
    justify-content: center;
}
.suggestion-item:hover {
    background: #fff;
    border-color: #4285F4;
    box-shadow: 0 2px 12px rgba(66,133,244,0.08);
    transform: translateY(-2px);
}
.suggestion-item img {
    width: 28px; height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.suggestion-item .name { font-size: 13px; font-weight: 500; }

/* ===== صفحه نتایج ===== */
#resultsPage {
    width: 100%;
    max-width: 1100px;
}
.results-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e8eaed;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.mini-search {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f1f3f4;
    border-radius: 30px;
    padding: 0 12px;
    border: 1px solid transparent;
    transition: all 0.3s;
}
.mini-search:focus-within {
    background: #fff;
    border-color: #4285F4;
    box-shadow: 0 1px 6px rgba(66,133,244,0.1);
}
.mini-search button {
    background: none;
    border: none;
    color: #4285F4;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 4px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mini-search button:hover { transform: scale(1.05); }
.mini-search input {
    flex: 1;
    padding: 8px 0;
    border: none;
    background: transparent;
    font-family: 'Estedad', Tahoma, sans-serif;
    font-size: 15px;
    outline: none;
    margin: 0 8px;
}

/* ===== نتایج ===== */
#resultsContainer {
    min-height: 200px;
}
.loading-state {
    text-align: center;
    padding: 40px 20px;
    color: #6B7280;
}
.result-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #4285F4;
    margin: 16px 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e8eaed;
}
.result-item {
    padding: 14px 0;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
}
.result-item:hover { background: #fafbfc; margin: 0 -12px; padding: 14px 12px; border-radius: 8px; }
.result-item .title {
    font-size: 16px;
    font-weight: 600;
    color: #1a0dab;
    margin-bottom: 2px;
}
.result-item .url {
    font-size: 12px;
    color: #202124;
    direction: ltr;
    text-align: left;
    word-break: break-all;
    margin-bottom: 4px;
}
.result-item .desc {
    font-size: 13px;
    color: #4d5156;
    line-height: 1.6;
}
.result-item .source {
    font-size: 12px;
    color: #6B7280;
    display: inline-block;
    background: #f1f3f4;
    padding: 1px 12px;
    border-radius: 30px;
    margin-top: 4px;
}

/* ===== iframe ===== */
#iframeContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: none;
    flex-direction: column;
}
#iframeContainer.active { display: flex; }
#iframeHeader {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #e8eaed;
    background: #fff;
    gap: 8px;
}
#iframeHeader .back {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #4285F4;
}
#iframeHeader .url-bar {
    flex: 1;
    background: #f1f3f4;
    border-radius: 30px;
    padding: 4px 14px;
}
#iframeHeader .url-bar input {
    width: 100%;
    border: none;
    background: transparent;
    font-family: 'Estedad', Tahoma, sans-serif;
    font-size: 13px;
    color: #202124;
    direction: ltr;
    text-align: left;
    outline: none;
    padding: 4px 0;
}
#iframeHeader .open-new,
#iframeHeader .refresh {
    background: none;
    border: none;
    color: #4285F4;
    font-size: 18px;
    cursor: pointer;
}
#iframeBody {
    flex: 1;
    width: 100%;
    border: none;
}

@media (max-width: 640px) {
    .suggestions-grid { grid-template-columns: repeat(2, 1fr); }
    .results-header { flex-direction: column; align-items: stretch; }
    .ad-box { flex-direction: column; text-align: center; }
    .ad-box a { margin-right: 0; }
}

/* ===== منوی اصلی ===== */
.menu-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}
.menu-toggle {
    width: 46px;
    height: 46px;
    border: 1px solid #e8eaed;
    border-radius: 14px;
    background: #fff;
    color: #4285F4;
    box-shadow: 0 4px 16px rgba(32,33,36,0.10);
    cursor: pointer;
    font-size: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}
.menu-toggle:hover {
    border-color: #4285F4;
    box-shadow: 0 6px 20px rgba(66,133,244,0.16);
    transform: translateY(-1px);
}
.menu-toggle.active {
    background: #4285F4;
    color: #fff;
    border-color: #4285F4;
}
.main-menu {
    position: absolute;
    top: 54px;
    right: 0;
    width: 190px;
    padding: 8px;
    background: rgba(255,255,255,0.98);
    border: 1px solid #e8eaed;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(32,33,36,0.14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    transition: all 0.2s ease;
}
.main-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.menu-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 13px;
    border-radius: 11px;
    color: #1a1a2e;
    text-decoration: none;
    font-family: 'Estedad', Tahoma, sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.menu-item i {
    width: 20px;
    text-align: center;
    color: #4285F4;
    font-size: 16px;
}
.menu-item:hover {
    background: #f1f6ff;
    color: #4285F4;
}
@media (max-width: 640px) {
    .menu-wrapper { top: 14px; right: 14px; }
}
