/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0f0f23;
    color: #ffffff;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.header {
    background: #1a1a2e;
    border-bottom: 1px solid #2d2d44;
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-image {
    height: 1.8rem;
    width: auto;
}

.logo-text {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1.5rem;
    font-weight: 300;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* Login Button */
.login-btn {
    background: transparent;
    color: white;
    border: 1px solid white;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.login-btn:hover {
    background: white;
    color: #1a1a2e;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: #2d2d44;
    transition: background 0.2s;
    user-select: none;
    min-width: 140px;
}

.user-info:hover {
    background: #3d3d54;
}

.dropdown-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 0.8rem;
    cursor: pointer;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    background: #2d2d44;
    border: 1px solid #3d3d54;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-width: 150px;
    display: none;
    z-index: 1001;
}

.dropdown-content.show {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: #ffffff;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-content a:hover {
    background: #3d3d54;
}

/* Main Content */
.main-content {
    margin-top: 60px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* Mobile Model Selector */
.mobile-model-selector {
    display: none;
    background: #2d2d44;
    border-bottom: 1px solid #3d3d54;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mobile-model-selector::-webkit-scrollbar {
    display: none;
}

.mobile-model-btn {
    background: transparent;
    border: 1px solid #3d3d54;
    color: #aaa;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 80px;
}

.mobile-model-btn:hover {
    border-color: #667eea;
    color: #ffffff;
}

.mobile-model-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: #ffffff;
}

/* Response Grid */
.response-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #2d2d44;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.model-column {
    background: #1a1a2e;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.model-header {
    padding: 0.75rem;
    background: #2d2d44;
    border-bottom: 1px solid #3d3d54;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.model-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.model-status {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: #667eea;
    color: white;
}

.model-status.loading {
    background: #f39c12;
    animation: pulse 1.5s infinite;
}

.model-status.error {
    background: #e74c3c;
}

.model-status.completed {
    background: #27ae60;
}

.model-response {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.6;
    scrollbar-width: thin;
    scrollbar-color: #4a4a5e #2d2d44;
}

.model-response::-webkit-scrollbar {
    width: 6px;
}

.model-response::-webkit-scrollbar-track {
    background: #2d2d44;
}

.model-response::-webkit-scrollbar-thumb {
    background: #4a4a5e;
    border-radius: 3px;
}

.model-response::-webkit-scrollbar-thumb:hover {
    background: #5a5a6e;
}

.placeholder {
    color: #888;
    font-style: italic;
    text-align: center;
    margin-top: 1rem;
}

.response-content {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Chat Interface Styles */
.conversation {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.message {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-message {
    align-self: flex-end;
    max-width: 85%;
}

.ai-message {
    align-self: flex-start;
    max-width: 100%;
    flex: 1;
}

.message-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #888;
    margin-bottom: 0;
}

.user-message .message-label {
    text-align: right;
    color: #667eea;
}

.ai-message .message-label {
    color: #27ae60;
}

.message-content {
    background: #2d2d44;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    line-height: 1.5;
    word-wrap: break-word;
}

.user-message .message-content {
    background: #667eea;
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-message .message-content {
    background: #2d2d44;
    border: 1px solid #3d3d54;
    border-bottom-left-radius: 4px;
}

.ai-message .message-content {
    margin-bottom: 1rem;
}

/* Message Images */
.message-images {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
    justify-content: flex-end; /* Right-align images like the user message */
}

.message-image {
    border-radius: 8px;
    overflow: hidden;
    max-width: 200px;
    border: 1px solid #3d3d54;
}

.message-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 150px;
    object-fit: cover;
}

/* Markdown Formatting Styles */
.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4,
.message-content h5,
.message-content h6 {
    margin: 0.8rem 0 0.5rem 0;
    font-weight: 600;
    line-height: 1.3;
}

.message-content h1 {
    font-size: 1.4rem;
    color: #667eea;
    border-bottom: 2px solid #3d3d54;
    padding-bottom: 0.3rem;
}

.message-content h2 {
    font-size: 1.2rem;
    color: #8a9bf7;
}

.message-content h3 {
    font-size: 1.1rem;
    color: #9dabf8;
}

.message-content h4,
.message-content h5,
.message-content h6 {
    font-size: 1rem;
    color: #adb9f9;
}

.message-content strong {
    color: #ffffff;
    font-weight: 600;
}

.message-content em {
    color: #b8c5ff;
    font-style: italic;
}

.message-content code {
    background: #1a1a2e;
    color: #f8c555;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    border: 1px solid #3d3d54;
}

.message-content pre {
    background: #1a1a2e;
    border: 1px solid #3d3d54;
    border-radius: 8px;
    padding: 1rem;
    margin: 0.8rem 0;
    overflow-x: auto;
    position: relative;
}

.message-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: #e6e6e6;
    font-size: 0.9rem;
    display: block;
    line-height: 1.4;
}

.message-content ul,
.message-content ol {
    margin: 0.8rem 0;
    padding-left: 1.5rem;
}

.message-content li {
    margin: 0.3rem 0;
    line-height: 1.5;
}

.message-content ul li {
    list-style-type: disc;
}

.message-content ol li {
    list-style-type: decimal;
}

.message-content blockquote {
    background: #1a1a2e;
    border-left: 4px solid #667eea;
    margin: 0.8rem 0;
    padding: 0.8rem 1rem;
    border-radius: 0 8px 8px 0;
    color: #b8c5ff;
    font-style: italic;
}

.message-content p {
    margin: 0.5rem 0;
}

.message-content del {
    color: #888;
    text-decoration: line-through;
}

.message-content table {
    border-collapse: collapse;
    margin: 0.8rem 0;
    width: 100%;
    border: 1px solid #3d3d54;
    border-radius: 8px;
    overflow: hidden;
}

.message-content th,
.message-content td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid #3d3d54;
    border-right: 1px solid #3d3d54;
}

