/* ==========================================
   GPPT Pro - Main Stylesheet
   Professional Minimalist AI Platform Design
   @author Varvara Tarasova
   @website https://gpt4girls.ru
   ========================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: -0.01em;
    background: #f4f5f7;
    color: #1a1a2e;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Geometric grid background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 25% 25%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
    background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100%;
    pointer-events: none;
    z-index: 0;
}

/* Subtle dot grid overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, rgba(99, 102, 241, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

/* ==========================================
   Header
   ========================================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    border-bottom: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.home-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: #475569;
    cursor: pointer;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(16px);
}

.home-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.95);
}

.home-btn svg {
    width: 20px;
    height: 20px;
}

/* Tariffs Button Small (in header-right) */
.tariffs-btn-small {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tariffs-btn-small:hover {
    background: rgba(99, 102, 241, 0.10);
    border-color: rgba(99, 102, 241, 0.20);
}

.tariffs-btn-small svg {
    width: 12px;
    height: 12px;
    fill: #6366f1;
}

/* Header Right Section */
.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

/* Subscription Status Text */
.subscription-status {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

.subscription-status.pro {
    color: #6366f1;
}

.subscription-status.unlimited {
    color: #6366f1;
}

/* ==========================================
   Cloud Buttons
   ========================================== */
.try-free-btn {
    background: #4f46e5;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    position: relative;
    transition: all 0.15s ease;
}

.try-free-btn::before {
    content: '✨';
    margin-right: 4px;
}

.try-free-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.4);
}

.try-free-btn svg {
    width: 16px;
    height: 16px;
    color: #ffffff;
}

/* ==========================================
   Main Content & Greeting
   ========================================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 20px 200px;
}

.greeting {
    text-align: left;
    width: 100%;
    max-width: 680px;
    margin-bottom: 200px;
    position: relative;
    z-index: 1;
}

.greeting h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a2e;
    letter-spacing: -0.3px;
}

.greeting h1::after {
    content: '';
}

.greeting p {
    font-size: 26px;
    color: #6366f1;
    font-weight: 400;
    line-height: 1.4;
}

.greeting .voice-hint {
    font-size: 15px;
    color: #94a3b8;
    font-weight: 400;
    margin-top: 16px;
    opacity: 0.9;
}

/* Service Badge & Description */
.service-badge {
    display: none !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.10);
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.service-badge .perplexity-icon {
    color: #64748b;
}

.service-description {
    font-size: 17px !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

/* Capabilities Tags */
.capabilities-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.capability-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.10);
    border-radius: 6px;
    font-size: 14px;
    color: #475569;
    font-weight: 500;
    transition: all 0.2s ease;
}

.capability-tag:hover {
    background: rgba(99, 102, 241, 0.10);
    border-color: rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

/* ==========================================
   Bottom Section
   ========================================== */
.bottom-section {
    position: fixed;
    bottom: 30px;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(247, 247, 248, 0.9) 30%, #f7f7f8 60%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

/* ==========================================
   Suggestion Cards
   ========================================== */
.suggestions-title {
    max-width: 680px;
    width: 100%;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.suggestions-title.hidden {
    display: none;
}

.suggestions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 680px;
    width: 100%;
    margin-bottom: 16px;
}

.suggestion-card {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.06);
    
    border-radius: 6px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
    backdrop-filter: blur(16px);
}

.suggestion-card:hover {
    transform: translateY(-1px);
    border-color: rgba(79, 70, 229, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.9);
}

.suggestion-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.suggestion-card h3::before {
    content: '';
}

.suggestion-card p {
    font-size: 13px;
    color: #6366f1;
}

/* ==========================================
   Input Area
   ========================================== */
.input-container {
    max-width: 680px;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.10);
    border-radius: 6px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08);
    transition: all 0.15s ease;
    backdrop-filter: blur(12px);
}

.input-container:focus-within {
    border-color: rgba(200, 140, 180, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-input {
    background: none;
    border: none;
    color: #1a1a2e;
    font-size: 16px;
    outline: none;
    width: 100%;
    resize: none;
    overflow-y: hidden;
    min-height: 24px;
    max-height: 150px;
    height: 24px;
    line-height: 1.4;
    font-family: inherit;
    padding: 0;
    margin: 0;
    display: block;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

.message-input::-webkit-scrollbar {
    width: 4px;
}

.message-input::-webkit-scrollbar-track {
    background: transparent;
}

.message-input::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
}

.message-input::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

.message-input::placeholder {
    color: #94a3b8;
}

.input-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}


.model-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
    font-size: 14px;
    cursor: pointer;
    background: none;
    border: none;
}

.model-selector svg {
    width: 16px;
    height: 16px;
}

.send-btn {
    background: #4f46e5;
    border: none;
    border-radius: 4px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.send-btn:hover {
    background: #4338ca;
    box-shadow: 0 2px 8px rgba(67, 56, 202, 0.3);
}

.send-btn svg {
    width: 18px;
    height: 18px;
    color: #ffffff;
}

/* File Preview Container */
.file-preview-container {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.file-preview-container.has-files {
    display: flex;
}

.file-preview-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(99, 102, 241, 0.08);
    border-radius: 4px;
    max-width: 200px;
}

.file-preview-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
}

.file-preview-item .file-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 8px;
    color: #6366f1;
}

.file-preview-item .file-icon svg {
    width: 18px;
    height: 18px;
}

.file-preview-item .file-name {
    font-size: 12px;
    color: #1a1a2e;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-preview-item .remove-file {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: #e57373;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.file-preview-item .remove-file:hover {
    background: #d32f2f;
}

/* Attach File Button */
.attach-btn {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.08);
    border-radius: 4px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

.attach-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.attach-btn svg {
    width: 18px;
    height: 18px;
    color: #6366f1;
}

/* Voice Input Button */
.voice-btn {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.08);
    border-radius: 4px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

.voice-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.voice-btn svg {
    width: 18px;
    height: 18px;
    color: #1a1a2e;
}

.voice-btn.listening {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 50%, #93c5fd 100%);
    animation: pulse-voice 1.5s ease-in-out infinite;
}

.voice-btn.listening svg {
    color: #c0392b;
}

@keyframes pulse-voice {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 
            0 3px 6px rgba(192, 57, 43, 0.3),
            0 6px 12px rgba(192, 57, 43, 0.2);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 
            0 5px 10px rgba(192, 57, 43, 0.4),
            0 10px 20px rgba(192, 57, 43, 0.3);
    }
}

/* ==========================================
   Pricing Page
   ========================================== */
.pricing-page {
    display: none;
    min-height: 100vh;
    padding: 60px 20px;
    flex-direction: column;
    align-items: center;
}

.pricing-page.active {
    display: flex;
}

.chat-page.hidden {
    display: none;
}

.pricing-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    color: #1a1a2e;
    letter-spacing: -0.5px;
}

.pricing-title::before {
    content: '';
}

.pricing-title::after {
    content: '';
}

.pricing-cards {
    display: flex;
    gap: 20px;
    max-width: 1100px;
    width: 100%;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.pricing-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.08);
    border-radius: 6px;
    padding: 32px 28px;
    width: 320px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.08);
    transition: all 0.15s ease;
    backdrop-filter: blur(8px);
}

.pricing-card:hover {
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
    transform: translateY(-4px);
}

