/* --- تعریف متغیرهای رنگ --- */
:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --subtle-text: #a0a0a0;
    --input-bg: #1f1f1f;
    --search-bg: #2b2b2b;
    --accent-color: #5c64f4;
    --red-dot: #f44336;
    --green-dot: #4CAF50;
    --border-color: #333333;
    --available-bg: #4CAF5033;
    --available-text: #4CAF50;
    --reserved-bg: #FF69B433;
    --reserved-text: #FF69B4;
}

/* --- استایل‌های عمومی و فونت --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: YekanBakh, sans-serif;
    direction: rtl;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-bottom: 50px;
}

a {
    color: var(--text-color);
    text-decoration: none;
}

/* --- هدر (Header) --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
}

.header-logo {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--accent-color);
}

/*.header-logo::before { content: '⚡'; margin-left: 5px; color: var(--accent-color); }*/
.nav-links a {
    margin-right: 24px;
    font-size: 15px;
    line-height: 24px;
    color: var(--text-color);
    opacity: 0.9;
    font-weight: 400;
}

.nav-links a:first-child {
    margin-right: 0;
}

/* --- بخش جستجوی اولیه (Initial Search Hero) --- */
.search-hero {
    text-align: center;
    padding: 80px 20px 50px;
    max-width: 800px;
    margin: 0 auto;
}

.search-hero h1 {
    font-size: 32px;
    line-height: 48px;
    font-weight: 900;
    margin-bottom: 15px;
}

.search-hero p {
    color: var(--subtle-text);
    font-size: 16px;
    line-height: 24px;
    margin-bottom: 24px;
}

/* --- نوار ورودی --- */
.search-bar-container {
    background-color: var(--search-bg);
    border-radius: 12px;
    padding: 10px;
    position: relative;
}

.ai-input,
.main-input {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 20px;
    padding: 15px 20px;
    outline: none;
}

.ai-input {
    padding-left: 108px;
}

.input-options {
    display: flex;
    justify-content: flex-start;
    padding: 5px 20px 10px;
    font-size: 0.9em;
}

.option-tag {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border-radius: 6px;
    padding: 5px 12px;
    margin-left: 10px;
    color: var(--subtle-text);
    cursor: pointer;
}

/* --- بخش توضیحات زیر (Hero Info) --- */
.hero-info {
    text-align: center;
    padding: 50px 20px;
}

