/* 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-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
}

/* Container Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #242424;
}

.logo {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
}

.logo-link {
    display: inline-block;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.logo-img.sidebar-logo {
    height: 32px;
}

.nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: #111111;
}

.nav-link.primary {
    background-color: #111111;
    border: 1px solid #242424;
}

.nav-link.primary:hover {
    background-color: #1a1a1a;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

.hero {
    text-align: center;
    max-width: 600px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
}

.subtitle {
    font-size: 20px;
    color: #cccccc;
    margin-bottom: 32px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: 1px solid #242424;
    border-radius: 4px;
    background-color: #111111;
    color: #ffffff;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 16px;
}

.btn-primary {
    background-color: #ffffff;
    border-color: #ffffff;
    color: #000000;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    background-color: #f0f0f0;
}

.btn-primary.loading {
    background-color: transparent;
    border-color: #ffffff;
    color: transparent;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary.loading .btn-text {
    opacity: 0;
}

.btn-primary.loading .btn-spinner {
    opacity: 1;
}

.btn-submit {
    position: relative;
}

.btn-text {
    transition: opacity 0.3s ease;
}

.btn-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
    border-radius: 50%;
    opacity: 0;
    animation: spin 0.8s linear infinite;
    transition: opacity 0.3s ease;
}

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

/* Cloudflare Turnstile styling */
.cf-turnstile {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.btn-secondary {
    background-color: transparent;
    border-color: #242424;
}

.btn-secondary:hover {
    background-color: #111111;
}

.btn-block {
    width: 100%;
    text-align: center;
}

.btn-white {
    background-color: #ffffff;
    border-color: #ffffff;
    color: #000000;
}

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

/* Auth Pages - Split Layout */
.auth-split-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.auth-left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background-color: #000000;
    min-width: 0; /* Allow flex shrinking */
}

.auth-right-panel {
    flex: 1;
    position: relative;
    background-color: #121212;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.auth-text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    padding: 40px;
    text-align: center;
    pointer-events: none;
    max-width: 90%;
}

.auth-hero-text {
    font-size: 2.5rem;
    font-weight: 300;
    color: #cccccc;
    line-height: 1.4;
    margin: 0;
}

.auth-hero-text [data-text-cycle] {
    color: #ffffff;
    font-weight: 600;
}

#dot-grid-canvas {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.auth-header {
    width: 100%;
    padding: 20px 0;
    text-align: left;
    margin-bottom: 40px;
}

.auth-header .logo-img {
    height: 50px;
}

.auth-card {
    background-color: transparent;
    border: none;
    border-radius: 8px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
}

.auth-logo-container {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo-container .logo-img {
    height: 60px;
}

/* Legacy auth-container for backward compatibility */
.auth-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.auth-card h1 {
    font-size: 32px;
    margin-bottom: 24px;
    text-align: center;
}

.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 14px;
    border: 1px solid;
}

.flash-message.flash-success {
    background-color: #0f4c0f;
    border-color: #1a6a1a;
    color: #4ade80;
}

.flash-message.flash-error {
    background-color: #4c0f0f;
    border-color: #6a1a1a;
    color: #f87171;
}

.flash-message.flash-info {
    background-color: #0f1a4c;
    border-color: #1a2a6a;
    color: #60a5fa;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    color: #cccccc;
}

.form-group input {
    padding: 12px;
    background-color: #000000;
    border: 1px solid #242424;
    border-radius: 4px;
    color: #ffffff;
    font-size: 16px;
}

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

.auth-footer {
    margin-top: 24px;
    text-align: center;
    color: #cccccc;
    font-size: 14px;
}

.auth-footer a {
    color: #ffffff;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Legal Pages */
.legal-container {
    padding: 40px 20px;
}

.legal-header {
    padding: 20px 0;
    border-bottom: 1px solid #242424;
    margin-bottom: 40px;
}

.legal-header .logo-img {
    height: 40px;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h1 {
    font-size: 36px;
    margin-bottom: 8px;
    color: #ffffff;
}

.legal-date {
    color: #888888;
    font-size: 14px;
    margin-bottom: 32px;
}

.legal-intro {
    font-size: 16px;
    color: #cccccc;
    margin-bottom: 32px;
    line-height: 1.6;
}

.legal-section {
    margin-bottom: 32px;
}

.legal-section h2 {
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 16px;
    font-weight: 600;
}

.legal-section p {
    color: #cccccc;
    line-height: 1.6;
    margin-bottom: 12px;
}

.legal-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 12px;
}

.legal-list li {
    color: #cccccc;
    line-height: 1.8;
    padding-left: 24px;
    position: relative;
}

.legal-list li::before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #888888;
}