.pricing-card.featured {
    position: relative;
    transform: scale(1.05);
    order: -1;
    z-index: 2;
    border-color: rgba(200, 140, 180, 0.25);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.18);
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(248,240,248,0.9) 100%);
}

.pricing-card.secondary {
    transform: scale(0.92);
    opacity: 0.9;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08);
}

.pricing-card.secondary:hover {
    transform: scale(0.94);
    opacity: 1;
}

.pricing-card.secondary .plan-name {
    font-size: 16px;
}

.pricing-card.secondary .price-amount {
    font-size: 38px;
}

.pricing-card.secondary .plan-features li {
    font-size: 12px;
    padding: 6px 0;
}

.pricing-card.secondary .plan-btn {
    padding: 12px 28px;
    font-size: 14px;
}

.plan-name {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 16px;
    color: #1a1a2e;
}

.plan-price {
    text-align: center;
    margin-bottom: 8px;
}

.price-amount {
    font-size: 42px;
    font-weight: 700;
    color: #1a1a2e;
}

.price-currency {
    font-size: 18px;
    color: #94a3b8;
    vertical-align: top;
}

.price-period {
    font-size: 14px;
    color: #94a3b8;
}

.plan-description {
    text-align: center;
    font-size: 13px;
    color: #6366f1;
    margin-bottom: 4px;
}

.plan-savings {
    text-align: center;
    font-size: 13px;
    color: #6366f1;
    margin-bottom: 20px;
    height: 18px;
}

.plan-btn {
    background: #4f46e5;
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 24px;
    transition: all 0.15s ease;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}

.plan-btn::before {
    content: '✨ ';
}

.plan-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.35);
}

.plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #1a1a2e;
    line-height: 1.4;
}

.plan-features li svg {
    width: 16px;
    height: 16px;
    color: #6366f1;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-icon {
    color: #ffb347;
}

.return-link {
    margin-top: 40px;
    color: #6366f1;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
}

.return-link:hover {
    color: #1a1a2e;
}

/* ==========================================
   Payment Page
   ========================================== */
.payment-page {
    display: none;
    min-height: 100vh;
    padding: 60px 20px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.payment-page.active {
    display: flex;
}

.payment-container {
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 8px;
    padding: 40px;
    max-width: 480px;
    width: 100%;
    box-shadow: 
        0 8px 16px rgba(99, 102, 241, 0.15),
        0 16px 32px rgba(99, 102, 241, 0.1),
        0 24px 48px rgba(99, 102, 241, 0.05),
    position: relative;
    z-index: 1;
}

.payment-header {
    text-align: center;
    margin-bottom: 32px;
}

.payment-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.payment-title::before {
    content: '';
}

.payment-plan {
    color: #6366f1;
    font-size: 16px;
    font-weight: 500;
}

.payment-amount {
    font-size: 36px;
    font-weight: 700;
    margin-top: 12px;
    color: #1a1a2e;
}

.payment-amount span {
    font-size: 16px;
    color: #94a3b8;
    font-weight: 400;
}

.payment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    color: #6366f1;
    font-weight: 500;
}

.form-group input {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 6px;
    padding: 14px 20px;
    font-size: 16px;
    color: #1a1a2e;
    outline: none;
    transition: all 0.3s;
    box-shadow: 
        0 2px 4px rgba(99, 102, 241, 0.1),
        0 4px 8px rgba(99, 102, 241, 0.05),
}

.form-group input:focus {
    box-shadow: 
        0 3px 6px rgba(99, 102, 241, 0.15),
        0 6px 12px rgba(99, 102, 241, 0.1),
}

.form-group input::placeholder {
    color: #94a3b8;
}

/* Promo Code Styles */
.promo-group {
    margin-top: 8px;
}

.promo-input-wrapper {
    display: flex;
    gap: 10px;
}

.promo-input-wrapper input {
    flex: 1;
}

.promo-apply-btn {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 6px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a2e;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 
        0 2px 4px rgba(99, 102, 241, 0.15),
        0 4px 8px rgba(99, 102, 241, 0.1),
}

.promo-apply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 3px 6px rgba(99, 102, 241, 0.2),
        0 6px 12px rgba(99, 102, 241, 0.15),
}

.promo-message {
    font-size: 13px;
    margin-top: 8px;
    min-height: 18px;
}

.promo-message.success {
    color: #27ae60;
}

.promo-message.error {
    color: #e74c3c;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.card-icons {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.card-icon {
    width: 40px;
    height: 26px;
    background-color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #333;
}

