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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: transparent;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.demo-container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    pointer-events: none;
}

/* Browser Window */
.browser-window {
    width: 100%;
    height: 100vh;
    background: #fff;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    user-select: none;
    position: relative;
}

.browser-header {
    background: #292929;
    padding: 12px 20px 0;
    display: flex;
    align-items: center;
    border-bottom: none;
    position: relative;
    z-index: 10;
}

.traffic-lights {
    display: flex;
    gap: 8px;
    margin-right: 20px;
}

.traffic-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.traffic-light.red {
    background: #ff5f57;
}

.traffic-light.yellow {
    background: #ffbd2e;
}

.traffic-light.green {
    background: #28ca42;
}

.browser-tab {
    background: #1e1e1e;
    padding: 10px 20px;
    border-radius: 8px 8px 0 0;
    font-size: 14px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    bottom: 0;
}

.tab-favicon {
    width: 16px;
    height: 16px;
}

/* ChatGPT Interface */
.chatgpt-container {
    flex: 1;
    display: flex;
    background: #fff;
    overflow: hidden;
}

.chatgpt-sidebar {
    width: 260px;
    background: #f9f9f9;
    border-right: 1px solid #e5e5e5;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #e5e5e5;
}

.new-chat-btn {
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.new-chat-btn:hover {
    background: #f0f0f0;
}

.chat-history {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}

.chat-item {
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-item:hover {
    background: #f0f0f0;
}

.chat-item.active {
    background: #ececec;
    color: #333;
    font-weight: 500;
}

.chatgpt-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.chatgpt-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
}

.chatgpt-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

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

.message {
    display: flex;
    gap: 12px;
    max-width: 80%;
}

.message.assistant {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-content {
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 16px;
    line-height: 1.5;
}

.message.assistant .message-content {
    background: #f7f7f8;
    color: #333;
}

.message.user .message-content {
    background: #10a37f;
    color: white;
}

.input-container {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: flex-end;
    background: #f7f7f8;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 12px;
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: #10a37f;
}

.chat-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: 16px;
    line-height: 1.5;
    resize: none;
    max-height: 200px;
    color: #333;
}

.chat-input::placeholder {
    color: #999;
}

.send-btn {
    width: 32px;
    height: 32px;
    background: #10a37f;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-left: 8px;
}

.send-btn:hover {
    background: #0d8f6e;
}

.send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Animated Cursor */
.animated-cursor {
    position: absolute;
    pointer-events: none;
    z-index: 3000;
    opacity: 0;
}

.animated-cursor.visible {
    opacity: 1;
}

.animated-cursor img {
    width: 24px;
    height: 24px;
}

.animated-cursor .default-cursor {
    display: block;
}

.animated-cursor .pointer-cursor {
    display: none;
}

.animated-cursor.pointer .default-cursor {
    display: none;
}

.animated-cursor.pointer .pointer-cursor {
    display: block;
}

/* Context Menu */
.context-menu {
    position: absolute;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 4px;
    display: none;
    z-index: 999;
}

.context-menu.visible {
    display: block;
}

.menu-item {
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.menu-item:hover {
    background: #f0f0f0;
}

/* Blocking Modal */
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    pointer-events: none;
}

.modal-overlay.visible {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalAppear 0.3s ease-out;
}

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

.modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-icon.warning {
    background: #fef3c7;
    color: #f59e0b;
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #111;
    margin-bottom: 12px;
    text-align: center;
}

.modal-message {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 16px;
    text-align: center;
}

.detected-content {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #dc2626;
    line-height: 1.6;
}

.modal-warning {
    font-size: 14px;
    color: #dc2626;
    text-align: center;
    margin: 16px 0;
    font-weight: 500;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.modal-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn.stop {
    background: #10a37f;
    color: white;
}

.modal-btn.stop:hover {
    background: #0d8f6e;
}

.modal-btn.continue {
    background: #f3f4f6;
    color: #666;
}

.modal-btn.continue:hover {
    background: #e5e7eb;
}

/* Error Message */
.error-message {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 12px 20px;
    display: none;
    align-items: center;
    gap: 8px;
    color: #dc2626;
    font-size: 14px;
    animation: errorSlideUp 0.3s ease-out;
    margin: 20px auto;
    max-width: fit-content;
}

.error-message.visible {
    display: flex;
}

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

/* Success Toaster */
.success-toaster {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: none;
    align-items: center;
    gap: 16px;
    min-width: 380px;
    animation: toasterSlideIn 0.4s ease-out;
    z-index: 2500;
}

.success-toaster.visible {
    display: flex;
}

.toaster-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.toaster-content {
    flex: 1;
}

.toaster-title {
    font-size: 16px;
    font-weight: 600;
    color: #111;
    margin-bottom: 4px;
}

.toaster-message {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

@keyframes toasterSlideIn {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    
    .chatgpt-sidebar {
        display: none;
    }
    
    .modal-content {
        padding: 24px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .success-toaster {
        bottom: 20px;
        left: 20px;
        right: 20px;
        min-width: auto;
    }
}

/* Hide header on shorter screens */
@media (max-height: 700px) {
    .chat-header {
        display: none;
    }
}