.legal-link {
    color: #4a9eff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.legal-link:hover {
    color: #6bb0ff;
    text-decoration: underline;
}

.placeholder-text {
    color: #cccccc;
    margin-bottom: 16px;
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid #242424;
    color: #cccccc;
    font-size: 14px;
}

.footer a {
    color: #cccccc;
    text-decoration: none;
}

.footer a:hover {
    color: #ffffff;
}

.separator {
    margin: 0 12px;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background-color: #000000;
}

/* Sidebar Container */
.sidebar-container {
    position: relative;
    flex-shrink: 0;
}

/* Sidebar */
.sidebar {
    height: 100vh;
    background-color: #111111;
    border-right: 1px solid #242424;
    display: flex;
    flex-direction: column;
    padding: 16px;
    width: 60px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

@media (min-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 100;
    }
}

.sidebar-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    gap: 20px;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-logo-container {
    margin-bottom: 32px;
    width: 100%;
}

.sidebar-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
    z-index: 20;
    padding: 8px;
    border-radius: 4px;
}

/* When collapsed, center the logo icon (matching navigation icons) */
.sidebar:not(:hover) .sidebar-logo-link {
    justify-content: center;
    padding-left: 8px;
    padding-right: 8px;
}

/* When expanded, align left */
.sidebar:hover .sidebar-logo-link {
    justify-content: flex-start;
}

.sidebar-logo-full {
    display: none;
}

.sidebar-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.logo-icon-img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
}

.sidebar-logo-img {
    height: 32px;
    width: auto;
    display: block;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 8px;
    color: #cccccc;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-size: 14px;
    position: relative;
    width: 100%;
}

/* When collapsed (not hovered), center the icon only */
.sidebar:not(:hover) .sidebar-link {
    justify-content: center;
    padding-left: 8px;
    padding-right: 8px;
}

.sidebar-link:hover {
    background-color: #1a1a1a;
    transform: translateX(4px);
}

.sidebar-link.active {
    background-color: #1a1a1a;
    color: #ffffff;
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: currentColor;
    aspect-ratio: 1 / 1;
}

.sidebar-link-text {
    white-space: nowrap;
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-user-email {
    padding: 8px;
    margin-bottom: 4px;
}

.sidebar-email-text {
    font-size: 12px;
    color: #888888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* When sidebar is collapsed, hide email text */
.sidebar:not(:hover) .sidebar-email-text {
    display: none;
}

.sidebar-link.logout {
    color: #ff4444;
}

.sidebar-link.logout:hover {
    background-color: #2a0000;
}

/* Mobile Menu Button */
.mobile-menu-button {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 101;
    width: 40px;
    height: 40px;
    background-color: #111111;
    border: 1px solid #242424;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (max-width: 767px) {
    .mobile-menu-button {
        display: flex;
    }
    
    .sidebar {
        display: none;
    }
}

.menu-icon {
    width: 24px;
    height: 24px;
    color: #ffffff;
}

/* Mobile Sidebar Overlay */
.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: 200;
    transform: translateX(-100%);
    opacity: 0;
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    padding: 40px;
}

.mobile-sidebar-overlay.open {
    transform: translateX(0);
    opacity: 1;
}

.mobile-sidebar-close {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    z-index: 50;
}

.mobile-sidebar-close svg {
    width: 24px;
    height: 24px;
}

.mobile-sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    gap: 20px;
}

@media (min-width: 768px) {
    .mobile-sidebar-overlay {
        display: none;
    }
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    padding: 40px;
    background-color: #000000;
    margin-left: 60px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 767px) {
    .dashboard-content {
        margin-left: 0;
        padding: 20px;
    }
}

.dashboard-page h1 {
    font-size: 32px;
    margin-bottom: 24px;
}

/* Stats Container */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.stat-card {
    background-color: #111111;
    border: 1px solid #242424;
    border-radius: 8px;
    padding: 24px;
    transition: border-color 0.2s ease;
}