.card-icon.visa {
    background: linear-gradient(135deg, #1a1f71, #0066b2);
    color: #fff;
}

.card-icon.mastercard {
    background: linear-gradient(135deg, #eb001b, #f79e1b);
    color: #fff;
}

.card-icon.amex {
    background: #006fcf;
    color: #fff;
}

.card-icon.mir {
    background: linear-gradient(135deg, #4db45e, #0f754e);
    color: #fff;
}

.card-icon.sbp {
    background: linear-gradient(135deg, #4338ca, #1e3a8a);
    color: #fff;
    font-size: 9px;
}

.pay-btn {
    background: rgba(255, 255, 255, 0.8);
    color: #1a1a2e;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.3s;
    box-shadow: 
        0 4px 8px rgba(99, 102, 241, 0.2),
        0 8px 16px rgba(99, 102, 241, 0.15),
        0 12px 24px rgba(99, 102, 241, 0.1),
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pay-btn::before {
    content: '✨';
    margin-right: 4px;
}

.pay-btn:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 
        0 6px 12px rgba(99, 102, 241, 0.3),
        0 12px 24px rgba(99, 102, 241, 0.2),
        0 18px 36px rgba(99, 102, 241, 0.15),
}

.pay-btn svg {
    width: 20px;
    height: 20px;
    color: #1a1a2e;
}

.secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    color: #6366f1;
    font-size: 13px;
}

.secure-note svg {
    width: 16px;
    height: 16px;
    color: #6366f1;
}

.payment-back {
    margin-top: 24px;
    color: #6366f1;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
    text-align: center;
    display: block;
}

.payment-back:hover {
    color: #1a1a2e;
}

/* Payment Success */
.payment-success {
    text-align: center;
    padding: 20px;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.payment-success h2 {
    font-size: 28px;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.success-message {
    font-size: 16px;
    color: #6366f1;
    margin-bottom: 24px;
}

.receipt-details {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: left;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
    font-size: 14px;
}

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

.receipt-row span:first-child {
    color: #6366f1;
}

.receipt-row span:last-child {
    color: #1a1a2e;
    font-weight: 500;
}

/* ==========================================
   Chat Messages
   ========================================== */
.chat-messages {
    display: none;
    flex-direction: column;
    gap: 24px;
    max-width: 680px;
    width: 100%;
    padding: 80px 20px 220px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.chat-messages.active {
    display: flex;
}

/* Desktop: flex layout for chat - enables proper scrolling */
body.chat-active {
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
}

body.chat-active .chat-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 50;
    background: #f7f7f8;
}

body.chat-active .header {
    position: relative;
    flex-shrink: 0;
    z-index: 51;
}

body.chat-active .chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

body.chat-active .bottom-section {
    position: relative;
    bottom: auto;
    flex-shrink: 0;
    z-index: 52;
    background: #f7f7f8;
    padding-bottom: 16px;
}

body.chat-active .site-footer {
    display: none;
}

/* On mobile: use flex layout for chat - works correctly with iOS keyboard */
@media (max-width: 768px) {
    body.chat-active .site-footer {
        display: none;
    }
    
    /* Chat page becomes a fixed flex container - the ONLY fixed element */
    body.chat-active .chat-page {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        flex-direction: column;
        z-index: 50;
        background: #f7f7f8;
    }
    
    /* Header inside flex - no longer position:fixed */
    body.chat-active .header {
        position: relative;
        flex-shrink: 0;
        z-index: 51;
    }
    
    /* Chat messages fill remaining space */
    body.chat-active .chat-messages {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 12px 12px 12px;
        margin: 0;
        z-index: 5;
    }
    
    /* Input section at bottom of flex - no longer position:fixed */
    body.chat-active .bottom-section {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        flex-shrink: 0;
        background: rgba(247, 247, 248, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(99, 102, 241, 0.08);
        padding-bottom: 8px;
        padding-bottom: max(8px, env(safe-area-inset-bottom, 8px));
        z-index: 100;
    }
    
    body.chat-active .suggestions,
    body.chat-active .suggestions-title {
        display: none !important;
    }
}

.main-content.hidden {
    display: none;
}

.suggestions.hidden {
    display: none;
}

.message {
    display: flex;
    gap: 16px;
    animation: fadeIn 0.4s ease;
    background: rgba(255, 255, 255, 0.75);
    padding: 20px;
    border-radius: 6px;
    border: 1px solid rgba(99, 102, 241, 0.08);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.08);
    backdrop-filter: blur(16px);
}

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
}

.message.user .message-avatar {
    background: linear-gradient(135deg, #6366f1, #a5b4fc);
    color: #fff;
}

.message.assistant .message-avatar {
    background: rgba(99, 102, 241, 0.08);
    color: #6366f1;
}

.message-content {
    flex: 1;
    padding-top: 6px;
}

/* Attached files in messages */
.message-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.message-attachment {
    border-radius: 4px;
    overflow: hidden;
    background: rgba(99, 102, 241, 0.08);
}

.message-attachment img {
    max-width: 250px;
    max-height: 200px;
    display: block;
    cursor: pointer;
    transition: transform 0.2s;
}

.message-attachment img:hover {
    transform: scale(1.02);
}

.message-attachment-doc {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
}

.message-attachment-doc .doc-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 8px;
    color: #6366f1;
}

.message-attachment-doc .doc-icon svg {
    width: 20px;
    height: 20px;
}

.message-attachment-doc .doc-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.message-attachment-doc .doc-name {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a2e;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-attachment-doc .doc-size {
    font-size: 11px;
    color: #64748b;
}

.message-role {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.message-text {
    font-size: 15px;
    line-height: 1.6;
    color: #1a1a2e;
}

.message-text p {
    margin-bottom: 12px;
}

.message-text p:last-child {
    margin-bottom: 0;
}

.message-text pre {
    background: #f1f5f9;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 12px 0;
}

.message-text code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.message-text pre code {
    background: none;
    padding: 0;
}

.message-text a {
    color: #6366f1;
    text-decoration: underline;
}

.message-text strong {
    color: #1a1a2e;
}

/* Voice Message Styles */
.voice-message {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.voice-message-player {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.8);
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: 
        0 2px 4px rgba(99, 102, 241, 0.1),
}

.voice-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(180deg, #64748b 0%, #334155 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.voice-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.voice-waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 30px;
    flex: 1;
}

.voice-waveform span {
    width: 3px;
    background: linear-gradient(180deg, #64748b 0%, #64748b 100%);
    border-radius: 3px;
    height: 8px;
    transition: height 0.1s ease;
}

.voice-waveform span:nth-child(1) { height: 8px; }
.voice-waveform span:nth-child(2) { height: 14px; }
.voice-waveform span:nth-child(3) { height: 20px; }
.voice-waveform span:nth-child(4) { height: 12px; }
.voice-waveform span:nth-child(5) { height: 24px; }
.voice-waveform span:nth-child(6) { height: 16px; }
.voice-waveform span:nth-child(7) { height: 28px; }
.voice-waveform span:nth-child(8) { height: 18px; }
.voice-waveform span:nth-child(9) { height: 22px; }
.voice-waveform span:nth-child(10) { height: 10px; }
.voice-waveform span:nth-child(11) { height: 26px; }
.voice-waveform span:nth-child(12) { height: 14px; }
.voice-waveform span:nth-child(13) { height: 20px; }
.voice-waveform span:nth-child(14) { height: 8px; }
.voice-waveform span:nth-child(15) { height: 18px; }
.voice-waveform span:nth-child(16) { height: 24px; }
.voice-waveform span:nth-child(17) { height: 12px; }
.voice-waveform span:nth-child(18) { height: 16px; }
.voice-waveform span:nth-child(19) { height: 22px; }
.voice-waveform span:nth-child(20) { height: 10px; }

.voice-waveform.playing span {
    animation: waveformBounce 0.5s ease-in-out infinite;
}

.voice-waveform.playing span:nth-child(odd) {
    animation-delay: 0.1s;
}

.voice-waveform.playing span:nth-child(3n) {
    animation-delay: 0.2s;
}

.voice-waveform.playing span:nth-child(5n) {
    animation-delay: 0.3s;
}

@keyframes waveformBounce {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.5); }
}

.voice-duration {
    font-size: 13px;
    color: #6366f1;
    font-weight: 500;
    min-width: 35px;
    text-align: right;
}

.voice-transcript {
    padding: 10px 14px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 4px;
    border-left: 3px solid #64748b;
}

.transcript-label {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}

.voice-transcript p {
    font-size: 14px;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.5;
}

/* ==========================================
   Typing Indicator
   ========================================== */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: #94a3b8;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 600px) {
    .suggestions {
        grid-template-columns: 1fr;
    }

    .greeting h1,
    .greeting p {
        font-size: 22px;
    }
}

@media (max-width: 1000px) {
    .pricing-cards {
        flex-direction: column;
        align-items: center;
    }

    .pricing-card.featured {
        transform: scale(1.02);
        order: -1;
    }
    
    .pricing-card.secondary {
        transform: scale(0.92);
    }
    
    .pricing-card.secondary:hover {
        transform: scale(0.94);
    }
}

@media (max-width: 500px) {
    .payment-container {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   Promo Popup
   ========================================== */
.promo-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.promo-popup-overlay.active {
    display: flex;
}

.promo-popup {
    background: #ffffff;
    border-radius: 6px;
    max-width: 500px;
    width: 100%;
    padding: 32px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    animation: popupSlideIn 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.promo-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 24px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.promo-popup-close:hover {
    background: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

.promo-popup-header {
    background: linear-gradient(135deg, #64748b 0%, #334155 100%);
    margin: -32px -32px 24px -32px;
    padding: 28px 32px;
    border-radius: 6px 24px 0 0;
}

.promo-popup-header h2 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

.promo-popup-price {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-left: 8px;
}

.promo-price-main {
    font-size: 72px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1;
}

.promo-price-old {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.promo-price-crossed {
    font-size: 24px;
    color: #a0aec0;
    text-decoration: line-through;
}

.promo-price-savings {
    font-size: 18px;
    color: #1a202c;
    font-weight: 500;
}

.promo-popup-features {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #64748b 0%, #334155 100%);
    border-radius: 6px;
    padding: 20px 16px;
    margin-bottom: 28px;
}

.promo-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    text-align: center;
}

.promo-feature svg {
    width: 32px;
    height: 32px;
    color: #ffffff;
    opacity: 0.9;
}

.promo-feature span {
    font-size: 12px;
    color: #ffffff;
    font-weight: 500;
    line-height: 1.3;
}

.promo-feature-divider {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
}

.promo-popup-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.promo-pay-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    padding: 18px 32px;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.promo-pay-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.promo-secure {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a5568;
    font-size: 14px;
}

.promo-secure svg {
    color: #4a5568;
}

.promo-popup-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.promo-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    position: relative;
}

.promo-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.promo-checkbox-custom {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: #ffffff;
}

.promo-checkbox input:checked + .promo-checkbox-custom {
    background: #38a169;
    border-color: #38a169;
}

.promo-checkbox input:checked + .promo-checkbox-custom::after {
    content: '✓';
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
}

.promo-checkbox:hover .promo-checkbox-custom {
    border-color: #cbd5e0;
}

.promo-checkbox-text {
    font-size: 13px;
    color: #4a5568;
    line-height: 1.5;
}

/* Promo popup responsive */
@media (max-width: 520px) {
    .promo-popup {
        padding: 20px;
        margin: 10px;
    }

    .promo-popup-header {
        margin: -20px -20px 20px -20px;
        padding: 20px;
    }

    .promo-popup-header h2 {
        font-size: 18px;
    }

    .promo-price-main {
        font-size: 56px;
    }

    .promo-popup-features {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .promo-feature-divider {
        width: 80%;
        height: 1px;
    }

    .promo-popup-actions {
        flex-direction: column;
        gap: 12px;
    }

    .promo-pay-btn {
        width: 100%;
    }
}

/* ==========================================
   Name Popup (Welcome)
   ========================================== */
.name-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(60, 50, 70, 0.35);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    padding: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.name-popup-overlay.hidden {
    display: none;
}

.name-popup {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    padding: 40px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(100, 80, 120, 0.2);
    animation: popupSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(99, 102, 241, 0.08);
    backdrop-filter: blur(20px);
}

.name-popup-icon {
    font-size: 56px;
    margin-bottom: 16px;
    display: inline-block;
    animation: wave 1.5s ease-in-out infinite;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
    60% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

.name-popup h2 {
    font-size: 28px;
    color: #1a1a2e;
    margin-bottom: 8px;
    font-weight: 600;
}

.name-popup p {
    font-size: 16px;
    color: #6366f1;
    margin-bottom: 24px;
}

.name-popup input {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    color: #1a1a2e;
    outline: none;
    margin-bottom: 20px;
    box-shadow: 
        0 2px 4px rgba(99, 102, 241, 0.1),
        0 4px 8px rgba(99, 102, 241, 0.05),
    transition: all 0.3s;
}

.name-popup input:focus {
    box-shadow: 
        0 3px 6px rgba(99, 102, 241, 0.15),
        0 6px 12px rgba(99, 102, 241, 0.1),
}

.name-popup input::placeholder {
    color: #94a3b8;
}

.name-popup-btn {
    width: 100%;
    padding: 16px 32px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background: #4f46e5;
    color: #ffffff;
    transition: all 0.15s ease;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.name-popup-btn:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 16px rgba(107, 83, 68, 0.4),
        0 12px 28px rgba(107, 83, 68, 0.25);
}

@media (max-width: 440px) {
    .name-popup {
        padding: 30px 20px;
    }
    
    .name-popup h2 {
        font-size: 24px;
    }
}

/* ==========================================
   Account Button
   ========================================== */

.account-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: #ffffff;
    color: #1a1a2e;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.account-btn svg {
    width: 18px;
    height: 18px;
}

.account-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.account-btn.logged-in {
    background: linear-gradient(180deg, #64748b 0%, #334155 100%);
    color: white;
}

/* ==========================================
   Auth Modal (Login/Register)
   ========================================== */

.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(60, 50, 70, 0.35);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.auth-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal {
    background: #ffffff;
    border-radius: 6px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    animation: popupSlideIn 0.4s ease;
}

.auth-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.auth-close-btn:hover {
    background: rgba(99, 102, 241, 0.2);
}

.auth-form {
    text-align: center;
}

.auth-form.hidden {
    display: none;
}

.auth-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.auth-form h2 {
    font-size: 24px;
    color: #1a1a2e;
    margin-bottom: 8px;
    font-weight: 600;
}

.auth-form > p {
    font-size: 14px;
    color: #6366f1;
    margin-bottom: 24px;
}

.auth-input-group {
    text-align: left;
    margin-bottom: 16px;
}

.auth-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a2e;
    margin-bottom: 6px;
    padding-left: 12px;
}

.auth-input-group input {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.8);
    color: #1a1a2e;
    outline: none;
    box-shadow: 
        0 2px 4px rgba(99, 102, 241, 0.1),
    transition: all 0.3s;
}

.auth-input-group input:focus {
    box-shadow: 
        0 3px 6px rgba(99, 102, 241, 0.15),
}

.auth-input-group input::placeholder {
    color: #94a3b8;
}

.auth-error {
    color: #c44;
    font-size: 13px;
    margin: 8px 0 16px;
    min-height: 18px;
}

.auth-submit-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background: #4f46e5;
    color: #ffffff;
    transition: all 0.15s ease;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
    margin-bottom: 20px;
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.45);
}

.auth-switch {
    font-size: 14px;
    color: #6366f1;
}

.auth-switch a {
    color: #1a1a2e;
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(99, 102, 241, 0.2);
}

.auth-divider span {
    padding: 0 16px;
    font-size: 13px;
    color: #94a3b8;
}

/* Google Auth Button */
.google-auth-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    border: 2px solid rgba(99, 102, 241, 0.15);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    background: #ffffff;
    color: #1a1a2e;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
}

.google-auth-btn:hover {
    background: #fafafa;
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.google-auth-btn svg {
    flex-shrink: 0;
}

.yandex-auth-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    border: 2px solid rgba(252, 63, 29, 0.15);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    background: #ffffff;
    color: #1a1a2e;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-top: 10px;
}

.yandex-auth-btn:hover {
    background: #f8fafc;
    border-color: rgba(252, 63, 29, 0.3);
    box-shadow: 0 4px 8px rgba(252, 63, 29, 0.1);
    transform: translateY(-1px);
}

.yandex-auth-btn svg {
    flex-shrink: 0;
}

/* ==========================================
   Account Page Modal
   ========================================== */

.account-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(60, 50, 70, 0.35);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    padding: 20px;
    overflow-y: auto;
}

.account-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.account-modal {
    background: #ffffff;
    border-radius: 6px;
    padding: 32px;
    width: 90%;
    max-width: 480px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    animation: popupSlideIn 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.account-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}

.account-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(180deg, #64748b 0%, #334155 100%);
    color: white;
    font-size: 28px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(107, 83, 68, 0.3);
}

.account-info h2 {
    font-size: 22px;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.account-info p {
    font-size: 14px;
    color: #6366f1;
}

.account-section {
    margin-bottom: 24px;
}

.account-section h3 {
    font-size: 16px;
    color: #1a1a2e;
    margin-bottom: 16px;
    font-weight: 600;
}

.account-stats {
    display: flex;
    gap: 16px;
}

.stat-item {
    flex: 1;
    background: rgba(255, 255, 255, 0.8);
    padding: 16px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 
        0 2px 4px rgba(99, 102, 241, 0.1),
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: #6366f1;
}

.subscription-info {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 
        0 2px 4px rgba(99, 102, 241, 0.1),
}

.subscription-type {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.subscription-desc {
    font-size: 13px;
    color: #6366f1;
    margin-bottom: 16px;
}

.subscription-info.pro .subscription-type {
    color: #6366f1;
}

.subscription-info.unlimited .subscription-type {
    background: linear-gradient(90deg, #6366f1, #64748b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upgrade-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: #4f46e5;
    color: white;
    transition: all 0.15s ease;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.upgrade-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.settings-list {
    background: rgba(255, 255, 255, 0.6);
    padding: 20px;
    border-radius: 6px;
    border: 1px solid rgba(99, 102, 241, 0.08);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.settings-item span {
    font-size: 14px;
    color: #1a1a2e;
    font-weight: 500;
}

.settings-item input {
    width: 180px;
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    background: rgba(99, 102, 241, 0.08);
    color: #1a1a2e;
    outline: none;
    transition: all 0.3s;
}

.settings-item input:focus {
    background: rgba(99, 102, 241, 0.12);
}

.save-settings-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(180deg, #64748b 0%, #334155 100%);
    color: white;
    transition: all 0.3s;
}

.save-settings-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 83, 68, 0.3);
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: #6366f1;
    transition: all 0.3s;
}

.logout-btn svg {
    width: 18px;
    height: 18px;
}

.logout-btn:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

/* ==========================================
   Chat History in Account
   ========================================== */

.history-section {
    max-height: none;
}

.history-container {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

.history-container::-webkit-scrollbar {
    width: 6px;
}

.history-container::-webkit-scrollbar-track {
    background: rgba(99, 102, 241, 0.05);
    border-radius: 3px;
}

.history-container::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.2);
    border-radius: 3px;
}

.history-container::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.3);
}

.history-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
    padding: 24px;
}

.history-day {
    margin-bottom: 16px;
}

.history-day:last-child {
    margin-bottom: 0;
}

.history-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.08);
    border-radius: 4px;
    margin-bottom: 8px;
}

.history-date {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    text-transform: capitalize;
}

.history-count {
    font-size: 12px;
    color: #94a3b8;
}

.history-conversations {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 
        0 1px 3px rgba(99, 102, 241, 0.08),
    transition: all 0.2s;
}

.history-item:hover {
    box-shadow: 
        0 2px 6px rgba(99, 102, 241, 0.12),
}

.history-item-content {
    flex: 1;
    padding: 12px 14px;
    cursor: pointer;
    min-width: 0;
}

.history-item-title {
    font-size: 14px;
    color: #1a1a2e;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.history-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #94a3b8;
}

.history-delete-btn {
    width: 36px;
    height: 36px;
    margin-right: 8px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.history-delete-btn svg {
    width: 16px;
    height: 16px;
}

.history-delete-btn:hover {
    background: rgba(100, 116, 139, 0.1);
    color: #c66;
}

@media (max-width: 480px) {
    .auth-modal,
    .account-modal {
        padding: 24px;
    }
    
    .account-stats {
        flex-direction: column;
    }
    
    .settings-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .settings-item input {
        width: 100%;
    }
    
    .history-container {
        max-height: 200px;
    }
}

/* ==========================================
   Footer Styles
   ========================================== */

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 16px 6px;
    padding-bottom: max(6px, env(safe-area-inset-bottom, 6px));
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 16px;
    background: rgba(255, 253, 250, 0.95);
    z-index: 40;
}

.footer-about-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    padding: 2px 8px;
    transition: all 0.2s;
}

