* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    padding: 0 20px;
}

.container {
    max-width: 50%;
    margin: 0 auto;
    background: transparent;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    overflow: visible;
}

/* Header */
.header::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to top, transparent, rgba(245, 245, 247, 1));
    pointer-events: none;
}

.header::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -20px;
    right: -20px;
    height: 100px;
    background: #f5f5f7;
    pointer-events: none;
    z-index: -1;
}

.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 16px 24px;
    margin-bottom: 0;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 8px;
    z-index: 200;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.logo-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.logo-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    font-style: normal;
    color: #000;
    letter-spacing: 0.5px;
}

.logo-subtitle {
    font-size: 12px;
    color: #86868b;
    font-weight: 400;
}

.header-balances {
    display: none;
    gap: 12px;
    align-items: center;
}

.header-balances.visible {
    display: flex;
}

.balance-badge {
    background: linear-gradient(135deg, #5e5ce6 0%, #4c4aba 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.balance-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(94, 92, 230, 0.4);
}

.balance-badge #balance {
    font-weight: 700;
}

.leads-badge {
    background: linear-gradient(135deg, #34c759 0%, #30d158 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
}

.leads-badge #totalLeads {
    font-weight: 700;
}

.install-button {
    background: linear-gradient(135deg, #007AFF, #5AC8FA);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
    transition: all 0.2s ease;
}

.install-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

.install-button:active {
    transform: translateY(0);
}

/* Feed */
.feed {
    flex: 1;
    padding: 20px 0 400px 0;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e5e7;
    border-top-color: #5e5ce6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Purchased Leads Section */
.purchased-leads-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.purchased-leads-section h4 {
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 1.1em;
}

/* Leads Modal */
.leads-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    width: 1000px;
}

.leads-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.summary-label {
    font-size: 0.9em;
    color: var(--secondary-text-color);
    margin-bottom: 5px;
}

.summary-value {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--text-color);
}

.leads-table-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.leads-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--card-bg);
}

.leads-table th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    position: sticky;
    top: 0;
    z-index: 10;
}

.leads-table th:first-child {
    border-top-left-radius: 12px;
}

.leads-table th:last-child {
    border-top-right-radius: 12px;
}

.leads-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.leads-table tbody tr:hover {
    background-color: #f8f9fa;
}

.leads-table tbody tr:last-child td {
    border-bottom: none;
}

.leads-table .loading {
    text-align: center;
    color: var(--secondary-text-color);
    font-style: italic;
    padding: 30px;
}

.lead-text {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
}

.lead-text:hover {
    white-space: normal;
    overflow: visible;
    background-color: var(--card-bg);
    padding: 8px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

.lead-price {
    font-weight: 600;
    color: var(--accent-color);
}

.lead-price.free {
    color: var(--secondary-text-color);
}

.lead-date {
    font-size: 0.9em;
    color: var(--secondary-text-color);
}

.lead-type {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
}

.lead-type.bonus {
    background-color: rgba(48, 209, 88, 0.1);
    color: var(--accent-color);
}

.lead-type.paid {
    background-color: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

.lead-action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.lead-action-btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.lead-action-btn.primary:hover {
    background-color: var(--secondary-color);
}

.lead-action-btn.secondary {
    background-color: var(--bg-color);
    color: var(--secondary-text-color);
    border: 1px solid var(--border-color);
}

.lead-action-btn.secondary:hover {
    background-color: var(--border-color);
}

/* Load More Button */
.load-more-button {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 16px 24px;
    margin: 24px 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    position: relative;
    z-index: 10;
}

.load-more-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.load-more-button:active {
    transform: translateY(0);
}

.load-more-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.load-more-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.load-more-content svg {
    transition: transform 0.3s ease;
}

.load-more-button:hover .load-more-content svg {
    transform: scale(1.1);
}

/* Loading state for load more button */
.load-more-button.loading {
    pointer-events: none;
    opacity: 0.8;
}

.load-more-button.loading .loading-spinner {
    animation: spin 1s linear infinite;
}

.load-more-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.load-more-button:disabled:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

/* Message Card */
.message-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s;
    animation: fadeIn 0.3s ease-in;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

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

.message-card:hover {
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.16);
    transform: translateY(-2px);
}

.message-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.message-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 20px;
    flex-shrink: 0;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.message-info {
    flex: 1;
    min-width: 0;
}

.message-author {
    font-weight: 600;
    font-size: 16px;
    color: #000;
    margin-bottom: 2px;
}

.message-source {
    font-size: 13px;
    color: #6e6e73;
    display: flex;
    align-items: center;
    gap: 4px;
}

.message-similarity {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.message-text {
    font-size: 15px;
    line-height: 1.5;
    color: #1d1d1f;
    margin-bottom: 12px;
}

.message-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f5f5f7;
}

.message-date {
    font-size: 13px;
    color: #6e6e73;
}

.message-actions {
    display: flex;
    gap: 8px;
}

.action-button {
    padding: 8px 16px;
    border: 1px solid #e5e5e7;
    background: white;
    color: #000;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.action-button:hover {
    background: #f5f5f7;
    border-color: #d2d2d7;
}

.action-button.primary {
    background: #5e5ce6;
    color: white;
    border-color: #5e5ce6;
}

.action-button.primary:hover {
    background: #4c4aba;
}

.action-button.success {
    background: #34c759;
    color: white;
    border-color: #34c759;
}

.action-button.danger {
    background: #ff3b30;
    color: white;
    border-color: #ff3b30;
}

/* Search Container */
.search-container::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom, transparent, rgba(245, 245, 247, 1));
    pointer-events: none;
}