.stat-card:hover {
    border-color: #333333;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stat-header h3 {
    font-size: 14px;
    font-weight: 500;
    color: #cccccc;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-plan {
    font-size: 12px;
    color: #888888;
    background-color: #1a1a1a;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: capitalize;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 600;
    color: #ffffff;
}

.stat-divider {
    font-size: 24px;
    color: #666666;
}

.stat-limit {
    font-size: 24px;
    color: #888888;
}

.stat-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-progress-bar {
    flex: 1;
    height: 6px;
    background-color: #1a1a1a;
    border-radius: 3px;
    overflow: hidden;
}

.stat-progress-fill {
    height: 100%;
    background-color: #ffffff;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.stat-percentage {
    font-size: 12px;
    color: #888888;
    min-width: 40px;
    text-align: right;
}

.stat-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-remaining {
    font-size: 13px;
    color: #888888;
}

.stat-label {
    font-size: 13px;
    color: #888888;
}

@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
}

/* Sandbox Page */
.sandbox-description {
    color: #888888;
    margin-bottom: 24px;
    font-size: 14px;
}

.api-key-selection {
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.api-key-selection label {
    color: #cccccc;
    font-size: 14px;
    font-weight: 500;
    min-width: 70px;
}

.custom-select-wrapper {
    position: relative;
    flex: 1;
    max-width: 500px;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background-color: #1a1a1a;
    border: 1px solid #242424;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-select-trigger:hover {
    border-color: #333333;
}

.custom-select-value {
    color: #ffffff;
    font-size: 14px;
}

.custom-select-arrow {
    width: 16px;
    height: 16px;
    color: #888888;
    transition: transform 0.2s ease;
}

.custom-select-trigger:hover .custom-select-arrow {
    color: #ffffff;
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    border: 1px solid #242424;
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.custom-select-dropdown.show {
    display: block;
}

.custom-select-option {
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #cccccc;
    font-size: 14px;
}

.custom-select-option:hover:not(.disabled) {
    background-color: #242424;
    color: #ffffff;
}

.custom-select-option.active {
    background-color: #242424;
    color: #ffffff;
}

.custom-select-option.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.custom-select-option .key-preview {
    color: #888888;
    font-size: 12px;
}

.sandbox-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 32px;
    align-items: start;
}

.sandbox-input-section {
    background-color: transparent;
    border: none;
    padding: 0;
}

/* Chat Input Container */
.chat-input-container {
    width: 100%;
}

/* Context Boxes Container */
.context-boxes-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.context-box {
    background-color: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #242424;
    overflow: hidden;
}

.context-box-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #242424;
}

.context-drag-handle {
    display: flex;
    align-items: center;
    cursor: grab;
    color: #666666;
    padding: 4px 2px;
    transition: color 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    flex-shrink: 0;
    touch-action: none;
}

.context-drag-handle:active {
    cursor: grabbing;
}

.context-drag-handle:hover {
    color: #888888;
}

.context-box[draggable="true"] {
    cursor: grabbing;
}

.context-drag-icon {
    width: 14px;
    height: 14px;
}

.context-box {
    cursor: default;
}

.context-box.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.context-role-dropdown {
    position: relative;
}

.context-role-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background-color: transparent;
    border: 1px solid #242424;
    border-radius: 4px;
    color: #cccccc;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.context-role-btn:hover {
    background-color: #242424;
    border-color: #333333;
}

.context-role-label {
    font-size: 11px;
    text-transform: lowercase;
}