.footer-about-btn:hover {
    color: #6366f1;
}

.footer-links {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.footer-links a {
    color: #cbd5e0;
    font-size: 10px;
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

.footer-links a:hover {
    color: #64748b;
}

/* About Modal */
.about-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    padding: 20px;
}

.about-modal-overlay.active {
    display: flex;
}

.about-modal {
    background: #ffffff;
    border-radius: 6px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.about-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.about-close-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.about-close-btn svg {
    width: 20px;
    height: 20px;
}

.about-content h2 {
    color: #6366f1;
    font-size: 24px;
    margin-bottom: 16px;
    text-align: center;
}

.about-content > p {
    color: #334155;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 24px;
}

.about-contact {
    background: rgba(99, 102, 241, 0.08);
    border-radius: 6px;
    padding: 20px;
    text-align: center;
}

.about-contact h3 {
    color: #6366f1;
    font-size: 16px;
    margin-bottom: 8px;
}

.about-contact p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 12px;
}

.about-email {
    display: inline-block;
    color: #6366f1;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(99, 102, 241, 0.12);
    border-radius: 4px;
    transition: all 0.2s;
}

.about-email:hover {
    background: rgba(99, 102, 241, 0.2);
}

/* Legal Documents Modal */
.legal-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    padding: 20px;
}