.hero-info h2 {
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-info .small-text {
    color: var(--subtle-text);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.hero-info .pink {
    color: #a366d9;
}

.hero-info p {
    font-size: 15px;
    font-weight: 400;
    max-width: 900px;
    margin: 0 auto;
    color: var(--subtle-text);
}

.hero-info a {
    color: var(--accent-color);
    font-weight: bold;
}

/* --- بخش نتایج جستجو (Search Results) --- */
.search-results-page {
    display: none;
    padding: 20px 0;
}

/* فعال‌سازی حالت نتایج */
.search-active .search-results-page {
    display: block;
}

.search-active .search-hero, .search-active .hero-info {
    display: none;
}

/* استایل نوار جستجو در حالت فعال */
.search-active .header {
    border-bottom: 1px solid var(--border-color);
    padding: 10px 40px;
}

.search-bar-full {
    display: flex;
    align-items: center;
    padding: 0;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.search-bar-full .search-bar-container {
    flex-grow: 1;
    background-color: var(--input-bg);
    padding: 0;
    border-radius: 8px;
    width: 500px;
}

.search-bar-container.bordered {
    border: 2px solid #a366d9;
}

.search-bar-full .ai-input,
.search-bar-full .main-input {
    font-size: 1.1em;
    padding: 10px 15px;
}

/* --- نتیجه اصلی (oh.com) --- */
.main-result {
    max-width: 1200px;
    margin: 20px auto 40px;
    padding: 20px;
}

.main-domain-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.main-domain-title {
    font-size: 2.5em;
    font-weight: 700;
}

.lease-button {
    background-color: var(--accent-color);
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    border: none;
}

.main-actions {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.action-link {
    display: flex;
    align-items: center;
    margin-left: 20px;
    color: var(--subtle-text);
    font-size: 0.9em;
    cursor: pointer;
}

/* --- ستون‌های نتایج --- */
.results-columns {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
}

.results-column {
    min-width: 0;
}

.column-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.domain-list {
    list-style: none;
}

.domain-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    direction: ltr;
}

.domain-name {
    display: flex;
    align-items: center;
    direction: ltr;
    margin-top: 4px;
    max-width: 190px;
    overflow: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.domain-name i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 10px;
    display: block;
}

.dot-red {
    background-color: var(--red-dot);
}

.dot-green {
    background-color: var(--green-dot);
}

/* کلاس برای مخفی کردن آیتم‌های اضافی */
.domain-item.hidden {
    display: none !important;
}

/* --- لیبل وضعیت (در دسترس/رزرو شده) --- */
.status-label {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    text-align: center;
    min-width: 100px;
}

.status-reserved {
    background-color: var(--reserved-bg);
    color: var(--reserved-text);
}

.status-available {
    background-color: var(--available-bg);
    color: var(--available-text);
}

.status-available.blue {
    background-color: #20b1e773;
    color: #20b1e7;
}

.load-more-btn {
    display: block;
    width: 200px;
    margin: 40px auto 0;
    padding: 15px;
    background: var(--input-bg);
    color: var(--subtle-text);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

/* --- آیکون‌ها (شبیه‌سازی با یونیکد) --- */
.icon-search::before {
    content: '🔍';
    margin-left: 5px;
}

.icon-bookmark::before {
    content: '🔖';
    margin-left: 5px;
}

.icon-copy::before {
    content: '📋';
    margin-left: 5px;
}

.icon-sound::before {
    content: '🔊';
    margin-left: 5px;
}

.icon-stats::before {
    content: '📈';
    margin-left: 5px;
}

.icon-more::before {
    content: '•••';
    margin-left: 5px;
}

.icon-dot::before {
    content: '•';
    margin-left: 5px;
}

.icon-lock::before {
    content: '🔒';
}

.icon-cart {
    height: 24px;
    width: 24px;
    background: url( '../icons/cart.svg' ) no-repeat center;
    color: #fff;
    background-size: contain;
    display: inline-block;
}

.icon-cart.green {
    height: 20px;
    width: 20px;
    background: url( '../icons/cart-green.svg' ) no-repeat;
    color: #fff;
    background-size: contain;
    display: inline-block;
    background-position: center center;
    transform: translateY(6px);
}

/* اسپینر لودینگ (اضافه شده برای ریکوئست واقعی) */
.spinner {
    display: none;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid var(--subtle-text);
    border-top: 2px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#modal-cart {
    width: 100%;
    position: fixed;
    left: 32px;
    bottom: 32px;
    max-width: 380px;
    display: none;
}

#modal-cart .inner-box {
    padding: 24px 20px;
    background: #1b1b1b;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}


#modal-cart .inner-box .main {}
#modal-cart .inner-box .main > ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#modal-cart .inner-box .main > ul > li {
    padding: 12px 16px;
    background: #282a2c;
    /*border: 1px solid #555;*/
    direction: ltr;
    text-align: left;
    margin-top: 10px;
    border-radius: 12px;
    font-weight: 300;
    font-size: 15px;
    line-height: 24px;
}

#modal-cart .inner-box .main > ul > li:first-child {
    margin-top: 0;
}

#modal-cart .inner-box .main > ul > li .delete {
    float: right;
    cursor: pointer;
    width: 16px;
    height: 16px;
    display: inline-block;
    background: url( '../icons/delete.svg' ) no-repeat center;
    background-size: contain;
    color: #fff;
    border: none;
    outline: none;
    transform: translateY(4px);
}

#modal-cart .inner-box .footer {
    margin-top: 16px;
}

#modal-cart .inner-box .footer .btn {
    padding: 12px 16px;
    background: #a366d9;
    display: block;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    text-align: center;
    line-height: 20px;
}

.add-to-cart {
    cursor: pointer;
    margin-right: 4px;
}

.position-relative {
    position: relative;
}

#cart-item-count {
    width: 20px;
    height: 20px;
    display: block;
    border-radius: 100%;
    background: #f44336;
    text-align: center;
    position: absolute;
    bottom: -8px;
    right: -20px;
    font-size: 14px;
    font-weight: 700;
}

.check {
    background: url("../icons/check.svg") no-repeat center !important;
    background-size: contain !important;
}

.input-options .option-tag.active {
    background: #a366d9;
    color: #fff;
}

.d-none {
    display: none !important;
}

.icon {
    display: inline-block;
    width: 20px;
    height: 20px;
}

.icon.xl {
    width: 64px;
    height: 64px;
}

.icon.send {
    background: url("../icons/send.svg") no-repeat center !important;
    background-size: contain !important;
    transform: rotate(180deg);
}

#send-ai-prompt {
    position: absolute;
    left: 24px;
    top: 24px;
    padding: 8px 24px;
    background: #a366d9;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    line-height: 20px;
}

.d-flex {
    display: flex;
}

