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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #000;
    color: #fff;
    overflow: hidden;
    height: 100vh;
    position: relative;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
}

/* Camera Container */
.camera-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #111;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#camera-view {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.permission-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    display: none;
}

.permission-message.show {
    display: block;
}

.permission-message p {
    margin-bottom: 16px;
}

.retry-button {
    background-color: #10a37f;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 8px;
}

.retry-button:hover {
    background-color: #0e8c6b;
}

.retry-button:active {
    transform: scale(0.98);
}

/* Camera Loading Indicator */
.camera-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.camera-loading p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* Photo Stack */
.photo-stack {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.photo-stack:hover {
    transform: scale(1.05);
}

.stack-placeholder {
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.stack-placeholder.hidden {
    display: none;
}

/* Photo Items in Stack */
.photo-item {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Prevent image from interfering with click */
}

/* Photo delete button */
.photo-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2;
}

.photo-delete-btn:hover {
    background-color: #ff4444;
    transform: scale(1.1);
}

.photo-delete-btn svg {
    width: 14px;
    height: 14px;
}

/* Show delete button on hover or when stack is expanded */
.photo-item:hover .photo-delete-btn,
.photo-stack.expanded .photo-delete-btn {
    display: flex;
}

/* Hide delete button when photo is being deleted */
.photo-item.deleting {
    opacity: 0.5;
    pointer-events: none;
}

.photo-item.deleting .photo-delete-btn {
    display: none;
}

/* Hover effect when stack is expanded */
.photo-stack.expanded .photo-item:hover {
    transform: scale(1.3) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* Active photo indicator */
.photo-item.active {
    border: 2px solid #10a37f;
}

.photo-stack.expanded .photo-item.active {
    box-shadow: 0 4px 20px rgba(16, 163, 127, 0.6);
}

/* Photo analyzing indicator */
.photo-item::after {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-item.analyzing::after {
    opacity: 1;
    background-color: #ffa500;
    animation: pulse 1.5s infinite;
}

.photo-item.has-response::after {
    opacity: 1;
    background-color: #10a37f;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Stack States */
.photo-stack.collapsed .photo-item {
    transform: translate(0, 0) rotate(0deg);
}

/* Add slight offset for each photo in collapsed state to create visible stack */
.photo-stack.collapsed .photo-item:nth-child(1) {
    transform: translate(0, 0) rotate(0deg);
    z-index: 9;
}

.photo-stack.collapsed .photo-item:nth-child(2) {
    transform: translate(2px, 2px) rotate(1deg);
    z-index: 8;
}

.photo-stack.collapsed .photo-item:nth-child(3) {
    transform: translate(4px, 4px) rotate(-1deg);
    z-index: 7;
}

.photo-stack.collapsed .photo-item:nth-child(4) {
    transform: translate(6px, 6px) rotate(2deg);
    z-index: 6;
}

.photo-stack.collapsed .photo-item:nth-child(5) {
    transform: translate(8px, 8px) rotate(-2deg);
    z-index: 5;
}

.photo-stack.collapsed .photo-item:nth-child(6) {
    transform: translate(10px, 10px) rotate(1deg);
    z-index: 4;
}

.photo-stack.collapsed .photo-item:nth-child(7) {
    transform: translate(12px, 12px) rotate(-1deg);
    z-index: 3;
}

.photo-stack.collapsed .photo-item:nth-child(8) {
    transform: translate(14px, 14px) rotate(2deg);
    z-index: 2;
}

.photo-stack.collapsed .photo-item:nth-child(9) {
    transform: translate(16px, 16px) rotate(-2deg);
    z-index: 1;
}

.photo-stack.expanded .photo-item:nth-child(1) {
    transform: translate(-90px, -120px) rotate(-15deg) scale(1.2);
}

.photo-stack.expanded .photo-item:nth-child(2) {
    transform: translate(-180px, -100px) rotate(-10deg) scale(1.2);
}

.photo-stack.expanded .photo-item:nth-child(3) {
    transform: translate(-270px, -80px) rotate(-5deg) scale(1.2);
}

.photo-stack.expanded .photo-item:nth-child(4) {
    transform: translate(-90px, -220px) rotate(5deg) scale(1.2);
}

.photo-stack.expanded .photo-item:nth-child(5) {
    transform: translate(-180px, -200px) rotate(10deg) scale(1.2);
}

.photo-stack.expanded .photo-item:nth-child(6) {
    transform: translate(-270px, -180px) rotate(15deg) scale(1.2);
}

.photo-stack.expanded .photo-item:nth-child(7) {
    transform: translate(-90px, -320px) rotate(-8deg) scale(1.2);
}

.photo-stack.expanded .photo-item:nth-child(8) {
    transform: translate(-180px, -300px) rotate(8deg) scale(1.2);
}

.photo-stack.expanded .photo-item:nth-child(9) {
    transform: translate(-270px, -280px) rotate(-12deg) scale(1.2);
}

/* Capture Animation */
@keyframes captureFlash {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.capture-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
    animation: captureFlash 0.3s ease-out;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .photo-stack {
        bottom: 15px;
        right: 15px;
        width: 60px;
        height: 60px;
    }
    
    .photo-item {
        width: 60px;
        height: 60px;
    }
    
    .stack-placeholder {
        font-size: 10px;
    }
    
    .photo-stack.expanded .photo-item:nth-child(1) {
        transform: translate(-60px, -80px) rotate(-15deg) scale(1.15);
    }
    
    .photo-stack.expanded .photo-item:nth-child(2) {
        transform: translate(-120px, -65px) rotate(-10deg) scale(1.15);
    }
    
    .photo-stack.expanded .photo-item:nth-child(3) {
        transform: translate(-180px, -50px) rotate(-5deg) scale(1.15);
    }
    
    .photo-stack.expanded .photo-item:nth-child(4) {
        transform: translate(-60px, -140px) rotate(5deg) scale(1.15);
    }
    
    .photo-stack.expanded .photo-item:nth-child(5) {
        transform: translate(-120px, -125px) rotate(10deg) scale(1.15);
    }
    
    .photo-stack.expanded .photo-item:nth-child(6) {
        transform: translate(-180px, -110px) rotate(15deg) scale(1.15);
    }
    
    .photo-stack.expanded .photo-item:nth-child(7) {
        transform: translate(-60px, -200px) rotate(-8deg) scale(1.15);
    }
    
    .photo-stack.expanded .photo-item:nth-child(8) {
        transform: translate(-120px, -185px) rotate(8deg) scale(1.15);
    }
    
    .photo-stack.expanded .photo-item:nth-child(9) {
        transform: translate(-180px, -170px) rotate(-12deg) scale(1.15);
    }
}

/* AI Overlay */
.ai-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 2000;
}

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

.ai-content {
    background-color: #1a1a1a;
    border-radius: 16px;
    max-width: 90%;
    max-height: 90%;
    width: 800px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.close-button {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    z-index: 1;
}

.close-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.ai-image-preview {
    width: 100%;
    height: 300px;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ai-image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ai-response {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    background-color: #1a1a1a;
    color: #fff;
    font-size: 16px;
    line-height: 1.6;
    min-height: 200px;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    align-items: center;
    gap: 4px;
}

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

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
    animation: typing 1.4s infinite;
    opacity: 0.3;
}

.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% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-10px);
    }
}

/* API Key Setup */
.api-key-setup {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1500;
}

.api-key-button {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.api-key-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.api-key-button.active {
    background-color: #10a37f;
    border-color: #10a37f;
}

.api-key-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 3000; /* Increased z-index */
}

.api-key-modal.active {
    opacity: 1;
    visibility: visible;
}

.api-key-modal-content {
    background-color: #1a1a1a;
    padding: 32px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
}

.api-key-modal-content h3 {
    margin-bottom: 12px;
    font-size: 20px;
}

.api-key-modal-content p {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.api-key-modal-content input {
    width: 100%;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    margin-bottom: 20px;
}

.api-key-modal-content input:focus {
    outline: none;
    border-color: #10a37f;
}

.api-key-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.api-key-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

#save-api-key {
    background-color: #10a37f;
    color: #fff;
}

#save-api-key:hover {
    background-color: #0e8c6b;
}

