/* style.css */

:root {
    --bg-color: #0b1215;
    --card-bg: rgba(11, 18, 21, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-border-active: rgba(45, 128, 97, 0.5);
    
    --primary-color: #205a45;
    --primary-glow: rgba(32, 90, 69, 0.2);
    --secondary-color: rgba(11, 18, 21, 0.85);
    --text-color: #e2e8e5;
    --text-muted: #8b9994;
    
    --accent-color: #2d8061;
    --accent-glow: rgba(45, 128, 97, 0.3);
    
    --success-color: #3df0af;
    --success-glow: rgba(61, 240, 175, 0.2);
    --warning-color: #ffb74d;
    --danger-color: #ff5252;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100vh;
    height: -webkit-fill-available;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

/* Background gradient blobs */
.bg-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.08;
    pointer-events: none;
}

.bg-glow-1 {
    background: var(--accent-color);
    top: -10%;
    left: -10%;
}

.bg-glow-2 {
    background: var(--primary-color);
    bottom: 10%;
    right: -10%;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100vh;
    height: -webkit-fill-available;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

.content-container {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 90px; /* Space for the bottom navbar */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.content-container::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

/* Glassmorphism utility card */
.glass-card {
    background: rgba(11, 18, 21, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.03);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.05);
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.logo span {
    color: var(--accent-color);
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(61, 240, 240, 0.1);
    border: 1px solid rgba(61, 240, 240, 0.25);
    color: var(--accent-color);
}

.status-online {
    background: rgba(61, 240, 175, 0.1);
    border-color: rgba(61, 240, 175, 0.25);
    color: var(--success-color);
}

/* Debug Banner */
.debug-banner {
    background: rgba(255, 183, 77, 0.15);
    border: 1px solid rgba(255, 183, 77, 0.3);
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 0.8rem;
    text-align: center;
    color: var(--warning-color);
}

.debug-banner span {
    font-weight: bold;
    text-decoration: underline;
}

/* Tab contents */
.tab-content {
    display: none;
    flex-direction: column;
    gap: 16px;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-panel {
    padding: 24px 20px;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 18px;
    text-align: left;
    color: #fff;
}

.section-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Search Box */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(5, 18, 18, 0.5);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 0 14px;
    transition: all 0.25s ease;
}

.input-wrapper:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(61, 240, 240, 0.2);
}

.input-wrapper .prefix {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 2px;
}

.input-wrapper input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    width: 100%;
    padding: 12px 0;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
}

.btn-primary {
    background: var(--accent-color);
    color: #fff;
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2),
                0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    background: #349470;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3),
                0 6px 16px rgba(0, 0, 0, 0.25);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 14px 20px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.btn-secondary:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.btn-full {
    width: 100%;
}

.btn-glow {
    position: relative;
}

.btn-glow:active {
    transform: scale(0.97);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Dividers */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 18px 0;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(27, 160, 160, 0.15);
}

.divider:not(:empty)::before {
    margin-right: .75em;
}

.divider:not(:empty)::after {
    margin-left: .75em;
}

/* Result Panel */
.result-panel {
    background: rgba(61, 240, 175, 0.05);
    border: 1px solid var(--success-glow);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 18px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-panel.taken {
    background: rgba(255, 82, 82, 0.05);
    border-color: rgba(255, 82, 82, 0.3);
}

.result-panel.on_sale {
    background: rgba(255, 183, 77, 0.05);
    border-color: rgba(255, 183, 77, 0.3);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.checked-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}

.badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    color: #051212;
    background: var(--success-color);
}

.taken .badge {
    background: var(--danger-color);
    color: #fff;
}

.on_sale .badge {
    background: var(--warning-color);
    color: #051212;
}

.result-details {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.result-details p {
    margin-bottom: 4px;
}

.result-details strong {
    color: #fff;
}

.text-glow {
    color: var(--accent-color) !important;
    font-weight: 600;
}

/* Filters panel accordion */
.filters-panel {
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
}

.panel-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

.chevron-icon {
    transition: transform 0.3s ease;
}

.filters-panel.collapsed .chevron-icon {
    transform: rotate(-90deg);
}

.panel-body {
    padding: 0 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: max-height 0.3s ease-out;
    max-height: 1500px;
}

.filters-panel.collapsed .panel-body {
    max-height: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.label-with-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-badge {
    font-size: 0.65rem;
    color: var(--accent-color);
    background: rgba(61, 240, 240, 0.1);
    border: 1px solid rgba(61, 240, 240, 0.2);
    padding: 1px 6px;
    border-radius: 4px;
}

/* Custom Select Dropdowns */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

.custom-select {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 18, 18, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 12px;
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.custom-select:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.custom-select.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(61, 240, 240, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.custom-select-icon {
    transition: transform 0.3s ease;
}

.custom-select.active .custom-select-icon {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(6, 15, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--accent-color);
    border-top: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    z-index: 100;
    max-height: 220px;
    overflow-y: auto;
    display: none;
    flex-direction: column;
}

.custom-select.active + .custom-select-options {
    display: flex;
}

/* Custom Scrollbar for dropdowns */
.custom-select-options::-webkit-scrollbar {
    width: 6px;
}
.custom-select-options::-webkit-scrollbar-track {
    background: transparent;
}
.custom-select-options::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.custom-option {
    padding: 10px 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background: rgba(61, 240, 240, 0.1);
    color: #fff;
}

.custom-option.selected {
    color: var(--accent-color);
    background: rgba(61, 240, 240, 0.05);
    font-weight: 600;
}

/* Base inputs */
.glass-input {
    background: rgba(5, 18, 18, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 12px;
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    width: 100%;
    transition: border-color 0.25s;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.glass-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(61, 240, 240, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}
    margin-top: 6px;
}

/* Checkbox and toggle details */
.row-group {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: rgba(27, 160, 160, 0.05);
    border: 1px dashed rgba(27, 160, 160, 0.2);
    padding: 10px 14px;
    border-radius: 12px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-color);
    cursor: pointer;
}

.checkbox-wrapper label {
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
}

.select-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.glass-select-sm {
    background: rgba(5, 18, 18, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px 8px;
    color: #fff;
    font-size: 0.8rem;
    outline: none;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

/* Sync Indicator */
.sync-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--success-color);
    opacity: 0.85;
    margin-top: 6px;
    background: rgba(61, 240, 175, 0.08);
    padding: 6px;
    border-radius: 8px;
}

/* Profile page styling */
.text-center {
    text-align: center;
}

.profile-avatar-container {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: 3px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 800;
    color: #0b1215;
    font-family: 'Outfit', sans-serif;
    user-select: none;
    transition: transform 0.5s ease;
}

.profile-avatar:hover {
    transform: rotate(10deg) scale(1.05);
}

.profile-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.profile-username {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 20px;
}

.inner-card {
    padding: 14px 18px;
    border-radius: 14px;
    border-color: rgba(27, 160, 160, 0.15);
    margin-bottom: 14px;
    background: rgba(5, 18, 18, 0.3);
}

.plan-card {
    text-align: left;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.plan-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.plan-value {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 3px 10px;
    border-radius: 6px;
}

.plan-free {
    background: rgba(139, 176, 176, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(139, 176, 176, 0.2);
}

.plan-plus {
    background: rgba(45, 128, 97, 0.15);
    color: var(--accent-color);
    border: 1px solid var(--card-border);
}

.plan-premium {
    background: linear-gradient(135deg, rgba(45, 128, 97, 0.2), rgba(32, 90, 69, 0.2));
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.plan-expiry {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Daily Limits Card */
.limit-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.limit-header span:last-child {
    color: #fff;
    font-weight: 700;
}

.progress-bar-bg {
    height: 8px;
    background: rgba(5, 18, 18, 0.6);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.stat-box {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    padding: 16px 10px;
}

.stat-val {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}

.stat-lbl {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

/* Archive Caught List */
.archive-section {
    margin-top: 10px;
}

.archive-section .panel-subtitle {
    margin-bottom: 10px;
}

.catches-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom scrollbar for caught list */
.catches-list::-webkit-scrollbar {
    width: 4px;
}

.catches-list::-webkit-scrollbar-track {
    background: rgba(5, 18, 18, 0.2);
    border-radius: 4px;
}

.catches-list::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}

.catch-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 18, 18, 0.25);
    border: 1px solid rgba(27, 160, 160, 0.1);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.85rem;
}

.catch-item-name {
    font-weight: 600;
    color: #fff;
}

.catch-item-price {
    font-weight: 700;
    color: var(--accent-color);
}

.empty-list {
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border: 1px dashed rgba(27, 160, 160, 0.15);
    border-radius: 10px;
}

/* Wallet Stub Icon */
.stub-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(27, 160, 160, 0.05);
    border: 1px dashed rgba(27, 160, 160, 0.25);
    margin: 20px 0;
}

.disabled {
    opacity: 0.4;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.stat-row span:first-child {
    color: var(--text-muted);
}

.stat-row span:last-child {
    color: #fff;
    font-weight: 600;
}

/* Toast Messages */
.toast {
    position: fixed;
    bottom: 108px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(5, 18, 18, 0.9);
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 15px rgba(61, 240, 240, 0.2);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 30px;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Bottom Glass Navigation Bar */
.bottom-nav-container {
    position: fixed;
    bottom: 8px;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 0 16px;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.bottom-nav {
    width: 100%;
    max-width: 280px; /* Increased width for a wider bottom panel */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 60px; /* Increased height to accommodate larger buttons */
    align-items: center;
    border-radius: 30px; /* Half of height for perfect rounded corners */
    padding: 0 4px;
    pointer-events: auto;
}

.glass-nav {
    background: rgba(11, 18, 21, 0.7); /* slightly darker for better contrast */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

.nav-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    padding: 0;
}

/* Base style for all circle buttons on bottom nav */
.nav-icon-circle {
    width: 52px; /* Increased size to look larger and reduce empty spacing */
    height: 52px;
    border-radius: 50%;
    background: rgba(11, 18, 21, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Hover state */
.nav-item:hover .nav-icon-circle {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(45, 128, 97, 0.1);
}

/* Active navigation item */
.nav-item.active .nav-icon-circle {
    background: rgba(45, 128, 97, 0.25);
    color: var(--success-color); /* Bright premium glow green color for active item */
    border-color: var(--accent-color);
    box-shadow: 0 0 12px rgba(45, 128, 97, 0.3);
}

.nav-item svg {
    width: 22px; /* Scaled up icon size to fit larger circle */
    height: 22px;
    transition: transform 0.25s ease;
}

.nav-item:active svg {
    transform: scale(0.85);
}

/* ==========================================
   AI SEARCH SECTION STYLES
   ========================================== */

/* Mode Selector Segmented Control */
.mode-selector {
    display: flex;
    background: rgba(5, 18, 18, 0.5);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 3px;
    margin-bottom: 18px;
}

.mode-btn {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.mode-btn.active {
    background: var(--accent-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(45, 128, 97, 0.25);
}

/* Custom Instructions Textarea */
.glass-textarea {
    background: rgba(5, 18, 18, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    width: 100%;
    height: 90px;
    resize: none;
    transition: border-color 0.25s;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.glass-textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(61, 240, 240, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.textarea-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
    margin-bottom: 12px;
}

/* Checklist for generated usernames */
.ai-results-panel {
    background: rgba(11, 18, 21, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeIn 0.4s ease-out;
}

.ai-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.checklist-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}

.checklist-container::-webkit-scrollbar {
    width: 4px;
}
.checklist-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.checklist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(5, 18, 18, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checklist-item:hover {
    background: rgba(27, 160, 160, 0.04);
    border-color: rgba(27, 160, 160, 0.15);
}

.checklist-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checklist-checkbox {
    width: 15px;
    height: 15px;
    accent-color: var(--accent-color);
    cursor: pointer;
}

.checklist-username {
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
}

.checklist-status {
    font-size: 0.75rem;
    font-weight: 600;
}

.checklist-status.loading {
    color: var(--text-muted);
}

.checklist-status.free {
    color: var(--success-color);
    text-shadow: 0 0 6px rgba(61, 240, 175, 0.3);
}

.checklist-status.taken {
    color: var(--danger-color);
}

.checklist-status.error {
    color: var(--warning-color);
}

.ai-actions-row {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

/* Advanced Mode Streaming Logs */
.stream-logs {
    background: rgba(5, 18, 18, 0.6);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px;
    font-family: 'Inter', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    height: 160px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.stream-logs::-webkit-scrollbar {
    width: 4px;
}
.stream-logs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.log-line {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
    animation: slideDown 0.2s ease-out;
}

.log-info {
    color: var(--text-muted);
}

.log-generating {
    color: var(--accent-color);
}

.log-checking {
    color: #fff;
}

.log-free {
    color: var(--success-color);
}

.log-taken {
    color: var(--danger-color);
}

.log-error {
    color: var(--warning-color);
}

.log-price-tag {
    background: rgba(61, 240, 175, 0.15);
    border: 1px solid var(--success-glow);
    border-radius: 4px;
    padding: 1px 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--success-color);
}

/* Subscription Locked Wrapper & Overlay */
.locked-container {
    position: relative;
    min-height: 180px;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 18, 21, 0.82);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 10;
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

.lock-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 183, 77, 0.1);
    border: 1px solid rgba(255, 183, 77, 0.3);
    color: var(--warning-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(255, 183, 77, 0.15);
}

.lock-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.lock-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.4;
    max-width: 260px;
}

.lock-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
}

/* Wallet Styles */
.wallet-card {
    border-color: rgba(27, 160, 160, 0.15);
    background: rgba(5, 18, 18, 0.3);
}

.promo-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ==========================================
   MOBILE RESPONSIVENESS AND ADAPTIVITY
   ========================================== */

/* For smaller screens like iPhone SE / older Androids (width <= 480px) */
@media (max-width: 480px) {
    .app-container {
        padding: 12px;
        gap: 12px;
    }
    
    .main-panel {
        padding: 20px 14px;
    }
    
    .panel-body {
        padding: 0 14px 16px 14px;
    }
    
    .app-header {
        padding: 12px 16px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .btn {
        font-size: 0.9rem;
    }
    
    .glass-input, .glass-textarea, .custom-select, .custom-option {
        font-size: 16px; /* Prevents iOS auto-zoom behavior on text inputs */
    }
}

/* For extremely narrow screens (width <= 360px) */
@media (max-width: 360px) {
    .app-container {
        padding: 8px;
        gap: 10px;
    }
    
    .main-panel {
        padding: 16px 10px;
    }
    
    .panel-body {
        padding: 0 10px 12px 10px;
    }
    
    .app-header {
        padding: 10px 12px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }
    
    .section-desc {
        font-size: 0.8rem;
        margin-bottom: 14px;
    }
    
    .stats-grid {
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .stat-box {
        padding: 10px 6px;
    }
    
    .stat-val {
        font-size: 1.05rem;
    }
    
    .inner-card {
        padding: 12px 14px;
        margin-bottom: 10px;
    }
    
    .promo-input-group {
        gap: 6px;
    }
    
    .btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

/* For short screen heights (e.g., standard viewport mode in Telegram) */
@media (max-height: 600px) {
    .app-container {
        gap: 10px;
    }
    
    .main-panel {
        padding-top: 14px;
        padding-bottom: 14px;
    }
    
    .profile-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .profile-username {
        margin-bottom: 10px;
    }
    
    .stub-icon {
        width: 70px;
        height: 70px;
        margin: 10px 0;
    }
}

/* ==========================================
   VECTOR ICONS STYLE RULES
   ========================================== */
.icon {
    display: inline-block;
    vertical-align: middle;
    margin-top: -2px;
}
.icon-warning {
    color: var(--warning-color);
}
.icon-sparkles {
    color: var(--success-color);
}
.icon-celebrate {
    color: var(--success-color);
}
.icon-save {
    color: var(--accent-color);
}
.icon-star {
    color: var(--warning-color);
}
.icon-info {
    color: var(--text-muted);
}
.icon-bot {
    color: var(--accent-color);
}
.icon-search {
    color: var(--text-color);
}
.icon-close {
    color: var(--danger-color);
}
.icon-ruler {
    color: var(--text-muted);
}
.icon-money {
    color: var(--success-color);
}
.icon-flag {
    color: var(--text-muted);
}

/* Hide advanced filters for Free/non-sub users */
.filters-panel.basic-only .advanced-filter {
    display: none !important;
}

/* Hide AI mode selector for Free/non-sub users */
.ai-basic-only .mode-selector {
    display: none !important;
}