.search-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    max-width: 50%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
    z-index: 200;
}

.search-container::after {
    content: '';
    position: absolute;
    bottom: -200px;
    left: -20px;
    right: -20px;
    height: 200px;
    background: #f5f5f7;
    pointer-events: none;
    z-index: -1;
}

.search-box {
    display: flex;
    gap: 8px;
    align-items: center;
    background: #f5f5f7;
    border-radius: 24px;
    padding: 8px 8px 8px 20px;
    transition: all 0.2s;
}

.search-box:focus-within {
    background: #e8e8ed;
    box-shadow: 0 0 0 4px rgba(94, 92, 230, 0.1);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    outline: none;
    color: #000;
}

.search-input::placeholder {
    color: #6e6e73;
}

/* Динамическая кнопка */
.dynamic-button {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #6e6e73;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
}

.dynamic-button:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

/* Состояние микрофона (по умолчанию) */
.dynamic-button.mic-mode {
    background: transparent;
    color: #6e6e73;
}

.dynamic-button.mic-mode:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

.dynamic-button.mic-mode.recording {
    background: #ff3b30;
    color: white;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Состояние поиска (когда есть текст) */
.dynamic-button.search-mode {
    background: #5e5ce6;
    color: white;
    transform: scale(1.05);
}

.dynamic-button.search-mode:hover {
    background: #4c4aba;
    transform: scale(1.1);
}

/* Анимация переключения иконок */
.dynamic-button svg {
    transition: all 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.dynamic-button .mic-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.dynamic-button .search-icon {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
}

.dynamic-button.search-mode .mic-icon {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
}

.dynamic-button.search-mode .search-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Старые стили для совместимости */
.voice-button,
.search-button {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #6e6e73;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.voice-button:hover,
.search-button:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

.voice-button.recording {
    background: #ff3b30;
    color: white;
    animation: pulse 1.5s ease-in-out infinite;
}

.search-button {
    background: #5e5ce6;
    color: white;
}

.search-button:hover {
    background: #4c4aba;
}

.recording-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
    color: #ff3b30;
    font-size: 14px;
    font-weight: 500;
}

.recording-indicator.active {
    display: flex;
}

.recording-dot {
    width: 8px;
    height: 8px;
    background: #ff3b30;
    border-radius: 50%;
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.terms-notice {
    text-align: center;
    margin-top: 12px;
    font-size: 11px;
    color: #86868b;
    line-height: 1.4;
}

.terms-notice a {
    color: #5e5ce6;
    text-decoration: none;
}

.terms-notice a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1400px) {
    .container {
        max-width: 70%;
    }
    
    .search-container {
        width: 70%;
        max-width: 70%;
    }
}

@media (max-width: 1024px) {
    .container {
        max-width: 90%;
    }
    
    .search-container {
        width: 90%;
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 4px 0;
    }
    
    .header {
        border-radius: 16px;
        top: 4px;
        margin-bottom: 4px;
        padding: 12px 16px;
        margin-left: 0;
        margin-right: 0;
    }
    
    .search-container {
        width: calc(100% - 16px);
        max-width: calc(100% - 16px);
        left: 8px;
        right: 8px;
        transform: none;
        bottom: 8px;
        padding: 12px 16px;
        border-radius: 16px;
        margin: 0;
    }
    
    .header-content {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .logo-img {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        object-fit: cover;
    }
    
    .logo-text {
        font-size: 18px;
        font-style: normal;
    }
    
    .logo-subtitle {
        font-size: 9px;
    }
    
    .header-balances {
        gap: 8px;
        flex-wrap: wrap;
        width: 100%;
        justify-content: space-between;
    }
    
    .balance-badge {
        padding: 8px 12px;
        font-size: 11px;
        flex: 1;
        min-width: 120px;
        text-align: center;
        border-radius: 12px;
        background: linear-gradient(135deg, #007AFF 0%, #5AC8FA 100%);
        color: white;
        font-weight: 600;
        box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
    }
    
    .leads-badge {
        padding: 8px 12px;
        font-size: 11px;
        background: linear-gradient(135deg, #34c759 0%, #30d158 100%);
        color: white;
        border-radius: 12px;
        font-weight: 600;
        box-shadow: 0 2px 8px rgba(52, 199, 89, 0.3);
        min-width: 80px;
        text-align: center;
    }
    
    .install-button {
        padding: 8px 12px;
        font-size: 11px;
        border-radius: 12px;
        min-width: 80px;
        justify-content: center;
    }
    
    .feed {
        padding: 16px 0 400px 0;
    }
    
    .message-card {
        padding: 12px;
        border-radius: 12px;
        margin-bottom: 12px;
    }
    
    .search-box {
        padding: 6px 6px 6px 16px;
    }
    
    .search-input {
        font-size: 14px;
    }
    
    .dynamic-button {
        width: 36px;
        height: 36px;
    }
    
    .voice-button, .search-button {
        width: 36px;
        height: 36px;
    }
    
    .terms-notice {
        font-size: 10px;
        margin-top: 8px;
    }
    
    .modal {
        padding: 8px;
    }
    
    .modal-content {
        max-height: calc(100vh - 16px);
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 16px 20px 12px;
    }
    
    .modal-body {
        padding: 0 20px 20px;
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .package-button {
        padding: 16px 12px;
    }
    
    .package-amount {
        font-size: 14px;
    }
    
    .package-price {
        font-size: 18px;
    }
    
    .package-per-lead {
        font-size: 11px;
    }
    
    .custom-amount {
        gap: 6px;
        margin-top: 12px;
    }
    
    #customAmount {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .topup-button {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 70px;
    }
    
    .topup-section {
        margin-bottom: 20px;
    }
    
    .leads-section {
        margin-top: 20px;
        padding-top: 16px;
    }
}

/* Intro Cards */
.intro-card {
    background: white;
    border-radius: 20px;
    padding: 20px 24px;
    margin-bottom: 12px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.intro-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1d1d1f;
}

.intro-card p {
    font-size: 15px;
    line-height: 1.6;
    color: #1d1d1f;
    margin-bottom: 12px;
}

.intro-card p:last-child {
    margin-bottom: 0;
}

.intro-card ul {
    margin: 12px 0;
    padding-left: 24px;
}

.intro-card li {
    font-size: 15px;
    line-height: 1.8;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.intro-card strong {
    font-weight: 600;
    color: #1d1d1f;
}

/* Auth Message Card */
.auth-message-card {
    background: white;
    border-radius: 20px;
    padding: 20px 24px;
    margin-bottom: 12px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}

.auth-message-card:hover {
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.16);
    transform: translateY(-2px);
}

.auth-message-content h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1d1d1f;
}

.auth-message-content p {
    font-size: 15px;
    line-height: 1.6;
    color: #6e6e73;
    margin-bottom: 20px;
}

.auth-card-button {
    background: linear-gradient(135deg, #0088cc 0%, #005fa3 100%);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(0, 136, 204, 0.3);
}

.auth-card-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 136, 204, 0.4);
}

.auth-card-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Auth Screen (waiting/success states) */
.auth-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 48px 40px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.auth-card h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1d1d1f;
}

.auth-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1d1d1f;
}

.auth-card p {
    font-size: 16px;
    line-height: 1.5;
    color: #6e6e73;
    margin-bottom: 24px;
}

.auth-card.waiting {
    padding: 60px 40px;
}

.auth-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #0088cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.auth-note {
    font-size: 14px !important;
    color: #86868b !important;
    margin-top: 24px !important;
    margin-bottom: 12px !important;
}