.message-content th:last-child,
.message-content td:last-child {
    border-right: none;
}

.message-content th {
    background: #1a1a2e;
    font-weight: 600;
    color: #667eea;
}

.message-content tr:last-child td {
    border-bottom: none;
}

.message-content tbody tr:nth-child(even) {
    background: rgba(26, 26, 46, 0.3);
}

/* Code block language labels */
.message-content pre::before {
    content: attr(data-language);
    position: absolute;
    top: 0.5rem;
    right: 0.8rem;
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #0f0f23;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    border: 1px solid #3d3d54;
}

/* Load Older Messages Button */
.load-older-container {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
}

.load-older-btn {
    background: #2d2d44;
    border: 1px solid #3d3d54;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-width: 160px;
}

.load-older-btn:hover:not(:disabled) {
    background: #3d3d54;
    border-color: #4d4d64;
}

.load-older-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.load-older-text {
    display: inline-block;
}

.load-older-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.load-older-loader span {
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
    animation: loading-bounce 1.4s infinite ease-in-out both;
}

.load-older-loader span:nth-child(1) {
    animation-delay: -0.32s;
}

.load-older-loader span:nth-child(2) {
    animation-delay: -0.16s;
}

.load-older-loader span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}


.typing-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 16px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #888;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0s;
}

.delivery-status {
    font-size: 0.75rem;
    color: #888;
    margin: 0;
    padding: 0;
    margin-top: -18px;
    margin-left: 12px;
    opacity: 0.8;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.error-message {
    color: #e74c3c;
    font-style: italic;
}

.retry-btn {
    margin: 1rem;
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.retry-btn:hover {
    background: #5a6fd8;
}

/* Usage Info */
.usage-info {
    background: #2d2d44;
    padding: 0.5rem 2rem;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1rem !important;
    font-size: 0.8rem;
    color: #aaa;
    border-top: 1px solid #3d3d54;
    text-align: center;
    flex-shrink: 0;
}

.usage-info.hidden-for-pro {
    display: none !important;
}

.usage-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 240px;
}

.usage-upgrade-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-left: 1rem;
    white-space: nowrap;
}

.usage-upgrade-btn:hover {
    background: #229954;
    transform: translateY(-1px);
}

.usage-upgrade-btn:active {
    transform: translateY(0);
}

.progress-bar {
    width: 240px;
    height: 12px;
    background: #1a1a2e;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #3d3d54;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
    transition: width 0.3s ease;
    width: 100%;
}

/* Input Section */
.input-section {
    background: #1a1a2e;
    padding: 0.75rem 2rem;
    border-top: 1px solid #2d2d44;
    flex-shrink: 0;
}

.input-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.prompt-wrapper {
    flex: 1;
    position: relative;
}