.legal-modal-overlay.active {
    display: flex;
}

.legal-modal {
    background: #ffffff;
    border-radius: 6px;
    padding: 30px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.legal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.legal-close-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.legal-close-btn svg {
    width: 20px;
    height: 20px;
}

.legal-title {
    color: #6366f1;
    font-size: 20px;
    margin-bottom: 20px;
    padding-right: 40px;
}

.legal-content {
    overflow-y: auto;
    flex: 1;
    color: #1a1a2e;
    font-size: 14px;
    line-height: 1.7;
}

.legal-content h3 {
    color: #6366f1;
    font-size: 16px;
    margin: 20px 0 10px;
}

.legal-content p {
    margin-bottom: 12px;
}

.legal-content ul {
    margin-left: 20px;
    margin-bottom: 12px;
}

.legal-content li {
    margin-bottom: 6px;
}

.legal-content .legal-section {
    margin-bottom: 20px;
}

.legal-content .legal-requisites {
    background: rgba(99, 102, 241, 0.08);
    padding: 16px;
    border-radius: 4px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .legal-modal {
        padding: 20px;
        max-height: 85vh;
    }
    
    .legal-title {
        font-size: 18px;
    }
    
    .legal-content {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .site-footer {
        padding: 20px 16px 16px;
    }
    
    .footer-links {
        gap: 6px 12px;
    }
    
    .footer-links a {
        font-size: 11px;
    }
    
    .about-modal {
        padding: 24px;
    }
    
    .header-right {
        gap: 2px;
    }
    
    .subscription-status {
        font-size: 10px;
    }
    
    .file-preview-container {
        gap: 6px;
    }
    
    .file-preview-item {
        padding: 4px 8px;
    }
    
    .file-preview-item img {
        width: 32px;
        height: 32px;
    }
    
    .message-attachment img {
        max-width: 200px;
        max-height: 150px;
    }
}

/* Image Modal */
.image-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.image-modal {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.image-modal img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Cancel Subscription Button */
.subscription-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.cancel-sub-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 6px;
    color: #c86464;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: none;
}

.cancel-sub-btn:hover {
    background: rgba(100, 116, 139, 0.1);
    border-color: rgba(100, 116, 139, 0.5);
}

.cancel-sub-btn.visible {
    display: block;
}

/* Cancel Subscription Modal */
.cancel-sub-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2500;
    padding: 20px;
}

.cancel-sub-modal-overlay.active {
    display: flex;
}

.cancel-sub-modal {
    background: #ffffff;
    border-radius: 6px;
    padding: 30px;
    max-width: 450px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.cancel-sub-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cancel-sub-close:hover {
    background: rgba(99, 102, 241, 0.2);
}

.cancel-step {
    text-align: center;
}

.cancel-step.hidden {
    display: none;
}

.cancel-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.cancel-step h2 {
    color: #1a1a2e;
    font-size: 22px;
    margin-bottom: 10px;
}

.cancel-step p {
    color: #6366f1;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.cancel-warning {
    color: #c86464 !important;
    font-weight: 500;
    background: rgba(100, 116, 139, 0.1);
    padding: 10px 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.cancel-step-buttons {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    justify-content: center;
}

.cancel-back-btn {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    color: #6366f1;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.cancel-back-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.5);
}

.cancel-next-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #c86464 0%, #a85454 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.cancel-next-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
}

.cancel-confirm-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #c86464 0%, #a85454 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.cancel-confirm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
}

.cancel-done-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #64748b 0%, #334155 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.cancel-done-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Cancel Reasons */
.cancel-reasons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
    text-align: left;
}