.bot-link {
    display: inline-block;
    color: #0088cc;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    padding: 12px 24px;
    border: 2px solid #0088cc;
    border-radius: 12px;
    transition: all 0.2s;
}

.bot-link:hover {
    background: #0088cc;
    color: white;
    transform: translateY(-2px);
}

.auth-card.success {
    padding: 60px 40px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #34c759 0%, #30d158 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    margin: 0 auto 24px;
    box-shadow: 0 4px 24px rgba(52, 199, 89, 0.3);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6e6e73;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #1d1d1f;
}

.empty-state p {
    font-size: 15px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in;
    padding: 16px;
    box-sizing: border-box;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #86868b;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f5f5f7;
    color: #1d1d1f;
}

.modal-body {
    padding: 28px;
}

.profile-info {
    margin-bottom: 32px;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.profile-row:last-child {
    border-bottom: none;
}

.profile-label {
    font-size: 15px;
    color: #86868b;
    font-weight: 500;
}

.profile-value {
    font-size: 16px;
    color: #1d1d1f;
    font-weight: 600;
}

.balance-value {
    color: #5e5ce6;
    font-size: 18px;
}

.topup-section {
    margin-top: 24px;
}

.topup-section h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 16px;
}

.topup-amounts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.amount-button {
    background: #f5f5f7;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.2s;
}