#promptInput {
    width: 100%;
    background: #2d2d44;
    border: 2px solid #3d3d54;
    border-radius: 12px;
    padding: 1rem;
    padding-bottom: 2.5rem;
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    height: 110px;
    overflow-y: auto;
    transition: border-color 0.2s;
}

.prompt-wrapper::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    background: 
        linear-gradient(-135deg, transparent 2px, #888 2px, #888 3px, transparent 3px),
        linear-gradient(-135deg, transparent 5px, #888 5px, #888 6px, transparent 6px),
        linear-gradient(-135deg, transparent 8px, #888 8px, #888 9px, transparent 9px);
    cursor: ns-resize;
    z-index: 10;
    pointer-events: all;
}


#promptInput:focus {
    outline: none;
    border-color: #667eea;
}

#promptInput::placeholder {
    color: #888;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    justify-content: center;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Premium Auth Modal - World Class Design */
.premium-modal-content {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 0;
    max-width: 440px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    border: 1px solid #2d2d44;
}

.premium-auth-form {
    padding: 0;
}

.premium-hero {
    padding: 24px 32px 24px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    position: relative;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    opacity: 0.9;
}

.hero-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.3;
    color: white;
    letter-spacing: -0.01em;
}

.hero-subtitle {
    font-size: 16px;
    font-weight: 400;
    margin: 0;
    opacity: 0.95;
    line-height: 1.4;
}

.value-grid {
    padding: 20px 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
    background: #1a1a2e;
}

.value-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0;
}

.value-icon {
    font-size: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
    flex-shrink: 0;
    margin-top: 1px;
}

.value-text {
    flex: 1;
}

.value-title {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 2px;
    line-height: 1.4;
}

.value-desc {
    font-size: 13px;
    color: #aaa;
    line-height: 1.4;
    margin: 0;
}

.premium-cta {
    padding: 20px 32px 24px;
    text-align: center;
    background: #1a1a2e;
    border-radius: 0 0 12px 12px;
    border-top: 1px solid #2d2d44;
}

.cta-label {
    font-size: 24px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 16px;
}

.google-btn-wrapper {
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
}

/* Force Google button to be larger using transform */
#googleSignUpBtn,
#googleLoginBtn,
#googleAuthBtn {
    transform: scale(1.3) !important;
    transform-origin: center !important;
    margin: 8px 0 !important;
}

/* Hide any extra Google button iframes */
#googleSignUpBtn iframe:not(:first-child),
#googleLoginBtn iframe:not(:first-child) {
    display: none !important;
}

/* Custom Google button styling to match Figma */
.google-btn-wrapper div[data-google-sign-in] {
    width: 360px;
    height: 56px;
    border-radius: 8px;
    border: 1px solid #dadce0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #3c4043;
}

.google-btn-wrapper div[data-google-sign-in]:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Clean Google button styling - no aggressive overrides */

.trust-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: #888;
    margin-top: 0;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 400;
}

.trust-divider {
    color: #d1d5db;
    font-weight: 400;
}

/* Error messages for premium modal */
.premium-auth-form .error-message {
    color: #ef4444;
    font-size: 14px;
    margin-top: 12px;
    text-align: center;
}

/* Hide empty error messages */
.premium-auth-form .error-message:empty {
    display: none;
}

/* Legacy forms should show in dev mode only */

