/* Search Box Styles */
.search-box-wrapper {
    width: 100%;
    max-width: 350px;
}

.search-input-group {
    background: rgb(71, 102, 138);
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 5px 15px;
    transition: all 0.3s ease;
}

.search-input-group:focus-within {
    background: rgba(139, 160, 185, 0.8);
    border-color: #0084c6;
    box-shadow: 0 0 15px rgba(0, 132, 198, 0.2);
}

.search-input {
    background: transparent;
    border: none;
    font-size: 0.95rem;
    width: 100%;
    padding: 5px 0;
    outline: none !important;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-submit-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.search-submit-btn:hover {
    transform: scale(1.1);
}

.search-submit-btn:focus {
    outline: none;
}

.search-icon {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-left: 10px;
}

.search-clear {
    color: rgba(255, 255, 255, 0.4);
    padding: 5px;
    transition: color 0.2s;
    text-decoration: none !important;
}

.search-clear:hover {
    color: #fff;
}

.char-item-wrapp {
    margin-bottom: 20px;
    text-align: center;
}

.char-item {
    height: 330px;
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 15px;
    padding: 10px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.char-img {
    display: block;
    margin-bottom: 8px;
    height: 228px;
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.char-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 0, 0.2, 1);
}

.char-desc-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 3;
    border-radius: 15px;
}

.char-small-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.char-small-card:hover .char-desc-overlay {
    opacity: 1;
}

.char-desc-text {
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    -webkit-box-orient: vertical;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.char-small-card:hover .char-img img {
    transform: scale(1.15);
}

.char-img.no-image {
    background: radial-gradient(circle, #e0eafc, #cfdef3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-weight: bold;
}

.dark-mode .char-img.no-image {
    background: radial-gradient(circle, #1e293b, #0f172a);
    color: #cbd5e1;
}

.char-name {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-color);
}

.chat-link {
    display: block;
    font-weight: 700;
    background: var(--primary-color);
    color: #fff !important;
    border-radius: 13px;
    box-shadow: 0 4px 12px rgba(0, 132, 198, 0.4);
    width: 100%;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.chat-link:hover {
    background: var(--primary-hover);
    color: #fff !important;
}

.nsfw-badge-top {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ff982a;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 152, 42, 0.3);
    z-index: 2;
    pointer-events: none;
}

.premium-badge-top {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg,
            rgba(255, 215, 0, 0.9),
            rgba(255, 165, 0, 0.9));
    color: #000;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    z-index: 2;
    pointer-events: none;
    text-transform: uppercase;
}

.exclusive-badge-top {
    position: absolute;
    top: 40px;
    /* Offset from premium */
    left: 12px;
    background: linear-gradient(135deg,
            rgba(147, 112, 219, 0.9),
            rgba(75, 0, 130, 0.9));
    color: #fff;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(147, 112, 219, 0.4);
    z-index: 2;
    pointer-events: none;
    text-transform: uppercase;
}

.char-edit-link {
    font-size: 0.85rem;
    margin-top: 5px;
    display: inline-block;
    border-radius: 10px;
}

.char-edit-link:hover {
    color: var(--primary-color);
}

/* Hero Section Premium Styles */
.hero-section {
    padding: 1rem;
    background:
        radial-gradient(circle at top right,
            rgba(0, 132, 198, 0.15),
            transparent 50%),
        radial-gradient(circle at bottom left,
            rgba(157, 80, 187, 0.1),
            transparent 50%);
    border-radius: 20px;
    margin: 1rem 0 1rem 0;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-top: 0.3rem;
    margin-bottom: 12px;
    line-height: 1.3;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.btn-hero-create {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white !important;
    border: none;
    padding: 10px 15px;
    font-weight: 700;
    border-radius: 15px;
    box-shadow: 0 10px 15px rgba(34, 197, 94, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-hero-create:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(34, 197, 94, 0.4);
}

.btn-hero-outline {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 25px;
    font-weight: 600;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.2s;
    color: var(--text-color);
}

.btn-hero-outline.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}

.btn-hero-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}

.hero-link {
    font-weight: 600;
    color: var(--primary-color);
    margin-left: 10px;
    transition: opacity 0.2s;
}

.hero-link:hover {
    opacity: 0.8;
}

.hero-browser-wrapper {
    padding: 20px 0;
}

.hero-glass-card {
    background: linear-gradient(135deg, #fafbff 0%, #e8f4ff 90%);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    color: var(--text-color);
    box-shadow: -1px 9px 9px 0 rgba(0, 0, 0, 0.2);
}

.dark-mode .hero-title {
    background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dark-mode .hero-section {
    background:
        radial-gradient(circle at top right,
            rgba(56, 189, 248, 0.1),
            transparent 50%),
        radial-gradient(circle at bottom left,
            rgba(157, 80, 187, 0.05),
            transparent 50%);
    border-color: rgba(255, 255, 255, 0.05);
}

.nsfw-hint {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    color: white;
}

.nsfw-hint p {
    margin: 0;
    font-weight: 600;
    font-size: 14px;
}

.nsfw-hint p {
    margin: 0;
    font-weight: 600;
    font-size: 14px;
}

.nsfw-hint-text {
    color: #f07474;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Filter Pills & Categories */
.filter-pills,
.category-pills {
    gap: 8px;
    display: flex;
}

.filter-pill,
.category-pill {
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-color);
    text-decoration: none !important;
}

.dark-mode .filter-pill,
.dark-mode .category-pill {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.filter-pill:hover,
.category-pill:hover {
    background: rgba(0, 132, 198, 0.1);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.filter-pill.active,
.category-pill.active {
    background: var(--primary-color);
    color: #fff !important;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 132, 198, 0.2);
}

.scope-tabs {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px;
    border-radius: 14px;
}

.scope-tab {
    padding: 6px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
    text-decoration: none !important;
}

.scope-tab.active {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dark-mode .scope-tabs {
    background: rgba(255, 255, 255, 0.05);
}

.dark-mode .scope-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

@media (max-width: 991px) {
    .category-pills-wrapper {
        overflow-x: auto;
        padding-bottom: 5px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .category-pills-wrapper::-webkit-scrollbar {
        display: none;
    }

    .category-pills {
        justify-content: flex-start !important;
    }
}


@media (max-width: 720px) {
    .category-pills {
        flex-wrap: wrap;
        justify-content: flex-start !important;
    }

    .char-item{
        height: 300px;
    }


    .char-img {
        height: 200px;
    }
}


@media (max-width: 580px) {

    .char-item{
        height: 280px;
    }

    .char-img {
        height: 180px;
    }

    .hero-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .char-img {
        height: 160px;
    }
}