.context-role-arrow {
    width: 12px;
    height: 12px;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.context-role-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background-color: #1a1a1a;
    border: 1px solid #242424;
    border-radius: 4px;
    padding: 4px;
    min-width: 80px;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.context-role-option {
    display: block;
    width: 100%;
    padding: 6px 8px;
    background-color: transparent;
    border: none;
    color: #cccccc;
    font-size: 11px;
    text-align: left;
    cursor: pointer;
    border-radius: 2px;
    transition: background-color 0.2s ease;
    text-transform: lowercase;
}

.context-role-option:hover {
    background-color: #242424;
    color: #ffffff;
}

.context-remove-btn {
    padding: 4px;
    background-color: transparent;
    border: none;
    color: #888888;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.context-remove-btn:hover {
    background-color: #242424;
    color: #ffffff;
}

.context-box-textarea-container {
    overflow-y: auto;
    max-height: 150px;
    overflow-x: hidden;
}

.context-box-textarea {
    width: 100%;
    padding: 12px 16px;
    resize: none;
    background-color: transparent;
    border: none;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    min-height: 60px;
    line-height: 1.5;
    overflow: hidden;
    box-sizing: border-box;
}

.context-box-textarea:focus {
    outline: none;
}

.context-box-textarea::placeholder {
    color: #666666;
    font-size: 14px;
}

.chat-input-wrapper {
    position: relative;
    background-color: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #242424;
    overflow: visible;
}

.chat-textarea-container {
    overflow-y: auto;
    max-height: 200px;
    overflow-x: hidden;
}

.chat-textarea {
    width: 100%;
    padding: 16px;
    resize: none;
    background-color: transparent;
    border: none;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    min-height: 60px;
    line-height: 1.5;
    overflow: hidden;
    box-sizing: border-box;
}

/* Make textarea 2 lines tall initially */
.chat-textarea[rows="2"] {
    min-height: 80px;
    height: 80px;
}

.chat-textarea:focus {
    outline: none;
}

.chat-textarea::placeholder {
    color: #666666;
    font-size: 14px;
}

/* Image Preview */
.image-preview-container {
    padding: 12px 16px;
    border-top: 1px solid #242424;
}

.image-preview-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.image-preview {
    max-width: 300px;
    max-height: 200px;
    border-radius: 8px;
    object-fit: contain;
    border: 1px solid #242424;
}

.image-preview-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    padding: 4px;
    background-color: #1a1a1a;
    border: 1px solid #242424;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.image-preview-remove:hover {
    background-color: #242424;
    border-color: #333333;
}

.image-preview-remove .chat-icon {
    width: 14px;
    height: 14px;
}

.chat-input-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-top: 1px solid #242424;
}

.chat-input-actions-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-input-actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background-color: transparent;
    border: none;
    color: #888888;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.chat-action-btn:hover {
    background-color: #242424;
    color: #ffffff;
}

/* Tooltip */
.chat-action-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 6px 10px;
    background-color: #1a1a1a;
    border: 1px solid #242424;
    border-radius: 6px;
    color: #ffffff;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.chat-action-btn[data-tooltip]:hover::after {
    opacity: 1;
}

.chat-icon {
    width: 16px;
    height: 16px;
    color: currentColor;
}

/* Strictness Dropdown */
.strictness-dropdown {
    position: relative;
}

.strictness-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background-color: transparent;
    border: 1px dashed #444444;
    border-radius: 8px;
    color: #888888;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.strictness-btn:hover {
    border-color: #555555;
    background-color: #242424;
    color: #ffffff;
}

.strictness-icon {
    width: 16px;
    height: 16px;
}

.strictness-dropdown-btn {
    gap: 6px;
    border: none !important;
    padding: 0;
    background-color: transparent !important;
    color: #cccccc;
}

.strictness-dropdown-btn:hover {
    background-color: transparent !important;
    border: none !important;
    color: #ffffff;
}

.strictness-arrow {
    width: 14px;
    height: 14px;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.strictness-dropdown.open .strictness-arrow {
    transform: rotate(180deg);
}

.strictness-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 6px 10px;
    background-color: #1a1a1a;
    border: 1px solid #242424;
    border-radius: 6px;
    color: #ffffff;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.strictness-btn[data-tooltip]:hover::after {
    opacity: 1;
}

.strictness-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background-color: #1a1a1a;
    border: 1px solid #242424;
    border-radius: 8px;
    padding: 0;
    min-width: 200px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-height: 400px;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.95);
    transform-origin: top right;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.strictness-menu.open {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}

.strictness-tabs {
    display: flex;
    border-bottom: 1px solid #242424;
    padding: 0;
}

.strictness-tab {
    flex: 1;
    padding: 8px 12px;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #888888;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.strictness-tab:hover {
    color: #cccccc;
    background-color: #242424;
}