.cancel-reason {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-reason:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

.cancel-reason input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #6366f1;
    margin-right: 12px;
    cursor: pointer;
}

.cancel-reason-text {
    color: #1a1a2e;
    font-size: 14px;
}

.cancel-custom-reason {
    margin-top: 15px;
    text-align: left;
}

.cancel-custom-reason label {
    display: block;
    color: #6366f1;
    font-size: 13px;
    margin-bottom: 8px;
}

.cancel-custom-reason textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
    color: #1a1a2e;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    transition: all 0.2s;
}

.cancel-custom-reason textarea:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(255, 255, 255, 0.8);
}

.cancel-custom-reason textarea::placeholder {
    color: #94a3b8;
}

/* Cancel Email Input */
.cancel-email-input {
    margin: 20px 0;
}

.cancel-email-input input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
    color: #1a1a2e;
    font-size: 15px;
    text-align: center;
    transition: all 0.2s;
}

.cancel-email-input input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(255, 255, 255, 0.8);
}

.cancel-email-input input::placeholder {
    color: #94a3b8;
}

.cancel-email-hint {
    font-size: 12px !important;
    color: #94a3b8 !important;
}

.cancel-error {
    color: #c86464 !important;
    font-size: 13px !important;
    min-height: 20px;
}

.cancel-success-info {
    background: rgba(100, 180, 100, 0.1);
    padding: 12px 15px;
    border-radius: 4px;
    color: #4f46e5 !important;
    margin: 15px 0;
}

@media (max-width: 480px) {
    .cancel-sub-modal {
        padding: 25px 20px;
    }
    
    .cancel-step h2 {
        font-size: 18px;
    }
    
    .cancel-step-buttons {
        flex-direction: column;
    }
    
    .cancel-reason {
        padding: 10px 12px;
    }
}

/* ==========================================
   COMPREHENSIVE MOBILE RESPONSIVE STYLES
   ========================================== */