/* Responsive adjustments */
@media (max-width: 568px) {
    .premium-modal-content {
        width: 95vw;
        max-width: 95vw;
        margin: 20px auto;
    }
    
    .premium-hero {
        padding: 24px 20px 20px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .hero-subtitle {
        font-size: 15px;
    }
    
    .value-grid {
        padding: 20px;
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .premium-cta {
        padding: 16px 20px 24px;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.close-btn:hover {
    color: #ffffff;
    background: #2d2d44;
}

/* Auth Styles */
.auth-container {
    width: 100%;
}

.auth-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    background: #2d2d44;
    border-radius: 8px;
    padding: 0.25rem;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: #888;
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.auth-form {
    display: block;
}

/* Google Auth Styles */
.google-auth-form {
    text-align: center;
    padding: 1rem 0;
}

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

.google-auth-form h2 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.auth-subtitle {
    color: #ccc;
    margin-bottom: 2rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.google-btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.5rem 0;
    min-height: 50px;
}

#googleSignUpBtn, #googleLoginBtn {
    margin: 0 auto;
}

/* Ensure Google button iframe doesn't overflow */
.google-btn-container iframe {
    max-width: 100%;
}

.legacy-auth-forms {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #2d2d44;
}

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

.auth-form h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #ffffff;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input {
    width: 100%;
    background: #2d2d44;
    border: 2px solid #3d3d54;
    border-radius: 8px;
    padding: 0.75rem;
    color: #ffffff;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

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

.auth-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 1rem;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    text-align: center;
}

.error-message:empty {
    display: none;
}

/* Login Page Styles */
.login-page {
    background: #0f0f23;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

.login-background {
    filter: blur(5px);
    opacity: 0.6;
    pointer-events: none;
}

.login-background .mobile-model-btn,
.login-background #promptInput,
.login-background #submitBtn {
    pointer-events: none;
    cursor: default;
}

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.login-modal {
    position: static;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.logo-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-link:hover .logo-text {
    opacity: 0.9;
}

/* Responsive adjustments for login page */
@media (max-width: 568px) {
    .login-overlay {
        padding: 10px;
    }
    
    .login-modal {
        width: 100%;
        max-width: 100%;
    }
}

/* Conversion Modal Styles */
.conversion-modal {
    padding: 0;
    width: 500px;
    max-width: 500px;
    font-family: inherit;
}

.conversion-hero {
    text-align: center;
    padding: 2rem 2rem 1.5rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px 16px 0 0;
    position: relative;
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.savings-badge {
    display: inline-block;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.conversion-title {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.price-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.individual-cost {
    text-align: center;
}

.strikethrough {
    color: #e74c3c;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: line-through;
    opacity: 0.8;
}

.individual-cost small {
    display: block;
    color: #aaa;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.our-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.price-large {
    color: #27ae60;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.price-period {
    color: #27ae60;
    font-size: 1rem;
    font-weight: 600;
}

.value-props {
    padding: 1.5rem 2rem;
    background: #1a1a2e;
    border-top: 1px solid #2d2d44;
}

.value-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: left;
}

.value-item:last-child {
    margin-bottom: 0;
}

.checkmark {
    color: #27ae60;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    line-height: 1.4;
    margin-top: 0;
}

.payment-section {
    padding: 2rem;
    background: #1a1a2e;
    border-radius: 0 0 16px 16px;
    border-top: 1px solid #2d2d44;
}

.signup-section {
    padding: 2rem;
    background: #1a1a2e;
    border-radius: 0 0 16px 16px;
    border-top: 1px solid #2d2d44;
    text-align: center;
}


.security-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0 0 1rem 0;
}

.security-badge {
    font-size: 0.8rem;
    color: #27ae60;
    font-weight: 500;
}

.payment-form {
    margin-bottom: 1.5rem;
}

.card-input-section {
    margin-bottom: 1.5rem;
}

.input-label {
    display: block;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    text-align: center;
}

.card-element {
    background: #2d2d44;
    border: 2px solid #3d3d54;
    border-radius: 8px;
    padding: 1rem;
    transition: border-color 0.2s;
}

.card-element:focus-within {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.card-errors {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    min-height: 1.2rem;
}

.cta-button {
    width: 100%;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border: none;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(39, 174, 96, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(39, 174, 96, 0.4);
}

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

.cta-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 20px rgba(39, 174, 96, 0.3);
}

.button-text {
    display: block;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.button-subtext {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 500;
}

.trust-indicators {
    text-align: center;
}

.guarantee {
    color: #aaa;
    font-size: 0.85rem;
    line-height: 1.4;
}

.guarantee strong {
    color: #27ae60;
}

/* Stripe Modal Adjustments */
.stripe-modal-content {
    max-width: 500px;
    width: 500px;
    padding: 0;
    position: relative;
}

.stripe-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stripe-close-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Footer Styles */
.footer {
    background: #1a1a2e;
    border-top: 1px solid #2d2d44;
    padding: 0.63rem 2rem;
    flex-shrink: 0;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.footer-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.company-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo {
    height: 1.2rem;
    width: auto;
}

.company-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.95rem;
}

.copyright {
    color: #aaa;
    font-size: 0.8rem;
    text-align: center;
    grid-column: 2;
}

.footer-message {
    color: #aaa;
    font-size: 0.85rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-self: end;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #2d2d44;
    color: #aaa;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-link:hover {
    background: #667eea;
    color: #ffffff;
    transform: translateY(-2px);
}

.social-icon {
    width: 18px;
    height: 18px;
}

/* Billing Styles */
.billing-content {
    max-width: 600px;
}

.usage-stats {
    background: #2d2d44;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.plans-section h3 {
    margin-bottom: 1rem;
}

.plan-card {
    background: #2d2d44;
    border: 2px solid #3d3d54;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

.plan-card.current {
    border-color: #667eea;
}

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

.plan-name {
    font-size: 1.2rem;
    font-weight: 600;
}

.plan-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.plan-features {
    list-style: none;
    margin-bottom: 1rem;
}

.plan-features li {
    padding: 0.25rem 0;
    color: #ccc;
}

.plan-features li::before {
    content: "✓ ";
    color: #27ae60;
    font-weight: bold;
}

.plan-btn {
    width: 100%;
    background: #667eea;
    border: none;
    border-radius: 6px;
    padding: 0.75rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.plan-btn:hover {
    background: #5a6fd8;
}

.plan-btn:disabled {
    background: #555;
    cursor: not-allowed;
}

.credit-options {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.credit-btn {
    flex: 1;
    background: #2d2d44;
    border: 2px solid #3d3d54;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.credit-btn:hover {
    border-color: #667eea;
    background: #3d3d54;
}

.credit-btn.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Toast */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #2d2d44;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 3000;
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    background: #e74c3c;
}

.toast.success {
    background: #27ae60;
}

/* Loading Spinner */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Skeleton Loading Styles */
.skeleton {
    background: linear-gradient(90deg, #2d2d44 25%, #3d3d54 50%, #2d2d44 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text.large {
    height: 1.5rem;
}

.skeleton-text.small {
    height: 0.8rem;
}

.skeleton-text.w-full {
    width: 100%;
}

.skeleton-text.w-3-4 {
    width: 75%;
}

.skeleton-text.w-1-2 {
    width: 50%;
}

.skeleton-text.w-1-4 {
    width: 25%;
}

.skeleton-button {
    height: 2.5rem;
    width: 100%;
    margin-bottom: 1rem;
}

.skeleton-progress-bar {
    height: 8px;
    width: 100%;
    margin: 0.5rem 0;
}

.billing-skeleton {
    animation: none;
}

.billing-skeleton .skeleton {
    background: linear-gradient(90deg, #2d2d44 25%, #3d3d54 50%, #2d2d44 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes typing-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .response-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Allow scrolling on mobile */
    body {
        overflow: auto;
    }
    
    .header {
        padding: 1rem;
    }
    
    .input-section {
        padding: 1rem;
    }
    
    .input-container {
        flex-direction: row;
        gap: 0.75rem;
        align-items: center;
    }
    
    /* Show mobile model selector on mobile */
    .mobile-model-selector {
        display: flex !important;
    }
    
    /* Mobile: Single full-page column */
    .response-grid {
        display: block;
    }
    
    /* Mobile: Hide all model columns by default */
    .model-column {
        display: none;
    }
    
    /* Mobile: Show only the active model column - full page */
    .model-column.mobile-active {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: calc(100vh - 60px); /* Full height minus header */
    }
    
    /* Hide model header on mobile to save space for chat */
    .model-column.mobile-active .model-header {
        display: none !important;
    }
    
    /* Round arrow submit button */
    .submit-btn {
        min-width: 48px;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        padding: 0;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }
    
    .submit-btn::before {
        content: "↑";
        font-size: 1.8rem;
        font-weight: 900;
        line-height: 0.8;
        margin-top: -4px;
        text-shadow: 0 0 1px currentColor;
        letter-spacing: 0;
        transition: opacity 0.2s;
    }
    
    .submit-btn:disabled::before {
        opacity: 0;
    }
    
    .submit-btn #submitText,
    .submit-btn .loading-spinner {
        display: none !important;
    }
    
    .submit-btn:disabled::after {
        content: "";
        position: absolute;
        width: 20px;
        height: 20px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-top: 2px solid white;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .usage-info {
        flex-direction: column !important;
        gap: 0.5rem !important;
        text-align: center !important;
    }
    
    .usage-progress {
        justify-content: center !important;
        min-width: auto !important;
        width: 100% !important;
        max-width: 240px !important;
        margin: 0 auto !important;
    }
    
    .footer {
        display: none !important;
    }
}

/* History delimiter */
.history-delimiter {
    width: 90%;
    height: 1px;
    background: #3d3d54;
    margin: 0 auto;
    opacity: 0.6;
}