.another-suggestion {
    align-items: center;
    background: var(--input-bg);
    border-radius: 6px;
    padding: 5px 12px;
    margin-left: 10px;
    color: var(--subtle-text);
    cursor: pointer;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.another-suggestion.active {
    background: #a366d9;
    color: #fff;
}

.justify-content-between {
    justify-content: space-between;
}

.ai-suggestions {
    margin-top: 16px;
}

.ai-suggestions .text p {
    margin-bottom: 0;
    margin-left: 12px;
    padding: 5px 0 5px 12px;
    color: #fff;
    white-space: nowrap;
}

.loading {
    left: 0;
    top: 16px;
    position: absolute;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading .spinner {
    display: inline-block;
}

.status-pending {
    background-color: #e0f2fe55;
    color: var(--accent-color);
    animation: pulse 1s infinite alternate;
}
.dot-blue {
    background-color: var(--accent-color) !important;
}
@keyframes pulse {
    from { opacity: 0.6; }
    to { opacity: 0.3; }
}

/**
Added after bootstrap
 */

.navbar-dark .navbar-nav .nav-link {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    padding-left: 15px;
    padding-right: 15px;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #0dcaf0; /* رنگ آبی روشن هنگام هاور */
}

/* استایل لوگو */
.navbar-brand {
    font-weight: 900;
    font-size: 24px;
    margin-left: 20px;
}
.brand-white { color: #fff; }
.brand-blue { color: #0dcaf0; } /* رنگ آبی کلمه هاست */

.domain-list p {
    margin-bottom: 0;
    min-height: 33px;
}

.header-icons {
    cursor: pointer;
}

#modal-cart .minimize {
    position: absolute;
    top: -32px;
    font-size: 12px;
    right: 24px;
    background: #1b1b1b;
    padding: 8px 16px;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    color: #ddd;
}

.suggest-gp {
    overflow-x: scroll;
}

@media (max-width: 1200px) {
    .domain-name {
        max-width: 148px;
    }
}
@media (max-width: 992px) {
    .navbar-nav {
        margin-top: 16px;
        background: linear-gradient(to bottom, #1b1b1b, #000000);
        margin-bottom: 24px !important;
        padding: 8px 0;
    }
    .navbar-dark .navbar-nav .nav-link {
        padding: 16px;
    }
    .navbar-toggler {
        padding: 12px;
    }
    .navbar-toggler:focus {
        box-shadow: none;
    }
    .header-icons {
        position: absolute;
        top: 32px;
        left: 103px;
    }
    .domain-name{
        max-width: 188px;
    }
    .popular-col .domain-name {
        max-width: 500px;
    }
    .results-column {
        margin-bottom: 24px;
    }
}


@media (max-width: 768px) {
    .popular-col .domain-name,
    .domain-name{
        max-width: 350px;
    }
    #main-domain-text {
        font-size: 24px;
        line-height: 32px;
    }
    #main-action-btn {
        padding: 8px 12px;
        font-size: 16px;
    }
    .action-link {
        margin-left: 20px;
    }
    .column-title {
        font-size: 16px;
        line-height: 24px;
    }
}
@media (max-width: 592px ) {
    .search-hero h1 {
        font-size: 24px;
        line-height: 32px;
    }
    .hero-info h2 {
        font-size: 18px;
        line-height: 30px;
    }
    .ai-input, .main-input {
        font-size: 15px;
        line-height: 32px;
    }
    .search-bar-container {
        padding-left: 0;
        padding-right: 0;
    }
    #modal-cart {
        max-width: calc( 100% - 64px );
    }
}

@media (max-width: 400px ) {
    .hero-info,
    .search-hero {
        padding-left: 8px;
        padding-right: 8px;
    }
    .hero-info p {
        line-height: 22px;
    }
    .main-input {
        padding: 8px 12px 12px;
    }
    .ai-input {
        padding: 8px 12px 12px 88px;
    }
    .input-options {
        padding: 6px 12px 8px
    }
    #ai-btn {
        margin: 0;
    }
    #ai-btn .icon-dot,
    #whois-btn .icon-dot {
        display: none;
    }
    .domain-item {
        flex-wrap: wrap;
    }
    .main-domain-text {
        margin-bottom: 16px;
    }
    #send-ai-prompt {
        left: 15px;
        top: 16px;
        padding: 8px 16px;
    }

}

@media (max-width: 370px ) {
    .domain-name-box {
        width: 100%;
        margin-bottom: 16px;
    }
    .domain-item .action-box {
        text-align: right;
        margin-top: 8px;
        width: 100%;
    }

}