.strictness-tab.active {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

.strictness-tab-content {
    padding: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.strictness-option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background-color: transparent;
    border: none;
    color: #cccccc;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    text-transform: lowercase;
}

.strictness-option:hover {
    background-color: #242424;
    color: #ffffff;
}

.strictness-divider {
    height: 1px;
    background-color: #242424;
    margin: 8px 0;
}

.strictness-custom {
    padding: 8px;
}

.strictness-custom label {
    display: block;
    font-size: 12px;
    color: #888888;
    margin-bottom: 8px;
}

.strictness-custom-input {
    width: 100%;
    padding: 6px 8px;
    background-color: #000000;
    border: 1px solid #242424;
    border-radius: 4px;
    color: #ffffff;
    font-size: 12px;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.strictness-custom-input:focus {
    outline: none;
    border-color: #444444;
}

.strictness-apply-btn {
    width: 100%;
    padding: 6px;
    background-color: #ffffff;
    border: none;
    border-radius: 4px;
    color: #000000;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.strictness-apply-btn:hover {
    background-color: #e0e0e0;
}

/* Chat Send Button */
.chat-send-btn {
    padding: 6px;
    background-color: transparent;
    border: 1px solid #444444;
    border-radius: 8px;
    color: #888888;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.chat-send-btn:hover {
    border-color: #555555;
    background-color: #242424;
    color: #ffffff;
}

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

.chat-textarea:not(:placeholder-shown) ~ .chat-input-footer .chat-send-btn {
    background-color: #ffffff;
    border-color: #ffffff;
    color: #000000;
}

.chat-send-icon {
    width: 16px;
    height: 16px;
    color: currentColor;
}

/* Update send button when textarea has content or image is selected */
.chat-input-wrapper:has(.chat-textarea:not(:placeholder-shown)) .chat-send-btn,
.chat-input-wrapper:has(.image-preview-container:not([style*="display: none"])) .chat-send-btn {
    background-color: #ffffff;
    border-color: #ffffff;
    color: #000000;
}

.chat-input-wrapper:has(.chat-textarea:not(:placeholder-shown)) .chat-send-btn:hover,
.chat-input-wrapper:has(.image-preview-container:not([style*="display: none"])) .chat-send-btn:hover {
    background-color: #e0e0e0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Context Modal */
.context-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.context-modal-content {
    background-color: #111111;
    border: 1px solid #242424;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.context-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #242424;
}

.context-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.context-modal-close {
    padding: 4px;
    background-color: transparent;
    border: none;
    color: #888888;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.context-modal-close:hover {
    background-color: #242424;
    color: #ffffff;
}

.context-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.context-help-text {
    font-size: 12px;
    color: #888888;
    margin-bottom: 12px;
}

.context-textarea {
    width: 100%;
    padding: 12px;
    background-color: #000000;
    border: 1px solid #242424;
    border-radius: 4px;
    color: #ffffff;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    min-height: 120px;
    box-sizing: border-box;
}

.context-textarea:focus {
    outline: none;
    border-color: #444444;
}

.context-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid #242424;
}

.sandbox-results-section {
    width: 100%;
}

.sandbox-results-section .chat-input-container {
    width: 100%;
}

.results-empty {
    width: 100%;
}

.results-empty-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 24px;
    color: #666666;
    font-size: 14px;
    text-align: center;
}

.results-loading {
    width: 100%;
}

.results-loading .chat-input-wrapper {
    min-height: 300px;
    padding: 24px;
}

/* Shimmer Loading Effect */
.shimmer-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px;
}

.shimmer-header {
    height: 24px;
    width: 60%;
    margin-bottom: 8px;
}

.shimmer-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shimmer-line {
    height: 16px;
    background: linear-gradient(
        90deg,
        #1a1a1a 0%,
        #242424 50%,
        #1a1a1a 100%
    );
    background-size: 200% 100%;
    border-radius: 4px;
    animation: shimmer 1.5s ease-in-out infinite;
}

.shimmer-line-large {
    width: 100%;
}

.shimmer-line-medium {
    width: 75%;
}

.shimmer-line-small {
    width: 50%;
}

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

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #242424;
}

.results-content-inner .results-header {
    margin-bottom: 24px;
    margin-top: 0;
}

.results-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.results-view-toggle {
    display: flex;
    gap: 4px;
    background-color: #1a1a1a;
    border: 1px solid #242424;
    border-radius: 6px;
    padding: 2px;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    background-color: transparent;
    border: none;
    border-radius: 4px;
    color: #888888;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle-btn:hover {
    background-color: #242424;
    color: #ffffff;
}

.view-toggle-btn.active {
    background-color: #242424;
    color: #ffffff;
}