.amount-button:hover {
    background: #e8e8ed;
}

.amount-button.selected {
    background: #e8ebff;
    border-color: #5e5ce6;
    color: #5e5ce6;
}

.custom-amount {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

#customAmount {
    flex: 1;
    border: 2px solid #e8e8ed;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    outline: none;
    transition: all 0.2s;
    min-width: 0;
}

#customAmount:focus {
    border-color: #5e5ce6;
}

.topup-button {
    background: linear-gradient(135deg, #5e5ce6 0%, #4c4aba 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    min-width: 80px;
}

.topup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(94, 92, 230, 0.4);
}

.topup-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Leads Section */
.leads-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.leads-section h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.leads-info {
    font-size: 14px;
    color: #6e6e73;
    margin-bottom: 16px;
    line-height: 1.5;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.package-button {
    background: white;
    border: 2px solid #e8e8ed;
    border-radius: 16px;
    padding: 20px 16px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.package-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #5e5ce6;
}

.package-button.popular {
    border-color: #5e5ce6;
    background: linear-gradient(135deg, #f5f4ff 0%, #ffffff 100%);
}

.package-button.best {
    border-color: #34c759;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.package-badge {
    position: absolute;
    top: -8px;
    background: linear-gradient(135deg, #5e5ce6 0%, #4c4aba 100%);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(94, 92, 230, 0.3);
}

.package-button.best .package-badge {
    background: linear-gradient(135deg, #34c759 0%, #30d158 100%);
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.3);
}

.package-amount {
    font-size: 16px;
    font-weight: 700;
    color: #1d1d1f;
}

.package-price {
    font-size: 20px;
    font-weight: 800;
    color: #1d1d1f;
}

.package-per-lead {
    font-size: 12px;
    font-weight: 500;
    color: #86868b;
}

/* Welcome Modal */
.welcome-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in;
}

.welcome-modal.active {
    display: flex;
}

.welcome-modal-content {
    background: white;
    border-radius: 24px;
    width: 90%;
    max-width: 480px;
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
    position: relative;
}

.welcome-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #34c759 0%, #30d158 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    margin: 0 auto 24px;
    box-shadow: 0 4px 24px rgba(52, 199, 89, 0.3);
}

.welcome-modal-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1d1d1f;
}

.welcome-modal-content p {
    font-size: 16px;
    line-height: 1.5;
    color: #6e6e73;
    margin-bottom: 32px;
}

.welcome-button {
    background: linear-gradient(135deg, #34c759 0%, #30d158 100%);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 16px 48px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(52, 199, 89, 0.3);
}

.welcome-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(52, 199, 89, 0.4);
}

