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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    gap: 40px;
}

.header-text {
    flex: 1;
    text-align: left;
}

.header-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.1rem;
    font-style: italic;
    opacity: 0.9;
    margin: 8px 0 0 0;
}

/* Jesus Representation Selector Styles */
.representation-selector {
    flex-shrink: 0;
}

.jesus-selector {
    display: flex;
    justify-content: center;
    align-items: center;
}

.jesus-image-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.jesus-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.8);
    transition: all 0.4s ease;
    cursor: pointer;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.jesus-image:hover {
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.05);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4);
}

.selector-dots {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

.dot.active {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }
    
    .header-text {
        text-align: center;
    }
    
    .header-text h1 {
        font-size: 2rem;
    }
    
    .jesus-image {
        width: 150px;
        height: 150px;
    }
}

.chat-container {
    height: 500px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    margin-bottom: 20px;
    display: flex;
    animation: fadeInUp 0.3s ease;
}

.user-message {
    justify-content: flex-end;
}

.bot-message {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 15px 20px;
    border-radius: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 5px;
}

.bot-message .message-content {
    background: white;
    color: #333;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.chat-input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

#messageInput {
    flex: 1;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 12px 15px;
    background: #f8f9fa;
    resize: none;
    outline: none;
    font-size: 0.95rem;
    line-height: 1.4;
    min-height: 50px;
    max-height: 120px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

#messageInput:focus {
    border-color: #667eea;
    background: white;
}

#messageInput::placeholder {
    color: #6c757d;
}

#sendButton {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

#sendButton:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .chat-header {
        padding: 20px;
    }
    
    .chat-header h1 {
        font-size: 2rem;
    }
    
    .jesus-images {
        gap: 15px;
    }
    
    .jesus-image {
        width: 70px;
        height: 70px;
    }
    
    .jesus-label {
        font-size: 0.8rem;
    }
    
    .chat-container {
        height: 400px;
    }
    
    .message-content {
        max-width: 85%;
        padding: 12px 16px;
    }
}



/* API Key Modal Styles */
.api-key-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.api-key-modal.active {
    display: flex;
}

.api-key-modal-content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    overflow-y: auto;
    margin: auto;
}

.api-key-modal-content h3 {
    margin-top: 0;
    color: #4a4a4a;
    font-size: 24px;
}

.api-key-modal-content p {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.5;
}

.api-key-input-container {
    display: flex;
    margin-bottom: 20px;
}

.api-key-input-container input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px 0 0 8px;
    font-size: 16px;
}

.api-key-input-container button {
    padding: 12px 20px;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: bold;
}

.api-key-note {
    font-size: 14px;
    color: #888;
}

.api-key-note a {
    color: #6e8efb;
    text-decoration: none;
}

#closeModalBtn {
    margin-top: 10px;
    padding: 10px 20px;
    background: #f1f1f1;
    color: #666;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* API Key Settings Button */
.api-key-settings {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
}

#apiKeySettingsBtn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    backdrop-filter: blur(5px);
    transition: background 0.3s;
}

#apiKeySettingsBtn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Status indicator for API key */
.api-key-status {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.api-key-status.active {
    background-color: #4CAF50;
}

.api-key-status.inactive {
    background-color: #F44336;
}


/* Hide Manus footer - Safe CSS-only approach */
a[href*="manus.im"] {
    display: none !important;
}

a[href*="Create my website"] {
    display: none !important;
}


/* Login Modal Styles */
#loginModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

#loginModal .modal-content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    margin: auto;
}

#loginModal h2 {
    color: #667eea;
    margin-bottom: 10px;
}

#loginModal h3 {
    color: #333;
    margin-bottom: 15px;
}

#loginModal input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

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

#loginModal button {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

#loginModal button:hover {
    background: #5a6fd8;
}

#loginModal .guest-button {
    background: #6c757d;
    margin-top: 20px;
}

#loginModal .guest-button:hover {
    background: #5a6268;
}

#loginModal a {
    color: #667eea;
    text-decoration: none;
}

#loginModal a:hover {
    text-decoration: underline;
}

#loginModal .message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    min-height: 20px;
}

/* User info display */
.user-info {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
}

.user-info button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 10px;
}

.user-info button:hover {
    background: #c82333;
}



/* Enhanced Modal Styles */
.scripture-quote, .welcome-scripture, .register-scripture {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    text-align: center;
    border-left: 4px solid #667eea;
}

.scripture-quote em, .welcome-scripture em, .register-scripture em {
    font-style: italic;
    color: #333;
    font-size: 1.1em;
    line-height: 1.4;
}

.scripture-reference {
    font-size: 0.9em;
    color: #666;
    margin-top: 8px;
    font-weight: 500;
}

.api-benefits {
    background: rgba(102, 126, 234, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
}

.api-benefits p {
    margin: 8px 0;
    font-size: 0.95em;
    line-height: 1.4;
}

.form-description {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
    text-align: center;
}

.guest-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.guest-description {
    color: #666;
    font-size: 0.9em;
    text-align: center;
    margin-bottom: 10px;
}

.privacy-note {
    font-size: 0.85em;
    color: #666;
    text-align: center;
    margin: 10px 0;
}

/* Enhanced button styles */
.api-key-modal button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 5px;
}

.api-key-modal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.modal button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 5px;
}

.modal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.guest-button {
    background: rgba(102, 126, 234, 0.2) !important;
    color: #333 !important;
    border: 2px solid #667eea !important;
}

.guest-button:hover {
    background: rgba(102, 126, 234, 0.3) !important;
}

/* Tooltip enhancements */
.jesus-image, .dot {
    cursor: pointer;
}

.jesus-image:hover, .dot:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}



/* Mobile-specific modal improvements */
@media (max-width: 768px) {
    .api-key-modal {
        align-items: flex-start;
        padding: 10px;
    }
    
    .api-key-modal-content {
        padding: 20px;
        margin-top: 20px;
        margin-bottom: 20px;
        max-height: calc(100vh - 40px);
        font-size: 14px;
    }
    
    .api-key-modal-content h3 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .api-benefits p {
        font-size: 13px;
        margin: 6px 0;
    }
    
    .scripture-quote, .welcome-scripture, .register-scripture {
        padding: 12px;
        margin: 12px 0;
    }
    
    .scripture-quote em, .welcome-scripture em, .register-scripture em {
        font-size: 1em;
    }
    
    #loginModal {
        align-items: flex-start;
        padding: 10px;
    }
    
    #loginModal .modal-content {
        padding: 20px;
        margin-top: 20px;
        margin-bottom: 20px;
        max-height: calc(100vh - 40px);
    }
    
    .api-key-input-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .api-key-input-container input {
        margin-bottom: 0;
    }
    
    .api-key-modal button, .modal button {
        width: 100%;
        margin: 8px 0;
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    .api-key-modal-content {
        padding: 15px;
        font-size: 13px;
    }
    
    .api-key-modal-content h3 {
        font-size: 18px;
    }
    
    #loginModal .modal-content {
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .jesus-image {
        width: 150px;
        height: 150px;
    }
    
    .header-text h1 {
        font-size: 2rem;
    }
}