.view-toggle-icon {
    width: 16px;
    height: 16px;
}

.results-view {
    display: block;
}

.code-view {
    display: none;
}

.code-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid #242424;
}

.code-tab {
    padding: 8px 16px;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #888888;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -1px;
}

.code-tab:hover {
    color: #ffffff;
}

.code-tab.active {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

.code-tab-content {
    display: none;
}

.code-tab-content.active {
    display: block;
}

.code-block {
    background-color: #0a0a0a;
    border: 1px solid #242424;
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
    margin: 0;
}

.code-block code {
    color: #cccccc;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre;
    display: block;
}

.auth-headers-container {
    margin-bottom: 16px;
}

.auth-headers-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #cccccc;
    margin-bottom: 8px;
}

.auth-headers-textbox {
    width: 100%;
    min-height: 60px;
    padding: 12px;
    background-color: #1a1a1a;
    border: 1px solid #242424;
    border-radius: 4px;
    color: #ffffff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
}

.auth-headers-textbox:focus {
    outline: none;
    border-color: #444444;
}

.results-content-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
}

.result-status {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-allowed {
    background-color: #0f4c0f;
    color: #4ade80;
}

.status-badge.status-partially_blocked {
    background-color: #4c3f0f;
    color: #fbbf24;
}

.status-badge.status-blocked {
    background-color: #4c0f0f;
    color: #f87171;
}

.status-details {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.status-item {
    display: flex;
    gap: 8px;
    align-items: center;
}

.status-label {
    font-size: 13px;
    color: #888888;
}

.status-value {
    font-size: 14px;
    color: #ffffff;
    font-weight: 500;
}

.result-violations {
    padding-top: 16px;
    border-top: 1px solid #242424;
}

.result-violations h4 {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#violations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.violation-item {
    padding: 12px;
    background-color: #1a1a1a;
    border: 1px solid #242424;
    border-radius: 4px;
}

.violation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.violation-type {
    font-size: 13px;
    font-weight: 600;
    color: #f87171;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.violation-confidence {
    font-size: 12px;
    color: #888888;
}

.violation-explanation {
    font-size: 13px;
    color: #cccccc;
    margin-bottom: 4px;
}

.violation-snippets {
    font-size: 12px;
    color: #888888;
    font-style: italic;
}

.result-text,
.result-image {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid #242424;
}

.result-metrics {
    display: flex;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid #242424;
    flex-wrap: wrap;
}

.metric-item {
    display: flex;
    gap: 8px;
    align-items: center;
}

.metric-label {
    font-size: 13px;
    color: #888888;
}

.metric-value {
    font-size: 13px;
    color: #ffffff;
    font-weight: 500;
}

.result-text-item h4 {
    font-size: 13px;
    font-weight: 600;
    color: #cccccc;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-text-content {
    padding: 12px;
    background-color: #000000;
    border: 1px solid #242424;
    border-radius: 4px;
    font-size: 13px;
    color: #cccccc;
    white-space: pre-wrap;
    word-wrap: break-word;
    min-height: 60px;
    max-height: 200px;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .sandbox-container {
        grid-template-columns: 1fr;
    }
    
    .result-text,
    .result-image {
        grid-template-columns: 1fr;
    }
    
    .status-details {
        flex-direction: column;
        gap: 12px;
    }
}

/* Landing Page Background Paths */
.landing-container {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.background-paths-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.floating-paths {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.floating-paths svg {
    width: 100%;
    height: 100%;
    color: #ffffff;
}

.floating-paths path {
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.landing-container .container {
    position: relative;
    z-index: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 36px;
    }
    
    .subtitle {
        font-size: 18px;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .sidebar {
        width: 200px;
    }
    
    .dashboard-content {
        padding: 20px;
    }
    
    /* Auth split layout - stack on mobile */
    .auth-split-container {
        flex-direction: column;
    }
    
    .auth-left-panel {
        min-height: auto;
        padding: 20px;
    }
    
    .auth-right-panel {
        min-height: 300px;
        order: -1; /* Show effect on top on mobile */
    }
    
    .auth-hero-text {
        font-size: 1.75rem;
    }
    
    .auth-text-overlay {
        padding: 20px;
    }
    
    .auth-header {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .auth-card {
        max-width: 100%;
        padding: 30px 20px;
    }
}

