* {
    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;
    color: #333;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.header {
    background: linear-gradient(135deg, #ea6666 0%, #f80000 100%);
    color: rgb(255, 255, 255);
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 5px;
    font-weight: 700;
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    gap: 20px;
    padding: 20px;
    overflow: hidden;
}

/* Chat Container */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    animation: slideIn 0.3s ease-out;
}

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

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

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 12px;
    padding: 12px 16px;
    max-width: 70%;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.bot-message .message-content {
    background: #f0f0f0;
    color: #333;
    border-radius: 12px 12px 12px 0;
    padding: 12px 16px;
    max-width: 70%;
    word-wrap: break-word;
    line-height: 1.6;
}

.message-content p {
    margin: 0;
    line-height: 1.5;
}

.message-content ul {
    margin: 10px 0 0 20px;
    line-height: 1.8;
}

.message-content li {
    margin: 5px 0;
}

/* Chat Input Area */
.chat-input-area {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
}

.chat-form {
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

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

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

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

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

/* Loading Animation */
.loading {
    text-align: center;
    padding: 10px;
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    margin: 0 4px;
    animation: bounce 1.4s infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-10px);
    }
}

/* Sidebar */
.sidebar {
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.quick-links,
.info-box,
.action-box {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.quick-links h3,
.info-box h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: 600;
}

.quick-link-btn {
    display: block;
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.3s;
    text-align: left;
    font-weight: 500;
}

.quick-link-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateX(5px);
}

.info-box ul {
    list-style: none;
}

.info-box li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95em;
}

.info-box li:last-child {
    border-bottom: none;
}

.info-box strong {
    color: #667eea;
    font-weight: 600;
}

.clear-btn {
    width: 100%;
    padding: 12px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.clear-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-height: 300px;
    }

    .user-message .message-content,
    .bot-message .message-content {
        max-width: 100%;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .header p {
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 10px;
        gap: 10px;
    }

    .header {
        padding: 15px;
    }

    .header h1 {
        font-size: 1.5em;
    }

    .chat-input {
        font-size: 16px;
    }
}

/* Creators Button */
.header-buttons {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.creators-btn,
.install-app-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s;
}

.creators-btn:hover,
.install-app-btn:hover {
    background: white;
    color: #dc143c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
    position: relative;
}

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

.close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: #dc143c;
}

.modal-content h2 {
    color: #dc143c;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
}

.creators-info {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: center;
    justify-content: center;
}

.creator {
    flex: 1;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 12px;
    transition: transform 0.3s;
}

.creator:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.creator-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.creator h3 {
    color: #dc143c;
    font-size: 1.5em;
    margin-bottom: 8px;
}

.creator-role {
    color: #667eea;
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 12px;
}

.creator-desc {
    color: #555;
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 0.95em;
}

.creator-email,
.creator-tech {
    color: #888;
    font-size: 0.9em;
    font-weight: 500;
}

.creator-divider {
    font-size: 3em;
    color: #dc143c;
}

.project-info {
    background: linear-gradient(135deg, #dc143c 0%, #8b0000 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.project-info h3 {
    margin-bottom: 15px;
    font-size: 1.3em;
}

.project-info p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.project-info strong {
    font-weight: 700;
}

.project-info a {
    color: white;
    text-decoration: underline;
    font-weight: 600;
}

.project-info a:hover {
    color: #ffeb3b;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .creators-info {
        flex-direction: column;
    }

    .creator-divider {
        transform: rotate(90deg);
        font-size: 2em;
    }

    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }

    .modal-content h2 {
        font-size: 1.5em;
    }

    .creator h3 {
        font-size: 1.2em;
    }
}

/* PWA Install Prompt */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        bottom: -100px;
        opacity: 0;
    }
    to {
        bottom: 20px;
        opacity: 1;
    }
}

.install-content {
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 90vw;
    position: relative;
}

.install-icon {
    font-size: 2.5em;
}

.install-text strong {
    display: block;
    color: #dc143c;
    font-size: 1.1em;
    margin-bottom: 3px;
}

.install-text p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

.install-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #dc143c 0%, #8b0000 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s;
}

.install-btn:hover {
    transform: scale(1.05);
}

.install-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    font-size: 1.5em;
    color: #999;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.install-close:hover {
    color: #dc143c;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .install-content {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
    }
    
    .install-icon {
        font-size: 3em;
    }
}

/* Standalone mode (when installed as app) */
@media all and (display-mode: standalone) {
    .install-prompt {
        display: none !important;
    }
    
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Install Instructions Modal */
.install-instructions {
    padding: 20px 0;
}

.install-option {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 12px;
}

.install-option h3 {
    color: #dc143c;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.install-option ol {
    margin-left: 20px;
    line-height: 2;
}

.install-option li {
    margin-bottom: 10px;
    font-size: 1.05em;
}

.install-option strong {
    color: #dc143c;
    font-weight: 700;
}

.ios-note {
    margin-top: 15px;
    padding: 15px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    font-size: 0.95em;
}

.install-benefits {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #dc143c 0%, #8b0000 100%);
    color: white;
    border-radius: 12px;
}

.install-benefits h3 {
    margin-bottom: 15px;
    font-size: 1.2em;
}

.install-benefits ul {
    list-style: none;
    padding: 0;
}

.install-benefits li {
    padding: 8px 0;
    font-size: 1.05em;
}

#androidInstallBtn {
    margin-top: 15px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #dc143c 0%, #8b0000 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

#androidInstallBtn:hover {
    transform: scale(1.05);
}

/* Responsive Install Modal */
@media (max-width: 768px) {
    .install-option {
        padding: 15px;
    }
    
    .install-option h3 {
        font-size: 1.1em;
    }
    
    .install-option li {
        font-size: 1em;
    }
}

/* Google Sign-In Button */
.login-btn {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background: white;
    color: #333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* User Profile */
#userProfile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 30px;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid white;
}

.user-name {
    color: white;
    font-weight: 600;
    font-size: 0.95em;
}

.logout-btn {
    padding: 6px 14px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: white;
    color: #dc143c;
}

/* OTP Login */
.otp-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.otp-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.otp-input:focus {
    outline: none;
    border-color: #dc143c;
}

.otp-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #dc143c, #8b0000);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.otp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.4);
}

.otp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.otp-note {
    text-align: center;
    color: #999;
    font-size: 0.85em;
    margin-top: 10px;
}

.otp-success { color: #4caf50; }
.otp-error { color: #f44336; }