#cancel-api-key {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

#cancel-api-key:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Mobile adjustments for overlay */
@media (max-width: 768px) {
    .ai-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .ai-image-preview {
        height: 200px;
    }
    
    .ai-response {
        padding: 16px;
        font-size: 14px;
    }
    
    .api-key-button {
        padding: 8px;
    }
    
    .api-key-button svg {
        width: 16px;
        height: 16px;
    }
}

/* Feedback UI Styles */
.feedback-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.feedback-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(16, 163, 127, 0.1);
    color: #10a37f;
    border: 1px solid #10a37f;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
}

.feedback-button:hover {
    background-color: rgba(16, 163, 127, 0.2);
    transform: translateY(-1px);
}

.feedback-button svg {
    flex-shrink: 0;
}

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

.feedback-input {
    width: 100%;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.feedback-input:focus {
    outline: none;
    border-color: #10a37f;
    background-color: rgba(255, 255, 255, 0.08);
}

.feedback-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.feedback-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.feedback-submit,
.feedback-cancel {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.feedback-submit {
    background-color: #10a37f;
    color: white;
}

.feedback-submit:hover {
    background-color: #0e8c6b;
}

.feedback-cancel {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feedback-cancel:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.feedback-received {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #10a37f;
    padding: 12px;
    background-color: rgba(16, 163, 127, 0.1);
    border-radius: 8px;
    font-size: 14px;
}

.feedback-received svg {
    flex-shrink: 0;
}

/* Mobile adjustments for feedback UI */
@media (max-width: 768px) {
    .feedback-button {
        font-size: 13px;
        padding: 10px 16px;
    }
    
    .feedback-input {
        font-size: 13px;
        padding: 10px;
    }
    
    .feedback-submit,
    .feedback-cancel {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* Authentication Screen */
.auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

.auth-container {
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 48px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.auth-logo {
    margin-bottom: 24px;
    color: #10a37f;
}

.auth-container h1 {
    font-size: 32px;
    margin-bottom: 8px;
    font-weight: 600;
}

.auth-container p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
}

#auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Auth Tabs Styles */
.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
}

.auth-tab.active {
    background-color: #10a37f;
    border-color: #10a37f;
    color: #fff;
}

/* Auth Forms */
.auth-form {
    display: none;
    flex-direction: column;
    gap: 12px;
}

.auth-form.active {
    display: flex;
}

.auth-form input {
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    transition: all 0.2s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: #10a37f;
    background-color: rgba(255, 255, 255, 0.08);
}

.auth-form.error {
    animation: shake 0.5s ease;
}



@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.auth-form button[type="submit"] {
    padding: 14px 28px;
    background-color: #10a37f;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 8px;
}

.auth-form button[type="submit"]:hover {
    background-color: #0e8c6b;
    transform: translateY(-2px);
}

.auth-form button[type="submit"]:active {
    transform: translateY(0);
}

.auth-error {
    color: #ff6b6b;
    font-size: 14px;
    margin-top: 16px;
    min-height: 20px;
}

/* Settings Button */
.settings-button-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1500;
}

.settings-button {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Settings Modal */
.settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 3000;
}

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

.settings-modal-content {
    background-color: #1a1a1a;
    padding: 32px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.settings-modal-content h3 {
    margin-bottom: 24px;
    font-size: 24px;
    padding-right: 40px; /* Make room for close button */
}

.settings-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.settings-section h4 {
    margin-bottom: 12px;
    color: #10a37f;
}

.settings-section p {
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}



.logout-button {
    padding: 10px 20px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.logout-button:hover {
    background-color: #ff5252;
}

.close-settings {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease, background-color 0.2s ease;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-settings:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.2);
}

.settings-section button:hover {
    background-color: #dc2626;
}

.settings-description {
    color: #999;
    font-size: 14px;
    margin-bottom: 12px;
}

.prompt-input {
    width: 100%;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.prompt-input:focus {
    outline: none;
    border-color: #10a37f;
    background-color: rgba(255, 255, 255, 0.15);
}

.save-prompt-button {
    margin-top: 12px;
    padding: 10px 20px;
    background-color: #10a37f;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.save-prompt-button:hover {
    background-color: #0e8c6b;
}

.prompt-status {
    margin-top: 8px;
    font-size: 14px;
    min-height: 20px;
}

.prompt-status.success {
    color: #10a37f;
}

.prompt-status.error {
    color: #ff6b6b;
}

/* API Provider Selector Styles */
.api-provider-selector {
    margin: 16px 0;
}

.api-provider-option {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.api-provider-option:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.api-provider-option input[type="radio"] {
    margin-right: 12px;
    margin-top: 4px;
}

.provider-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.provider-label strong {
    font-size: 16px;
    color: #fff;
}

.provider-label small {
    font-size: 13px;
    color: #999;
}

.api-key-settings {
    margin-top: 20px;
}

.key-section {
    margin-bottom: 16px;
    padding: 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: none;
}

.key-section.active {
    display: block;
}

.key-section label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #ccc;
}

.key-section input {
    width: calc(100% - 80px);
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    margin-right: 8px;
}

.save-key-button {
    padding: 10px 16px;
    background-color: #10a37f;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.save-key-button:hover {
    background-color: #0e8c6b;
}

/* Mobile adjustments for auth and settings */
@media (max-width: 768px) {
    .auth-container {
        padding: 32px 24px;
    }
    
    .auth-container h1 {
        font-size: 28px;
    }
    
    .auth-form button[type="submit"] {
        padding: 12px 24px;
        font-size: 15px;
    }
    
    .settings-modal {
        align-items: flex-start;
        padding: 0;
    }
    
    .settings-modal-content {
        padding: 20px;
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        margin: 0;
    }
    
    .settings-modal-content h3 {
        font-size: 20px;
        padding-right: 35px;
    }
    
    .close-settings {
        top: 12px;
        right: 12px;
        width: 35px;
        height: 35px;
        font-size: 20px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .settings-section {
        margin-bottom: 24px;
        padding-bottom: 24px;
    }
    
    .settings-section h4 {
        font-size: 16px;
    }
    
    .settings-section p {
        font-size: 13px;
    }
    
    .prompt-input {
        min-height: 80px;
        font-size: 13px;
    }
    
    .api-provider-option {
        padding: 10px;
    }
    
    .provider-label strong {
        font-size: 14px;
    }
    
    .provider-label small {
        font-size: 12px;
    }
    
    .key-section {
        padding: 12px;
    }
    
    .key-section input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .save-key-button {
        width: 100%;
    }
    
    .logout-button {
        width: 100%;
    }
}

/* Extra small mobile adjustments */
@media (max-width: 400px) {
    .settings-modal-content {
        padding: 16px;
    }
    
    .settings-modal-content h3 {
        font-size: 18px;
        margin-bottom: 16px;
    }
    
    .close-settings {
        width: 32px;
        height: 32px;
        font-size: 18px;
        top: 10px;
        right: 10px;
    }
    
    .settings-section {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
    
    .settings-section h4 {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .save-prompt-button,
    .logout-button,
    .save-key-button {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* Notification Toast Styles */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    background-color: #1a1a1a;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateX(400px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    max-width: 400px;
}

.notification-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 14px;
}

.notification-toast.success {
    background-color: #10a37f;
}

.notification-toast.info {
    background-color: #3b82f6;
}

.notification-toast.error {
    background-color: #ef4444;
}

.notification-content svg {
    flex-shrink: 0;
}

/* Mobile adjustment for notifications */
@media (max-width: 768px) {
    .notification-toast {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(100px);
    }
    
    .notification-toast.show {
        transform: translateY(0);
    }
}

/* Code Block Styles */
.ai-text {
    margin-bottom: 16px;
    line-height: 1.6;
}

.code-block-container {
    margin: 16px 0;
    border-radius: 8px;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.3);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background-color: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-language {
    font-size: 12px;
    text-transform: uppercase;
    color: #999;
    font-weight: 600;
}

.render-code-button {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #10a37f;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.render-code-button:hover {
    background-color: #0e8c6b;
    transform: translateY(-1px);
}

.render-code-button svg {
    width: 14px;
    height: 14px;
}

.code-block {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
    background-color: rgba(0, 0, 0, 0.2);
}

.code-block code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #e0e0e0;
    white-space: pre;
}



/* Console Output Styles */
.console-output {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    padding: 16px;
    background-color: #1a1a1a;
    border-radius: 4px;
    color: #e0e0e0;
    max-height: 400px;
    overflow-y: auto;
}

.console-log {
    margin-bottom: 8px;
    padding: 4px 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #3b82f6;
    white-space: pre-wrap;
    word-break: break-word;
}

.console-result {
    margin-top: 16px;
    padding: 12px;
    background-color: rgba(16, 163, 127, 0.1);
    border: 1px solid #10a37f;
    border-radius: 4px;
    white-space: pre-wrap;
}

.result-label {
    font-weight: 600;
    color: #10a37f;
    margin-right: 8px;
}

.console-error {
    padding: 12px;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    border-radius: 4px;
    color: #ff6b6b;
}

.console-info {
    padding: 12px;
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid #3b82f6;
    border-radius: 4px;
    color: #60a5fa;
    text-align: center;
}

/* Code Execution Overlay */
.code-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 2500;
}

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

.code-overlay-content {
    background-color: #1a1a1a;
    border-radius: 16px;
    width: 95%;
    height: 95%;
    max-width: 1400px;
    max-height: 900px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.code-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background-color: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-2px);
}

.back-button svg {
    width: 18px;
    height: 18px;
}

.code-execution-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.close-code-button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.close-code-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.code-execution-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Fullscreen iframe for HTML/CSS */
.code-execution-container .fullscreen-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

/* Console output in fullscreen */
.code-execution-container .fullscreen-console {
    flex: 1;
    padding: 24px;
    background-color: #0d0d0d;
    overflow-y: auto;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #e0e0e0;
}

.fullscreen-console .console-log {
    margin-bottom: 12px;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #3b82f6;
    border-radius: 4px;
}

.fullscreen-console .console-result {
    margin-top: 20px;
    padding: 16px;
    background-color: rgba(16, 163, 127, 0.1);
    border: 1px solid #10a37f;
    border-radius: 8px;
}

.fullscreen-console .console-error {
    padding: 16px;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    border-radius: 8px;
    color: #ff6b6b;
}

/* SVG container in fullscreen */
.code-execution-container .fullscreen-svg {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: white;
}

.fullscreen-svg svg {
    max-width: 100%;
    max-height: 100%;
}

/* Mobile adjustments for code overlay */
@media (max-width: 768px) {
    .code-overlay-content {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }
    
    .code-overlay-header {
        padding: 12px 16px;
    }
    
    .back-button {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .code-execution-title {
        font-size: 16px;
    }
    
    .close-code-button {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}

/* Mobile adjustments for code blocks */
@media (max-width: 768px) {
    .code-block {
        padding: 12px;
        font-size: 12px;
    }
} 

/* PWA Install Banner */
.pwa-install-banner {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    z-index: 3000;
    transition: bottom 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.pwa-install-banner.show {
    bottom: 0;
}

.install-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.install-banner-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background-color: rgba(16, 163, 127, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.install-banner-icon svg {
    width: 24px;
    height: 24px;
    color: #10a37f;
}

.install-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.install-banner-text strong {
    font-size: 16px;
    color: #fff;
}

.install-banner-text span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.install-banner-button {
    background-color: #10a37f;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.install-banner-button:hover {
    background-color: #0e8c6b;
}

.install-banner-button:active {
    transform: scale(0.98);
}

.install-banner-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 20px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.install-banner-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 480px) {
    .pwa-install-banner {
        padding: 12px;
    }
    
    .install-banner-content {
        gap: 8px;
    }
    
    .install-banner-icon {
        width: 36px;
        height: 36px;
    }
    
    .install-banner-text strong {
        font-size: 14px;
    }
    
    .install-banner-text span {
        font-size: 12px;
    }
    
    .install-banner-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}