/* Tablet and below (max-width: 768px) */
@media (max-width: 768px) {
    /* Header */
    .header {
        padding: 10px 12px;
    }
    
    .header-right {
        gap: 2px;
    }
    
    .home-btn {
        width: 40px;
        height: 40px;
    }
    
    .home-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .tariffs-btn-small {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .subscription-status {
        font-size: 10px;
    }
    
    /* Main Content */
    .main-content {
        padding: 90px 16px 220px;
    }
    
    .greeting {
        margin-bottom: 150px;
    }
    
    .greeting h1 {
        font-size: 24px;
    }
    
    .greeting p {
        font-size: 22px;
    }
    
    .greeting .voice-hint {
        font-size: 14px;
    }
    
    .service-badge {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .service-description {
        font-size: 16px !important;
    }
    
    /* Bottom Section */
    .bottom-section {
        padding: 16px 12px 8px;
        bottom: 28px;
    }
    
    /* Suggestions */
    .suggestions {
        gap: 10px;
        margin-bottom: 12px;
    }
    
    .suggestion-card {
        padding: 14px 16px;
        border-radius: 4px;
    }
    
    .suggestion-card h3 {
        font-size: 13px;
    }
    
    .suggestion-card p {
        font-size: 13px;
    }
    
    /* Input Container */
    .input-container {
        padding: 12px 16px;
        border-radius: 6px;
    }
    
    .message-input {
        font-size: 15px;
    }
    
    .send-btn,
    .attach-btn,
    .voice-btn {
        width: 36px;
        height: 36px;
    }
    
    .send-btn svg,
    .attach-btn svg,
    .voice-btn svg {
        width: 16px;
        height: 16px;
    }
    
    /* Chat Messages - Messenger style on mobile */
    .chat-messages {
        padding: 12px;
        margin: 0 auto;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        z-index: 5;
        justify-content: flex-end;
    }
    
    .chat-messages.active {
        display: flex;
    }
    
    /* When there are enough messages to scroll, allow normal flow */
    .chat-messages.has-overflow {
        justify-content: flex-start;
    }
    
    .message {
        padding: 16px;
        border-radius: 6px;
        gap: 12px;
    }
    
    .message-avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .message-text {
        font-size: 14px;
        line-height: 1.6;
    }
    
    /* Pricing Cards */
    .pricing-section {
        padding: 60px 16px;
    }
    
    .pricing-header h1 {
        font-size: 28px;
    }
    
    .pricing-header p {
        font-size: 16px;
    }
    
    .pricing-card {
        width: 100%;
        max-width: 340px;
        padding: 24px 20px;
        border-radius: 6px;
    }
    
    .plan-name {
        font-size: 16px;
    }
    
    .price-amount {
        font-size: 36px;
    }
    
    .plan-features li {
        font-size: 13px;
    }
    
    .plan-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    /* Try Free Button */
    .try-free-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Mobile phones (max-width: 480px) */
@media (max-width: 480px) {
    /* Header */
    .header {
        padding: 8px 10px;
    }
    
    .home-btn {
        width: 36px;
        height: 36px;
    }
    
    .tariffs-btn-small {
        padding: 4px 8px;
        font-size: 10px;
        border-radius: 4px;
    }
    
    .tariffs-btn-small svg {
        width: 10px;
        height: 10px;
    }
    
    /* Main Content */
    .main-content {
        padding: 80px 12px 210px;
    }
    
    .greeting {
        margin-bottom: 120px;
    }
    
    .greeting h1 {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .greeting p {
        font-size: 18px;
    }
    
    .greeting .voice-hint {
        font-size: 13px;
        margin-top: 12px;
    }
    
    .service-badge {
        padding: 5px 10px;
        font-size: 11px;
        margin-bottom: 12px;
    }
    
    .service-description {
        font-size: 14px !important;
    }
    
    /* Suggestions - single column */
    .suggestions {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .suggestions-title {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .suggestion-card {
        padding: 12px 14px;
        border-radius: 4px;
    }
    
    .suggestion-card h3 {
        font-size: 12px;
        margin-bottom: 2px;
    }
    
    .suggestion-card p {
        font-size: 12px;
    }
    
    /* Input Container */
    .input-container {
        padding: 10px 14px;
        border-radius: 6px;
    }
    
    .input-wrapper {
        gap: 8px;
    }
    
    .message-input {
        font-size: 14px;
    }
    
    .message-input::placeholder {
        font-size: 14px;
    }
    
    .send-btn,
    .attach-btn,
    .voice-btn {
        width: 34px;
        height: 34px;
    }
    
    .input-actions {
        gap: 6px;
    }
    
    /* Chat Messages */
    .chat-messages {
        padding: 10px;
    }
    
    .messages-list {
        gap: 12px;
    }
    
    .message {
        padding: 14px;
        border-radius: 4px;
        gap: 10px;
    }
    
    .message-avatar {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    .message-text {
        font-size: 13px;
        line-height: 1.5;
    }
    
    .message-text p {
        margin-bottom: 8px;
    }
    
    .message-text pre {
        font-size: 12px;
        padding: 10px;
        border-radius: 8px;
    }
    
    .message-text code {
        font-size: 12px;
        padding: 2px 4px;
    }
    
    /* Voice Message Player */
    .voice-message-player {
        padding: 10px 12px;
        gap: 10px;
        border-radius: 4px;
    }
    
    .voice-play-btn {
        width: 32px;
        height: 32px;
    }
    
    /* Pricing Cards */
    .pricing-section {
        padding: 50px 12px;
    }
    
    .pricing-header {
        margin-bottom: 30px;
    }
    
    .pricing-header h1 {
        font-size: 24px;
    }
    
    .pricing-header p {
        font-size: 14px;
    }
    
    .pricing-cards {
        gap: 16px;
    }
    
    .pricing-card {
        padding: 20px 18px;
        border-radius: 6px;
    }
    
    .pricing-card.featured {
        transform: scale(1);
    }
    
    .pricing-card.secondary {
        transform: scale(1);
    }
    
    .plan-name {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .price-amount {
        font-size: 32px;
    }
    
    .price-period {
        font-size: 13px;
    }
    
    .plan-features {
        margin-bottom: 16px;
    }
    
    .plan-features li {
        font-size: 12px;
        padding: 6px 0;
    }
    
    .plan-btn {
        padding: 10px 20px;
        font-size: 13px;
        margin-bottom: 16px;
    }
    
    /* Payment Container */
    .payment-container {
        padding: 20px 16px;
        border-radius: 6px;
    }
    
    .payment-title {
        font-size: 20px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .form-group input {
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 4px;
    }
    
    .promo-apply-btn {
        padding: 12px 16px;
        font-size: 13px;
        border-radius: 4px;
    }
    
    .pay-btn {
        padding: 14px 24px;
        font-size: 14px;
    }
    
    /* Modals */
    .name-popup {
        padding: 24px 20px;
        border-radius: 6px;
        margin: 16px;
    }
    
    .name-popup-icon {
        font-size: 40px;
        margin-bottom: 12px;
    }
    
    .name-popup h2 {
        font-size: 22px;
    }
    
    .name-popup p {
        font-size: 14px;
    }
    
    .name-popup input {
        padding: 14px 16px;
        font-size: 15px;
        border-radius: 4px;
    }
    
    .name-popup-btn {
        padding: 14px 24px;
        font-size: 15px;
    }
    
    .auth-modal {
        padding: 24px 20px;
        border-radius: 6px;
        margin: 16px;
    }
    
    .auth-modal h2 {
        font-size: 22px;
    }
    
    .auth-input-group input {
        padding: 12px 14px;
        font-size: 14px;
        border-radius: 4px;
    }
    
    .auth-btn {
        padding: 14px 24px;
        font-size: 15px;
    }
    
    .account-modal {
        padding: 24px 16px;
        border-radius: 6px;
    }
    
    .stat-item {
        padding: 12px;
        border-radius: 4px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .subscription-info {
        padding: 16px;
        border-radius: 4px;
    }
    
    .subscription-type {
        font-size: 16px;
    }
    
    .settings-list {
        padding: 16px;
        border-radius: 4px;
    }
    
    .settings-item {
        margin-bottom: 12px;
    }
    
    .settings-label {
        font-size: 13px;
    }
    
    /* Promo Popup */
    .promo-popup {
        padding: 20px 16px;
        border-radius: 6px;
        margin: 12px;
    }
    
    .promo-title {
        font-size: 22px;
    }
    
    .promo-subtitle {
        font-size: 14px;
    }
    
    .promo-price {
        font-size: 36px;
    }
    
    .promo-pay-btn {
        padding: 14px 24px;
        font-size: 16px;
    }
    
    /* About Modal */
    .about-modal {
        padding: 24px 20px;
        border-radius: 6px;
    }
    
    .about-modal h2 {
        font-size: 22px;
    }
    
    .about-modal p {
        font-size: 14px;
    }
    
    /* Legal Modal */
    .legal-modal {
        padding: 16px;
        border-radius: 4px;
    }
    
    .legal-modal h2 {
        font-size: 18px;
    }
    
    .legal-content {
        font-size: 13px;
    }
    
    /* Footer */
    .site-footer {
        padding: 4px 10px;
        padding-bottom: max(4px, env(safe-area-inset-bottom, 4px));
        gap: 8px;
    }
    
    .footer-links {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer-links a {
        font-size: 9px;
    }
    
    .footer-about-btn {
        font-size: 9px;
    }
    
    .footer-link {
        font-size: 11px;
    }
    
    .footer-copyright {
        font-size: 10px;
    }
    
    /* Try Free Button */
    .try-free-btn {
        padding: 10px 16px;
        font-size: 12px;
        gap: 6px;
    }
    
    .try-free-btn::before {
        font-size: 12px;
    }
    
    /* File Preview */
    .file-preview-item {
        padding: 5px 8px;
        max-width: 150px;
    }
    
    .file-preview-item img {
        width: 32px;
        height: 32px;
    }
    
    .file-preview-item .file-name {
        font-size: 11px;
        max-width: 80px;
    }
}

/* Small phones (max-width: 360px) */
@media (max-width: 360px) {
    .header {
        padding: 6px 8px;
    }
    
    .home-btn {
        width: 32px;
        height: 32px;
    }
    
    .home-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .tariffs-btn-small {
        padding: 3px 6px;
        font-size: 9px;
    }
    
    .main-content {
        padding: 55px 10px 160px;
    }
    
    .greeting h1 {
        font-size: 18px;
    }
    
    .greeting p {
        font-size: 16px;
    }
    
    .bottom-section {
        padding: 12px 10px;
    }
    
    .input-container {
        padding: 8px 12px;
        border-radius: 6px;
    }
    
    .message-input {
        font-size: 13px;
    }
    
    .send-btn,
    .attach-btn,
    .voice-btn {
        width: 32px;
        height: 32px;
    }
    
    .suggestion-card {
        padding: 10px 12px;
    }
    
    .suggestion-card h3,
    .suggestion-card p {
        font-size: 11px;
    }
    
    .pricing-header h1 {
        font-size: 20px;
    }
    
    .price-amount {
        font-size: 28px;
    }
    
    .plan-features li {
        font-size: 11px;
    }
}

/* Landscape mode adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .main-content {
        padding-top: 50px;
        padding-bottom: 140px;
    }
    
    .greeting {
        margin-bottom: 80px;
    }
    
    .greeting h1 {
        font-size: 18px;
    }
    
    .greeting p {
        font-size: 16px;
    }
    
    .bottom-section {
        padding: 10px;
    }
    
    .suggestions {
        display: none;
    }
    
    .name-popup {
        padding: 20px;
    }
    
    .name-popup-icon {
        font-size: 32px;
        margin-bottom: 8px;
    }
    
    .name-popup h2 {
        font-size: 18px;
    }
}


/* ==========================================
   Krea AI Generated Content Styles
   ========================================== */

.krea-result {
    margin-top: 8px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.krea-image {
    width: 100%;
    max-width: 400px;
    border-radius: 4px;
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.krea-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.krea-video {
    width: 100%;
    max-width: 480px;
    border-radius: 4px;
    display: block;
    background: #000;
}
.krea-video-wrap {
    position: relative;
    max-width: 480px;
    border-radius: 4px;
    overflow: hidden;
    background: #000;
}

.krea-video-download {
    display: block;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    color: #818cf8;
    text-decoration: none;
    background: rgba(255, 240, 245, 0.5);
    transition: background 0.2s;
}

.krea-video-download:hover {
    background: rgba(99, 102, 241, 0.15);
}

.krea-video-fallback {
    padding: 24px;
    text-align: center;
    background: rgba(255, 240, 245, 0.5);
    border-radius: 4px;
}

.krea-video-fallback p {
    margin: 0 0 12px;
    color: #6366f1;
    font-size: 14px;
}

.krea-video-link {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #818cf8, #7c3aed);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.krea-video-link:hover {
    opacity: 0.9;
}
/* Krea Stop Button */
.krea-stop-btn {
    display: block;
    margin: 12px auto;
    padding: 10px 24px;
    background: rgba(229, 115, 115, 0.1);
    color: #e57373;
    border: 1.5px solid rgba(229, 115, 115, 0.3);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    animation: kreaStopPulse 2s infinite;
}

.krea-stop-btn:hover {
    background: rgba(229, 115, 115, 0.2);
    border-color: #e57373;
    transform: scale(1.03);
}

@keyframes kreaStopPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}



.krea-caption {
    padding: 8px 12px;
    font-size: 13px;
    color: #475569;
    font-style: italic;
    background: rgba(255, 240, 245, 0.5);
}


.krea-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
}

.krea-grid.krea-grid-single {
    grid-template-columns: 1fr;
    max-width: 400px;
}


.krea-grid-item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.krea-grid-item:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.krea-number-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    min-width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: rgba(61, 51, 71, 0.85);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}


.krea-grid-item .krea-image {
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1;
    border-radius: 0;
    transition: none;
    transform: none;
}





/* Image modal edit actions */
.image-modal-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.image-modal-edit {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 4px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    color: #1a1a2e;
    font-weight: 500;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
}

.image-modal-edit:hover {
    background: rgba(99, 102, 241, 0.3);
}

.image-modal .image-modal-close {
    position: static;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.image-modal .image-modal-close:hover {
    background: rgba(229, 115, 115, 0.3);
}

/* ==========================================
   Image Editor
   ========================================== */

.img-editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.img-editor {
    background: #fff;
    border-radius: 6px;
    max-width: 660px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.img-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}

.img-editor-title {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a2e;
}

.img-editor-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-editor-close:hover {
    background: rgba(229, 115, 115, 0.15);
    color: #e57373;
}

.img-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    flex-wrap: wrap;
}

.img-editor-tool {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    background: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.img-editor-tool:hover {
    background: rgba(99, 102, 241, 0.1);
}

.img-editor-tool.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: #818cf8;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.img-editor-sep {
    width: 1px;
    height: 24px;
    background: rgba(99, 102, 241, 0.15);
    margin: 0 4px;
}

.img-editor-color {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 4px;
    padding: 3px;
    cursor: pointer;
    background: #fff;
}

.img-editor-size {
    height: 36px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 4px;
    padding: 0 8px;
    font-size: 13px;
    color: #1a1a2e;
    background: #fff;
    cursor: pointer;
}

.img-editor-canvas-wrap {
    display: flex;
    justify-content: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.03);
    min-height: 200px;
}

.img-editor-canvas-wrap canvas {
    border-radius: 8px;
    cursor: crosshair;
    max-width: 100%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.img-editor-filters {
    display: flex;
    gap: 20px;
    padding: 12px 20px;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
}

.img-editor-filters label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6366f1;
    flex: 1;
}

.img-editor-filters input[type="range"] {
    flex: 1;
    accent-color: #818cf8;
    height: 4px;
}

.img-editor-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid rgba(99, 102, 241, 0.15);
}

.img-editor-btn {
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.img-editor-btn-cancel {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.img-editor-btn-cancel:hover {
    background: rgba(99, 102, 241, 0.2);
}

.img-editor-btn-reset {
    background: rgba(229, 115, 115, 0.1);
    color: #e57373;
}

.img-editor-btn-reset:hover {
    background: rgba(229, 115, 115, 0.2);
}

.img-editor-btn-save {
    background: linear-gradient(135deg, #818cf8, #7c3aed);
    color: #fff;
}

.img-editor-btn-save:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

/* Edit button on file preview */
.file-preview-item .edit-file {
    position: absolute;
    top: -6px;
    right: 18px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: #818cf8;
    color: white;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.file-preview-item .edit-file:hover {
    background: #7c3aed;
}

@media (max-width: 768px) {
    .img-editor {
        max-height: 85vh;
        border-radius: 6px;
    }
    
    .img-editor-toolbar {
        gap: 4px;
        padding: 8px 12px;
    }
    
    .img-editor-tool {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .img-editor-filters {
        flex-direction: column;
        gap: 10px;
        padding: 10px 16px;
    }
    
    .img-editor-footer {
        padding: 12px 16px;
    }
    
    .img-editor-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
}


@media (max-width: 768px) {
    .krea-image {
        max-width: 100%;
    }
    .krea-video {
        max-width: 100%;
    }
    .krea-caption {
        font-size: 12px;
    }
}
    .krea-grid {
        gap: 6px;
        padding: 6px;
    }

/* Safe area for iPhone notch / Dynamic Island */
@supports (padding: max(0px)) {
    .header {
        padding-top: max(10px, env(safe-area-inset-top));
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
    
    .main-content {
        padding-top: calc(80px + env(safe-area-inset-top, 0px));
    }
    
    .bottom-section {
        bottom: calc(30px + env(safe-area-inset-bottom, 0px));
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
    
    .site-footer {
        padding-bottom: max(6px, env(safe-area-inset-bottom));
    }
    
    .chat-messages {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
}

/* Telegram Feedback Button */
.tg-feedback-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2AABEE, #229ED9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(42, 171, 238, 0.4);
    cursor: pointer;
    z-index: 9000;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.tg-feedback-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(42, 171, 238, 0.55);
}

.tg-feedback-btn svg {
    width: 26px;
    height: 26px;
}
/* Telegram button tooltip */
.tg-feedback-btn::after {
    content: 'Если остались вопросы, напишите нам';
    position: absolute;
    right: 62px;
    top: 50%;
    transform: translateY(-50%);
    background: #1a1a2e;
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tg-feedback-btn:hover::after {
    opacity: 1;
}


/* Hide when chat is active on mobile */
body.chat-active .tg-feedback-btn {
    display: none;
}

@media (max-width: 768px) {
    .tg-feedback-btn {
        bottom: 90px;
        right: 16px;
        width: 46px;
        height: 46px;
    }
    .tg-feedback-btn svg {
        width: 22px;
        height: 22px;
    }
}
