/* Modern Dark Theme matching Electron App */
:root {
    --primary: #94a800;
    --primary-hover: #586b00;
    --success: #10b981;
    --success-hover: #059669;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --accent-color: #4d552a;
    --font-mono: input-mono, 'Courier New', monospace;

    
    --bg-main: #1f1f1f;
    --bg-sidebar: #2b2b2b;
    --bg-card: #1e293b;
    --bg-dark: #1a1a1a;
    --bg-primary: #272727;
    --bg-secondary: #1A1A1A;
    --bg-input: #212121;
    --bg-hover: #334155;
    
    --text-primary: #d4d4c8;
    --text-secondary: #94a3b8;
    --text-muted: #757575;
    --text-terminal: #91e700;
    
    --border: #334155;
    --border-light: #475569;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    
    --radius-sm: 4px;
    --radius-md: 4px;
    --radius-lg: 4px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-mono);
}

body {
    font-family: var(--font-mono);
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 1rem;
    overflow: hidden;
}

.screen {
    min-height: 100vh;
    display: flex;
}

.hidden {
    display: none !important;
}

/* Auth Screen */
#auth-screen {
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
    position: relative;
    overflow: hidden;
}

#auth-screen::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: backgroundScroll 20s linear infinite;
}

@keyframes backgroundScroll {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.auth-container {
    background: var(--bg-card);
    padding: 48px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    box-shadow: var(--shadow-lg);
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 14px;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--bg-input);
    padding: 4px;
    border-radius: var(--radius-md);
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
    font-size: 14px;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

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

.form-group {
    position: relative;
}

.form-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
    width: 16px;
    text-align: center;
}

.auth-form input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    transition: var(--transition);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-primary {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.error-message {
    color: var(--danger);
    font-size: 13px;
    min-height: 20px;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--danger);
}

.fa, .fa-brands, .fa-classic, .fa-regular, .fa-sharp, .fa-solid, .fab, .far, .fas {
  line-height: 1.5 !important;
}

input#login-email, input#login-password {
    padding-left: 40px;
}

/* HAL 9000 Streaming Messages */
.hal-message {
    color: #c9ff00 !important;
    font-family: var(--font-mono);
    font-style: italic;
    font-size: 12px !important;
    min-height: 40px;
    max-height: 40px;
    display: flex !important;
    align-items: center;
    animation: halPulse 2s ease-in-out infinite;
    /* Remove container styling - blend into background */
    padding: 8px 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    /* Prevent wrapping - scroll horizontally */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}

/* When HAL shows an error, restore red container */
.hal-message.hal-error {
    color: var(--danger) !important;
    padding: 8px 12px !important;
    background: rgba(239, 68, 68, 0.1) !important;
    border-radius: var(--radius-sm) !important;
    border-left: 3px solid var(--danger) !important;
    animation: none !important;
}

/* When HAL shows success, keep green with subtle container */
.hal-message.hal-success {
    color: var(--success) !important;
    padding: 8px 12px !important;
    background: rgba(16, 185, 129, 0.1) !important;
    border-radius: var(--radius-sm) !important;
    border-left: 3px solid var(--success) !important;
}

.hal-message::after {
    content: '▊';
    animation: halBlink 1s step-end infinite;
    margin-left: 2px;
}

.hal-message.hal-error::after,
.hal-message.hal-success::after {
    animation: halBlink 0.8s step-end infinite;
}

@keyframes halBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes halPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* Main App */
#main-screen {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* App Header */
.app-header {
    width: 100%;
    height: 60px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    flex-shrink: 0;
    z-index: 100;
}

.app-header .header-left h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.app-header .header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-header .user-profile {
    margin: 0;
}

.app-container {
    display: flex;
    width: 100%;
    height: calc(100vh - 60px);
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100%;
    flex-shrink: 0;
    overflow-y: auto;
}

.menu {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    list-style: none;
    margin: 0;
}

.menu-item {
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    text-align: left;
}

.menu-item i {
    font-size: 18px;
    width: 20px;
}

.menu-item:hover {
    background: var(--accent-color);
    color: var(--text-primary);
}

.menu-item.active {
    background: var(--accent-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    /* background: var(--bg-input); */
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.user-profile:hover {
    background: rgba(74, 144, 226, 0.15);
    transform: translateX(2px);
}

.user-profile > div {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.user-profile #user-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}

.user-profile #user-email {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-profile i {
    font-size: 24px;
    color: var(--primary);
    flex-shrink: 0;
}

.btn-logout {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
}

.btn-logout:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    background: var(--bg-main);
}

.module {
    display: none;
    padding: 32px;
    animation: fadeIn 0.3s ease;
}

.module.active {
    display: block;
}

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

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

.module-header h2 {
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.module-header h2 i {
    color: var(--primary);
}

.back-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
    border-radius: var(--radius-sm);
}

.back-button:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.back-button i {
    font-size: 18px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.header-actions input[type="search"] {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    min-width: 200px;
}

/* Cards */
.content-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.content-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.content-card h3 i {
    color: var(--primary);
}

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

/* Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card i {
    font-size: 32px;
    color: var(--primary);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-top: 4px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.action-btn {
    padding: 20px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.action-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.action-btn i {
    font-size: 32px;
    color: var(--primary);
}

.action-btn span {
    font-weight: 500;
}

/* Forms */
.input-group {
    margin-bottom: 20px;
}


input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    resize: vertical;
    transition: var(--transition);
    line-height: 1.5;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.controls {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.control-group {
    flex: 1;
    min-width: 200px;
}

.control-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 1rem;
}

select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.5;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

select:hover {
    border-color: var(--text-secondary);
}

select option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 8px 12px;
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted)!important;
}


/* Buttons */
button,
.btn {
    font-family: var(--font-mono);
    font-size: .8rem;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 400;
    border: none;
    line-height: 1.5;
}

.btn-large {
    padding: 12px 24px;
    font-size: 1rem;
}

.btn-success {
    background: var(--success);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 400;
    box-shadow: var(--shadow-sm);
}

.btn-success:hover {
    background: var(--success-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 400;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

/* Loading */
.loading {
    text-align: center;
    padding: 48px 24px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.loading p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Prompts */
#prompts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.prompt-item {
    background: var(--bg-input);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.prompt-item:hover {
    border-color: var(--primary);
}

.prompt-item textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.prompt-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.prompt-actions button {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
}

.prompt-actions button:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Session Info */
.session-info {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.session-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 13px;
}

.session-detail i {
    color: var(--primary);
}

.session-detail code {
    background: var(--bg-card);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: var(--primary);
    border: 1px solid var(--border);
}

/* History */
#history-list, #recent-sessions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* History Table - Modern Admin Style */
.history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-dark);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.history-table thead {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

.history-table thead th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #91e700;
    border-bottom: 2px solid #91e700;
    white-space: nowrap;
}

.history-table thead th i {
    margin-right: 6px;
    opacity: 0.8;
}

.history-table tbody .history-row {
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.history-table tbody .history-row:hover {
    background: rgba(145, 231, 0, 0.05);
}

.history-table tbody .history-row.expanded {
    background: rgba(145, 231, 0, 0.08);
    border-bottom-color: #91e700;
}

.history-table tbody .history-row td {
    padding: 16px 20px;
    color: var(--text-primary);
    font-size: 14px;
    vertical-align: middle;
}

/* Expanded Row */
.expanded-row {
    background: rgba(145, 231, 0, 0.02);
}

.expanded-row td {
    padding: 0 !important;
}

.expanded-content {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.prompts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prompt-item {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 15px;
    align-items: center;
    background: var(--bg-dark);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.prompt-item:hover {
    border-color: #91e700;
    box-shadow: 0 2px 6px rgba(145, 231, 0, 0.1);
}

.prompt-number {
    font-weight: 700;
    color: #91e700;
    font-size: 13px;
    text-align: center;
}

.prompt-text {
    color: var(--text-primary);
    line-height: 1.6;
    word-break: break-word;
}

.prompt-item-actions {
    display: flex;
    gap: 8px;
}

/* History Table Column Styles */
.history-table .date-col {
    width: 140px;
    white-space: nowrap;
}

.history-table .model-col {
    width: 150px;
    white-space: nowrap;
}

.history-table .model-col i {
    margin-right: 8px;
    color: #91e700;
}

.history-table .prompts-col {
    max-width: 500px;
}

.prompts-preview {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.more-indicator {
    margin-top: 8px;
    font-size: 12px;
    color: #91e700;
    font-style: italic;
}

.history-table .count-col {
    width: 100px;
    text-align: center;
}

.history-table .actions-col {
    width: 120px;
    text-align: center;
    white-space: nowrap;
}

/* Small Action Buttons */
.btn-sm {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-sm:hover {
    background: rgba(145, 231, 0, 0.1);
    border-color: #91e700;
    color: #91e700;
}

.btn-sm i {
    font-size: 11px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-size: 18px;
}

.empty-state p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsive History Table */
@media (max-width: 1200px) {
    .history-table .prompts-col {
        max-width: 350px;
    }
}

@media (max-width: 900px) {
    .history-table {
        font-size: 13px;
    }
    
    .history-table thead th,
    .history-table tbody td {
        padding: 12px 15px;
    }
    
    .history-table .prompts-col {
        max-width: 250px;
    }
    
    .history-table .date-col {
        width: 110px;
    }
    
    .history-table .model-col {
        width: 120px;
    }
}

.history-item {
    background: var(--bg-input);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.history-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

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

.history-item-model {
    color: var(--primary);
    font-weight: 500;
    font-size: 13px;
}

.history-item-date {
    color: var(--text-muted);
    font-size: 12px;
}

.history-item-preview {
    color: var(--text-secondary);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item-count {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

/* Toasts */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

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

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--info); }

.toast i {
    font-size: 20px;
}

.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.info i { color: var(--info); }

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .module {
        padding: 16px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}
:root {
  --sidebar-width: 20%;
  --content-width: 80%;
  --sidebar-bg: #2a2a2a;
  --content-bg: #333333;
  --text-color: #eaeaea;
  --active-item-bg: #444444;
  --hover-item-bg: #3a3a3a;
  --border-color: #444444;
  /* Theme colors */
  --bg-dark: #1a1a1a;
  --bg-panel: #2a2a2a;
  --bg-card: #333333;
  --text-primary: #eaeaea;
  --text-secondary: #bbbbbb;
  --accent-color: #464931;
  --hover-bg: #3a3a3a;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: input-mono, Arial, sans-serif;
  font-size: 12px;
  margin: 0;
  padding: 0;
  background-color: var(--content-bg);
  color: var(--text-color);
  height: 100vh;
  margin: 0;
  padding: 0;
  font-family: input-mono, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.5;
}

body::after {
  content: none !important;
  display: none !important;
}

body:after {
  content: "";
  display: table;
  clear: both;
}

/* body > div:not(.container):not(#toast-container) {
  display: none !important;
} */

/* Duplicate app-container styles removed - see main styles above */

/* Duplicate sidebar styles removed - see main sidebar styles above */

/* Module panel styling */
.module-panel {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}

.module-content {
  display: none !important;
  width: 100%;
  position: relative;
}

.module-content.active {
  display: block !important;
}

/* Web browser module needs flex layout when active */
.module-content.web-browser-layout.active {
  display: flex !important;
  flex-direction: column;
  height: 100%;
}

.module-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
  margin-bottom: 20px;
}

/* Browser Toggle Styles */
.toggle-container {
  display: flex;
  border: 1px solid #444;
  border-radius: 4px;
  overflow: hidden;
  width: fit-content;
}

.toggle-container input[type="radio"] {
  display: none;
}

.toggle-container label {
  padding: 8px 16px;
  cursor: pointer;
  background: #333;
  color: #aaa;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
}

.toggle-container input[type="radio"]:checked + label {
  background: #4a6cf7;
  color: white;
}

.toggle-container label:hover {
  background: #444;
}

.toggle-container input[type="radio"]:checked + label:hover {
  background: #3b5ce0;
}

.module-header h2 {
  margin: 0;
  font-size: 1.8rem;
}

/* Content card styling */
.content-card {
  background-color: var(--bg-card);
  border-radius: 8px;
  background: var(--bg-card);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;

}

.content-card h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  
  .module-panel {
    width: 100%;
  }
  
  .menu {
    display: flex;
    overflow-x: auto;
  }
  
  .menu-item {
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* Placeholder styles for empty areas */
.placeholder {
  height: 100%;
  display: flex;
  justify-content: left;
  align-items: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 1.2rem;
  text-align: left;
}

#templateSelect {
  margin-bottom: 15px;
}

.input-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  /* margin-bottom: 15px; */
}

.clear-button {
  position: absolute;
  right: 5px;
  top: 5px; /* Position from top instead of using transform */
  cursor: pointer;
  background-color: #484848;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  text-align: center;
  line-height: 20px;
  font-size: 10px;
  color: #91e700;
  z-index: 10;
}

.clear-button:hover {
  background-color: #666;
}

.container {
  display: flex;
  min-height: 80vh; /* Reduced height to accommodate header */
  width: 100%; /* Added width */
  position: relative; /* Add positioning context */
  overflow: visible; /* Allow elements to flow */
  max-width: 1000px;
  margin: 0 auto;
}

h1, h2, h3, h4 {
  color: #64b5f6;
  margin-bottom: 15px;
}

h1 {
  color: #4a6cf7;
  margin-bottom: 30px;
}

h2 {
  margin-top: 0;
  color: #cccccc;
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: 20px;
}

h3 {
  color: var(--text-primary);
  margin-top: 0;
}

/* REMOVED DUPLICATE STYLES - All form inputs now styled in main Forms section (lines 640-720) */
/* REMOVED DUPLICATE button, .button - Main button styles at lines 725-775 */

.action-button {
    background-color: var(--accent-color);
    color: var(--text-primary);
}

.action-button:hover {
    background-color: #3b6182; /* Lighter shade of accent color */
}

#generatedPrompts {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

#generatedPrompts > .prompt-item {
  flex: 1 1;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
}

#generatedPrompts {
  margin-top: 10px;
  display: flex;
  gap: 20px;
}

#generatedPrompts textarea {
  width: 100%;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 10px;
  background-color: #2d2d2d;
  color: #b0ee7a;
  /* min-height: 250px; */
  box-sizing: border-box;
  resize: vertical;
  font-family: input-mono, monospace;
  font-size: 10px;
}

.section {
  margin-bottom: 30px;
  padding: 20px;
  border-radius: 5px;
  background-color: #252525;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.helper-text {
  font-size: 0.9em;
  color: #aaa;
  margin-top: -10px;
  margin-bottom: 15px;
}

.midjourney-enhancer {
  margin-top: 15px;
  padding: 15px;
  background-color: #2a2a2a;
  border-radius: 5px;
  border-left: 3px solid #64b5f6;
}

.enhancer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 15px;
}

.enhancer-field {
  display: flex;
  flex-direction: column;
}

.enhancer-field label {
  font-weight: 500;
  margin-bottom: 5px;
  font-size: 0.9em;
  color: #787878;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toast {
  padding: 10px 15px;
  margin-bottom: 10px;
  border-radius: 4px;
  color: white;
  position: relative;
  animation: slide-in 0.3s ease-out forwards;
  transition: opacity 0.5s ease;
}

@keyframes slide-in {
  from {
    transform: translateX(50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.success {
  background-color: #4CAF50 !important;
}

.toast.error {
  background-color: #f44336 !important;
}

.toast.info {
  background-color: #2196F3 !important;
}

.toast.warning {
  background-color: #FF9800 !important;
}

/* Tab styles */
.tab {
  overflow: hidden;
  background-color: #2d2d2d;
  border-radius: 5px 5px 0 0;
}

.tab button {
  background-color: inherit;
  float: left;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 14px 16px;
  transition: 0.3s;
  color: #bbb;
}

.tab button:hover {
  background-color: #3d3d3d;
}

.tab button.active {
  background-color: #0d47a1;
  color: white;
}

.tabcontent {
  display: none;
  padding: 20px;
  background-color: #252525;
  border-radius: 0 0 5px 5px;
}

/* Alternating prompt styles */
#generatedPrompts > div:nth-child(odd) {
  background-color: #2a2a2a;
  padding: 10px;
  border-radius: 5px;
}

#generatedPrompts > div:nth-child(even) {
  background-color: #252525;
  padding: 10px;
  border-radius: 5px;
}

.panel {
  width: 50%;
  padding: 20px;
  height: 100%;
  box-sizing: border-box;
  background-color: #252525;
  border: 1px solid #444;
  margin: 10px;
  /* overflow: auto; */
}

header {
  text-align: center;
  padding: 20px;
}

label {
  display: block;
  margin-bottom: 5px;
  color: #e0e0e0;
}

.sendToIdeogram {
  margin-left: 10px;
}

/* AI Input Section Styles */
.ai-input-section {
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #444;
  border-radius: 5px;
  background-color: #2a2a2a;
}

.api-settings {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.api-settings label {
  margin-right: 10px;
  flex-shrink: 0;
}

.api-settings input {
  flex-grow: 1;
  padding: 5px;
  margin-right: 10px;
}

.model-selection {
  margin-bottom: 15px;
}

.prompt-input textarea {
  width: 100%;
  resize: vertical;
  margin-top: 5px;
}

#generate-ai-content {
  margin-top: 10px;
  padding: 8px 15px;
  background-color: #91ff00;
  color: #000;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: right;
}

#generate-ai-content:hover {
  background-color: #f7ff14;
}

/* Toast notification styles */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2500; /* Even higher z-index for toasts */
}

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

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

/* Midjourney Parameters Section */
.midjourney-params {
  background-color: #2a2a2a;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 5px;
  border: 1px solid #444;
  border-left: 3px solid #64b5f6;
}

.midjourney-params h3 {
  margin-top: 0;
  color: #64b5f6;
}

.params-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 15px;
}

.param-field {
  display: flex;
  flex-direction: column;
}

.param-field label {
  font-weight: 500;
  margin-bottom: 5px;
  color: #bbb;
}

/* Creative Enhancers Section */
.creative-enhancers {
  background-color: #2a2a2a;
  padding: 15px;
  margin: 15px 0;
  border-radius: 5px;
  border: 1px solid #444;
  border-left: 3px solid #28a745;
}

.creative-enhancers h4 {
  margin-top: 0;
  color: #28a745;
}

/* Individual button styling */
#include-enhancers {
  background-color: #28a745;
}

#include-enhancers:hover {
  background-color: #218838;
}

.mj-param-button {
  background-color: #0069d9;
  color: white;
  padding: 8px 16px;
  margin-top: 10px;
  font-weight: 500;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.mj-param-button:hover {
  background-color: #0056b3;
}

.quick-actions {
  display: flex;
}

.quick-navigation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.quick-navigation .action-button {
  min-width: 180px;
  flex: 1;
}

button.action-button.large-button {
  padding: 50px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

button.action-button.large-button i {
  font-size: 2rem;
  margin-bottom: 10px;
}

/* Recent Prompts Table - Modern Admin Style */
.recent-prompts-container {
  margin-top: 15px;
}

.recent-prompts-container .placeholder {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-style: italic;
}

.recent-prompts-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-dark);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recent-prompts-table thead {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

.recent-prompts-table thead th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #91e700;
  border-bottom: 2px solid #91e700;
  white-space: nowrap;
}

.recent-prompts-table tbody tr {
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--border-color);
}

.recent-prompts-table tbody tr:hover {
  background: rgba(145, 231, 0, 0.05);
  transform: scale(1.01);
}

.recent-prompts-table tbody tr:last-child {
  border-bottom: none;
}

.recent-prompts-table tbody td {
  padding: 16px 20px;
  color: var(--text-primary);
  font-size: 14px;
  vertical-align: middle;
}

/* Column Specific Styles */
.prompt-col {
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.count-col {
  width: 80px;
  text-align: center;
}

.count-col .badge {
  display: inline-block;
  background: linear-gradient(135deg, #91e700 0%, #7bc700 100%);
  color: #000;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 12px;
  min-width: 30px;
  text-align: center;
}

.model-col {
  width: 140px;
  white-space: nowrap;
}

.model-col i {
  margin-right: 6px;
  color: #91e700;
}

.date-col {
  width: 120px;
  white-space: nowrap;
}

.date-display {
  font-size: 13px;
  color: var(--text-primary);
}

.time-display {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.actions-col {
  width: 100px;
  text-align: center;
  white-space: nowrap;
}

/* Action Buttons */
.btn-icon {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 3px;
}

.btn-icon:hover {
  background: rgba(145, 231, 0, 0.1);
  border-color: #91e700;
  color: #91e700;
  transform: translateY(-2px);
}

.btn-icon i {
  font-size: 13px;
}

/* Send to Generation button - distinctive styling */
.send-to-gen-btn {
  background: linear-gradient(135deg, rgba(145, 231, 0, 0.15), rgba(145, 231, 0, 0.05)) !important;
  border-color: #91e700 !important;
  color: #91e700 !important;
}

.send-to-gen-btn:hover {
  background: linear-gradient(135deg, rgba(145, 231, 0, 0.25), rgba(145, 231, 0, 0.15)) !important;
  border-color: #91e700 !important;
  color: #fff !important;
  box-shadow: 0 0 12px rgba(145, 231, 0, 0.3);
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-dark);
  color: var(--text-primary);
  padding: 16px 24px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 10000;
  min-width: 250px;
  font-size: 14px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  border-color: #91e700;
  background: linear-gradient(135deg, rgba(145, 231, 0, 0.1) 0%, rgba(145, 231, 0, 0.05) 100%);
}

.toast-error {
  border-color: #ff4444;
  background: linear-gradient(135deg, rgba(255, 68, 68, 0.1) 0%, rgba(255, 68, 68, 0.05) 100%);
}

.toast-info {
  border-color: #4444ff;
  background: linear-gradient(135deg, rgba(68, 68, 255, 0.1) 0%, rgba(68, 68, 255, 0.05) 100%);
}

/* Responsive Table */
@media (max-width: 1200px) {
  .prompt-col {
    max-width: 300px;
  }
}

@media (max-width: 900px) {
  .recent-prompts-table {
    font-size: 13px;
  }
  
  .recent-prompts-table thead th,
  .recent-prompts-table tbody td {
    padding: 12px 15px;
  }
  
  .prompt-col {
    max-width: 200px;
  }
  
  .model-col {
    width: 100px;
  }
  
  .date-col {
    width: 100px;
  }
}

/* Fix checkbox overlay issue */
#generatedPrompts .prompt-container {
  position: relative;
  margin-bottom: 15px;
}

#generatedPrompts .prompt-header {
  display: flex;
  align-items: center;
  gap: 10px;  /* Adds space between checkbox and title */
  position: relative;
  padding: 8px 10px;
  background-color: #2a2a2a;  /* Match your existing style */
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

#generatedPrompts .prompt-checkbox {
  position: relative; /* Not absolute */
  margin: 0;
  flex-shrink: 0; /* Prevents the checkbox from shrinking */
}

#generatedPrompts .prompt-title {
  flex-grow: 1;  /* Allow title to take remaining space */
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
}

#generatedPrompts .prompt-content {
  padding: 10px;
  background-color: #2d2d2d;
  border: 1px solid #444;
  border-top: none;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

/* If using copy buttons, make sure they're positioned appropriately */
#generatedPrompts .copy-button {
  margin-left: auto;
}

/* Fix for proper display of prompts and checkboxes */
#generatedPrompts .prompt-element {
  position: relative;
  margin-bottom: 15px;
  padding: 15px;
  background-color: #2a2a2a;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

#generatedPrompts .prompt-element h4 {
  margin: 0 0 10px 0;
  padding-left: 24px; /* Make space for the checkbox */
  font-size: 0.9rem;
  color: #91e700;
}

#generatedPrompts .prompt-selector {
  /* position: absolute;
  top: 12px;
  left: 12px; */
  width: 16px;
  height: 16px;
  z-index: 5;
}

@media (max-width: 1400px) {
  .enhancer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1200px) {
  .enhancer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Mode Selector */
.mode-selector {
  margin-bottom: 25px;
  padding: 15px;
  background-color: var(--bg-panel);
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.toggle-container {
  display: flex;
  border: 1px solid #444;
  border-radius: 4px;
  overflow: hidden;
  width: fit-content;
}

.toggle-container input[type="radio"] {
  display: none;
}

.toggle-container label {
  padding: 8px 16px;
  cursor: pointer;
  background: #333;
  color: #aaa;
  transition: all 0.2s;
}

.toggle-container input[type="radio"]:checked + label {
  background: #4a6cf7;
  color: white;
}

/* Style Reference Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000; /* Higher z-index to ensure visibility */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  overflow-y: auto;
}

.modal-content {
  background-color: #2a2a2a;
  margin: 5% auto;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #444;
  width: 80%;
  max-width: 900px;
  max-height: 80vh;
  overflow-y: auto;
  color: #e0e0e0;
}

.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-button:hover {
  color: #fff;
}

.sref-tabs {
  display: flex;
  overflow-x: auto;
  margin-bottom: 15px;
  border-bottom: 1px solid #444;
}

.sref-tab {
  padding: 10px 15px;
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
}

.sref-tab.active {
  border-bottom: 3px solid #4a6cf7;
  color: #fff;
  font-weight: bold;
}

.sref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
}

.sref-item {
  border: 1px solid #444;
  border-radius: 4px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s;
  background-color: #333;
}

.sref-item:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  border-color: #4a6cf7;
}

.sref-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
}

.sref-item p {
  margin-top: 8px;
  text-align: center;
  color: #e0e0e0;
}

/* Creative Mode */
#creative-mode-container {
  display: none; /* Default to hidden */
  /* background-color: #2a2a2a; */
  /* padding: 15px; */
  /* border-radius: 5px; */
  /* border: 1px solid #444; */
  /* margin-top: 15px; */
  width: 100%;
  box-sizing: border-box;
  position: relative;
  overflow: visible;
}

.prompt-builder {
  background-color: #333;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #444;
}

.builder-section {
  margin-bottom: 20px;
}

.builder-section h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #64b5f6;
}

.builder-field {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

#ai-prompt {
  background-color: #1e1e1e;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 15px;
  min-height: 60px;
  margin-bottom: 10px;
  font-family: input-mono, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  color: #87c000;
}

.enhancer-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.enhancer-quick-item {
  display: flex;
  flex-direction: column;
}



.prompt-number {
  font-weight: bold;
  padding: 10px;
  background-color: #222;
  border-right: 1px solid #444;
  min-width: 30px;
  text-align: center;
}

.prompt-text {
  flex-grow: 1;
  width: 100%;
  min-height: 150px;
  padding: 10px;
  margin: 10px 0;
  background-color: #222;
  border: 1px solid #444;
  border-radius: 4px;
  color: #91e700;
  font-family: monospace;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  resize: vertical;
}

.prompt-actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.prompt-actions button {
  padding: 8px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  transition: all 0.2s ease;
  margin-top: 0px;
}

.copy-prompt {
  background-color: #333;
  color: #91e700;
}

.copy-prompt:hover {
  background-color: #444;
}

.send-to-discord {
  background-color: #7289da;
  color: white;
}

.send-to-discord:hover {
  background-color: #5b73c7;
}

.ideogram-btn {
  background-color: #8A2BE2; /* Updated to match screenshot's vibrant purple */
  color: white;
}

.ideogram-btn:hover {
  background-color: #7925c8; /* Darker purple for hover */
}

/* Position controls better in batch options */
.prompt-batch-options {
  display: none;
}

.prompt-batch-options h4 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #64b5f6;
}

.prompt-batch-options .batch-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.prompt-batch-options label {
  white-space: nowrap;
}

.prompt-batch-options select {
  width: auto;
  min-width: 120px;
}

/* Ensure consistent prompt builder spacing */
.builder-section {
  margin-bottom: 20px;
}

/* Ensure proper positioning of modules */
.module {
  display: none;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

.module.active {
  display: block;
}

/* Fix the workflow step indicators to make the active state more visible */
.workflow-step.active {
  background-color: #333;
  border-left-color: #64b5f6;
  position: relative;
}

.workflow-step.active::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  margin-top: -10px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 10px solid #282828;
}

/* Floating return button for creative mode */
.floating-return-button {
  display: none;
}

/* Template fields grid for creative mode */
.template-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 12px 0;
  background-color: #2a2a2a;
  padding: 15px;
  border-radius: 5px;
  border: 1px solid #444;
}

.template-field {
  display: flex;
  flex-direction: column;
}

.template-field label {
  font-weight: 500;
  margin-bottom: 5px;
  font-size: 0.9em;
  color: #bbb;
}

.template-field input {
  padding: 8px;
  border: 1px solid #555;
  border-radius: 4px;
  background-color: #2d2d2d;
  color: #e0e0e0;
}

/* Style for quick enhancers in template fields */
.quick-enhancers-template {
  width: 100%;
  grid-column: 1 / -1; /* Span all columns */
  background-color: #333;
  padding: 10px;
  border-radius: 4px;
  margin-top: 15px;
  border: 1px solid #444;
}

.quick-enhancers-template h4 {
  color: #64b5f6;
  margin: 0 0 10px 0;
  font-size: 0.9rem;
}

.enhancer-quick-grid-template {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.enhancer-quick-item-template {
  display: flex;
  flex-direction: column;
}

.enhancer-quick-item-template label {
  font-size: 0.8rem;
  margin-bottom: 5px;
  color: #bbb;
}

.enhancer-quick-item-template select {
  background-color: #2d2d2d;
  border: 1px solid #444;
  color: #e0e0e0;
  padding: 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Make the quick enhancers responsive */
@media (max-width: 768px) {
  .enhancer-quick-grid-template {
    grid-template-columns: 1fr;
  }
}

/* Summary element styling */
details summary {
  cursor: pointer;
  padding: 8px 0;
  color: #64b5f6;
  user-select: none;
  font-weight: 500;
}

details summary:hover {
  color: #90caf9;
}

details summary:focus {
  outline: none;
}

/* Style for open details */
details[open] summary {
  margin-bottom: 10px;
  color: #64b5f6;
  font-weight: 500;
}

/* Move the mode selector styles to the setup module for better visibility */
#setup-module .mode-selector {
  margin-bottom: 20px;
  background-color: #333;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #444;
}

#setup-module .toggle-container {
  display: flex;
  border: 1px solid #444;
  border-radius: 4px;
  overflow: hidden;
  width: fit-content;
  margin-top: 8px;
}

#setup-module .toggle-container input[type="radio"] {
  display: none;
}

#setup-module .toggle-container label {
  padding: 10px 20px;
  cursor: pointer;
  background: #333;
  color: #aaa;
  transition: all 0.2s;
  font-size: 0.9rem;
  font-weight: 500;
}

#setup-module .toggle-container input[type="radio"]:checked + label {
  background: #4a6cf7;
  color: white;
}

/* Ensure the creative mode container is properly hidden when not active */
#creative-mode-container {
  display: none; /* Default to hidden */
  /* background-color: #2a2a2a;
  padding: 15px;
  border-radius: 5px;
  border: 1px solid #444;
  margin-top: 15px;*/
  width: 100%;
  box-sizing: border-box;
  position: relative;
  overflow: visible;
}

/* Update next-step-container to include space for the return button */
.next-step-container {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  width: 100%;
}

/* Add style for the return button */
.return-button {
  background-color: #555;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.return-button i {
  margin-right: 8px;
}

.return-button:hover {
  background-color: #666;
}

/* Adjust next-step-button to work with justify-content: space-between */
.next-step-button {
  background-color: #0069d9;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto; /* Push to the right */
}

/* Style enhancer selects in template fields to match other inputs */
.template-field .enhancer-select {
  padding: 8px;
  border: 1px solid #555;
  border-radius: 4px;
  background-color: #2d2d2d;
  color: #e0e0e0;
  width: 100%;
}

/* Ensure consistent font and size for select dropdown options */
.template-field select option {
  background-color: #2d2d2d;
  color: #e0e0e0;
  padding: 4px;
  font-family: input-mono, monospace;
  font-size: 0.8rem;
}

/* Add style for prompt action buttons to align them properly */
.prompt-action-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
}

.variations-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.variations-controls select {
  min-width: 100px;
}

/* Style for the AI model selector in the Setup module */
#setup-module .model-selection {
  margin-bottom: 20px;
  background-color: #333;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #444;
  border-left: 3px solid #64b5f6;
}

#setup-module .model-selection label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #64b5f6;
}

#setup-module .ai-model-description {
  color: #aaa;
  font-size: 0.8rem;
  margin-top: 5px;
  line-height: 1.3;
}

/* Small spacing adjustment after model selection */
#setup-module .mode-selector {
  margin-top: 25px;
}

/* Add highlight effect for template updates */
.highlight-update {
  animation: highlight-fade 1s ease-in-out;
}

@keyframes highlight-fade {
  0% { background-color: rgba(145, 231, 0, 0.3); }
  100% { background-color: transparent; }
}

/* Style for the load default enhancers button */
#load-default-enhancers {
  padding: 6px 12px;
  background-color: #4a6cf7;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s;
  margin-left: auto;
}

#load-default-enhancers:hover {
  background-color: #3a5ce7;
}

.enhancer-controls {
  margin-bottom: 10px;
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

/* Prompt count selection styles */
.prompt-count-selection {
  margin-bottom: 15px;
  margin-top: 10px;
}

.prompt-count-selection label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #bbb;
}

.prompt-count-selection select {
  width: 100%;
  padding: 8px;
  background-color: #2d2d2d;
  border: 1px solid #555;
  border-radius: 4px;
  color: #e0e0e0;
}

/* Add a small gap between the model and count sections */
.model-selection {
  margin-bottom: 15px;
}

/* Parameter preview styling */
.param-preview {
  padding: 8px;
  margin: 10px 0;
  background-color: #222;
  border: 1px solid #444;
  border-radius: 4px;
  color: #91e700;
  font-family: monospace;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 0.9em;
  min-height: 24px;
}

/* Style for the Ideogram button */
.ideogram-btn {
  background-color: #784af2; /* Purple color for Ideogram */
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

.ideogram-btn:hover {
  background-color: #673ab7;
}

.ideogram-btn:disabled {
  background-color: #b39ddb;
  cursor: not-allowed;
}

/* Style for the Midjourney button */
.midjourney-btn, .sendToMidjourney {
  background-color: #FF6B35; /* Orange color for Midjourney */
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

.midjourney-btn:hover, .sendToMidjourney:hover {
  background-color: #E55A2B;
}

.midjourney-btn:disabled, .sendToMidjourney:disabled {
  background-color: #FFAB87;
  cursor: not-allowed;
}

/* Batch actions container styling */
.batch-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.batch-send-label {
  font-weight: 500;
  color: var(--text-primary);
  margin-right: 10px;
  font-size: 14px;
}

/* Specific styling for batch send buttons */
#send-ideogram-btn {
  background-color: #784af2; /* Ideogram purple */
  color: white;
}

#send-ideogram-btn:hover {
  background-color: #673ab7;
}

#send-ideogram-btn:disabled {
  background-color: #b39ddb;
  cursor: not-allowed;
}

#send-midjourney-btn {
  background-color: #FF6B35; /* Midjourney orange */
  color: white;
}

#send-midjourney-btn:hover {
  background-color: #E55A2B;
}

#send-midjourney-btn:disabled {
  background-color: #FFAB87;
  cursor: not-allowed;
}

/* Add to your CSS file */
.batch-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.batch-dialog-content {
  background-color: #292929;
  padding: 20px;
  border-radius: 8px;
  width: 80%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.prompt-selection-list {
  max-height: 300px;
  overflow-y: auto;
  margin: 15px 0;
  border: 1px solid #444;
  padding: 10px;
}

.batch-prompt-item {
  padding: 5px;
  border-bottom: 1px solid #444;
}

.batch-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.batch-status {
  margin-top: 15px;
  padding: 10px;
  background-color: #333;
  border-radius: 4px;
}

.batch-status.hidden {
  display: none;
}

.primary-btn {
  background-color: #4a6cf7;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

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

/* Enhanced textarea styling for enhancer fields */
.enhancer-input.autocomplete-input {
  resize: none;
  min-height: 40px;
  height: auto;
  line-height: 1.5;
  font-size: 11px;
  padding: 8px;
  padding-right: 30px; /* Add more space on the right for the clear button */
  margin-bottom: 0;
  font-family: Menlo, monospace;
  overflow-y: auto;
  box-sizing: border-box;
  width: 100%;
}

/* REMOVED DUPLICATE .input-wrapper - Main definition at line 1267 */
/* REMOVED DUPLICATE .clear-button - Main definition at line 1274 */

/* Toggle switch styles for individual fields */
.separator-toggle-wrapper {
  display: inline-flex;
  align-items: center;
  min-width: 65px;
  /* background-color: #2a2a2a;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 2px 4px; */
}

.separator-toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
}

.separator-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.separator-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #444;
  transition: .4s;
  border-radius: 22px;
  height: 12px;
  width: 35px;
}

.separator-slider .toggle-knob {
  position: absolute;
  content: "";
  height: 10px;
  width: 10px;
  left: 3px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.separator-toggle-switch input:checked + .separator-slider {
  background-color: #93c800;
}

.separator-toggle-switch input:focus + .separator-slider {
  box-shadow: 0 0 1px #93c800;
}

.separator-toggle-switch input:checked + .separator-slider .toggle-knob {
  transform: translateX(14px);
}

.separator-mode-label {
  font-size: 10px;
  margin-left: 0px;
  white-space: nowrap;
  color: #aaa;
  margin-bottom: 5px;
}

/* Loading indicator styles */
.loading-overlay {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
  background-color: rgba(30, 30, 30, 0.7);
  border-radius: 8px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: #93c800;
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 20px;
}

.loading-text {
  color: #e0e0e0;
  font-size: 16px;
  font-weight: bold;
}

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

.input-section, .output-section, .prompt-section {
  margin-bottom: 30px;
  padding: 20px;
  background-color: #333;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}



.prompt-controls {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.ai-section {
  background-color: var(--bg-panel);
  padding: 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.ai-section h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--text-primary);
}

#promptTemplate {
    min-height: 75px;
    font-family: Menlo, monospace;
    font-size: 12px;
    line-height: 1.4;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    margin-top: 10px;
}

#copywriterBrief {
    min-height: 125px;
    font-family: Menlo, monospace;
    font-size: 12px;
    line-height: 1.4;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    margin-top: 10px;
}

/* REMOVED DUPLICATE #template-builder-module .input-wrapper - Not needed with click-to-edit */

/* Enhancer Tags Container */
.enhancer-tags-container {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    z-index: 1000;
    padding: 10px;
    /* margin-top: 5px; */
}

.enhancer-tags-container.enhancer-container-active {
    display: block;
}

.enhancer-tag-search {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-dark);
    color: var(--text-primary);
}

.enhancer-columns-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.enhancer-tag {
    padding: 6px 10px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    color: #91e700;
    transition: all 0.2s ease;
    font-family: monospace;
}

.enhancer-tag:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.enhancer-tag.selected {
  background: var(--accent-color);
  color: white;
}

.add-custom-value {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 4px;
  cursor: pointer;
}

.add-custom-value:hover {
  background: var(--accent-color);
  color: white;
}

/* REMOVED DUPLICATE .input-wrapper - Main definition at line 1267 */

/* Ensure enhancer input has proper z-index */
.enhancer-input {
    position: relative;
    z-index: 1;
    color: #91e700;
    cursor: pointer;
}

.preview-textarea {
    min-height: 120px;
    font-family: Menlo, monospace;
    font-size: 12px;
    min-height: 350px;
    line-height: 1.4;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: #87c000; /* Green color for preview text */
    width: 100%;
    padding: 12px;
    resize: vertical;
    margin-top: 10px;
}

.preview-textarea:read-only {
    cursor: text;
    opacity: 0.9;
}

.generate-prompts-button {
    display: block;
    width: auto;
    min-width: 300px;
    margin: 20px auto 0;
    padding: 15px 30px;
    background-color: #91e700;
    color: #000;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: monospace;
}

.generate-prompts-button:hover {
    background-color: #a8ff00;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.generate-prompts-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.output-header h3 {
    margin: 0;
}

.output-header select {
    width: auto;
    min-width: 120px;
    height: 32px;
    padding: 0 10px;
    margin: 0;
    background-color: #2d2d2d;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 12px;
    font-family: monospace;
}

.output-header select:focus {
    border-color: #4a6cf7;
    outline: none;
}

.prompt-item {
    margin-bottom: 10px;
}


/* Fix module visibility and layout */
.module-content {
    display: none;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    position: relative;
}

.module-content.active {
    display: block !important;
}



.batch-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

/* Critical overrides for token suggestions */
.inline-suggestion {
    position: fixed !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-size: 14px !important;
    color: #777 !important;
    z-index: 10000 !important;
    box-shadow: none !important;
    pointer-events: none !important;
    max-width: 80% !important;
    text-align: left !important;
    font-style: italic !important;
    opacity: 0.7 !important;
}

#token-suggestions {
    z-index: 10000 !important;
    position: absolute !important;
    background: white !important;
    border: 1px solid #aaa !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

.token-suggestion {
    padding: 8px 12px !important;
    cursor: pointer !important;
}

.token-suggestion:hover, .token-suggestion.selected {
    background-color: #f0f7ff !important;
}

/* Profile Library Styles */
.profile-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.profile-card {
    background: #232323;
    border-radius: 8px;
    box-shadow: 0 2px 8px #0001;
    padding: 12px;
    width: 180px;
    text-align: center;
    position: relative;
}

.profile-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.profile-info {
    margin-bottom: 8px;
    font-family: monospace;
}
.profile-id {
   font-size: 12px; 
   font-family: monospace;
   color: rgb(145, 231, 0);
}


.profile-card button {
    margin: 2px 4px;
    font-size: 0.9em;
}

/* Modal styles */
#profile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

/* Critical overrides for token suggestions */
.inline-suggestion {
    position: fixed !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-size: 14px !important;
    color: #777 !important;
    z-index: 10000 !important;
    box-shadow: none !important;
    pointer-events: none !important;
    max-width: 80% !important;
    text-align: left !important;
    font-style: italic !important;
    opacity: 0.7 !important;
}

#token-suggestions {
    z-index: 10000 !important;
    position: absolute !important;
    background: white !important;
    border: 1px solid #aaa !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

.token-suggestion {
    padding: 8px 12px !important;
    cursor: pointer !important;
}

.token-suggestion:hover, .token-suggestion.selected {
    background-color: #f0f7ff !important;
}

/* Profile Library Styles */
.profile-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.profile-card {
    background: #232323;
    border-radius: 8px;
    box-shadow: 0 2px 8px #0001;
    padding: 12px;
    width: 180px;
    text-align: center;
    position: relative;
}

.profile-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.profile-info {
    margin-bottom: 8px;
    font-family: monospace;
}
.profile-id {
   font-size: 12px; 
   font-family: monospace;
   color: rgb(145, 231, 0);
}


.profile-card button {
    margin: 2px 4px;
    font-size: 0.9em;
}

/* Modal styles */
#profile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#profile-modal > div {
    background: #383838;
    padding: 24px;
    border-radius: 8px;
    min-width: 320px;
    max-width: 90vw;
    margin: auto;
    position: relative;
}

/* Template Suggestion Dropdown Styles */
.suggestion-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  background: #1a2a1a;
  border: 1px solid #2a3a2a;
  border-radius: 4px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.suggestion-item {
  padding: 8px 10px;
  border-bottom: 1px solid #2a3a2a;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #111;
}

.suggestion-item:hover {
  background-color: #3d5a3d;
  color: #ffffff;
}

.suggestion-item:last-child {
  border-bottom: none;
}

/* Artist reference styling */
.artist-name {
  color: #8cc8b5;
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 2px;
}

.artist-desc {
  color: #a0a0a0;
  font-size: 10px;
  line-height: 1.2;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
}

/* Prompt Importer Styles */
.importer-container {
    background: var(--bg-panel);
    border-radius: 8px;
    padding: 1.5em;
    border: 1px solid var(--border-color);
}

.import-input-section {
    margin-bottom: 1.5em;
}

.import-input-section label {
    display: block;
    margin-bottom: 0.5em;
    color: var(--text-primary);
    font-weight: 500;
}

#prompt-import {
    width: 100%;
    min-height: 120px;
    padding: 1em;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}

#prompt-import:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(116, 92, 249, 0.2);
}

.import-controls {
    display: flex;
    gap: 1em;
    align-items: center;
    margin-top: 1em;
}

.import-status {
    color: var(--text-secondary);
    font-size: 0.9em;
    font-style: italic;
}

.import-preview-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5em;
    margin-top: 1em;
}

.import-preview-section h3 {
    margin: 0 0 1em 0;
    color: var(--text-primary);
}

#parsed-prompts-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1em;
}

.parsed-prompt-item {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.75em;
    margin-bottom: 0.5em;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-primary);
    word-wrap: break-word;
}

.parsed-prompt-item:last-child {
    margin-bottom: 0;
}

.import-actions {
    display: flex;
    gap: 1em;
    justify-content: flex-start;
}

.success-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.75em 1.5em;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.success-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.secondary-btn {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.75em 1.5em;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.secondary-btn:hover {
    background: var(--hover-bg);
    transform: translateY(-1px);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .import-controls,
    .import-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .import-controls button,
    .import-actions button {
        width: 100%;
    }
}

/* ======================================================================================== */
/* WEB BROWSER PANEL STYLES (New Feature - Completely separate from existing styles) */
/* ======================================================================================== */

.browser-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.browser-controls button {
    background: #444;
    border: 1px solid #666;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.browser-controls button:hover:not(:disabled) {
    background: #555;
}

.browser-controls button:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

.browser-controls button.primary {
    background: #2a465d;
}

.browser-controls button.primary:hover {
    background: #356a87;
}

#browser-clear-session {
    background: #d9534f !important;
    color: white;
}

#browser-clear-session:hover:not(:disabled) {
    background: #c9302c !important;
}

#browser-clear-session:disabled {
    background: #5a5a5a !important;
    color: #888 !important;
}

#browser-site-selector {
    flex: 1;
    min-width: 200px;
    padding: 8px;
    background: #444;
    border: 1px solid #666;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

#browser-site-selector:focus {
    outline: 2px solid #2a465d;
    outline-offset: 1px;
}

#browser-status {
    color: #ccc;
    font-size: 12px;
    margin-bottom: 10px;
    padding: 8px;
    background: #2a2a2a;
    border-radius: 4px;
    border-left: 3px solid #2a465d;
}

.browser-info {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 4px;
    margin-top: 10px;
}

.browser-info h4 {
    margin: 0 0 10px 0;
    color: #fff;
    font-size: 14px;
}

.browser-info ul {
    margin: 0;
    padding-left: 20px;
    color: #ccc;
    font-size: 14px;
}

.browser-info li {
    margin-bottom: 5px;
}

/* Responsive browser controls */
@media (max-width: 1200px) {
    .browser-controls {
        flex-wrap: wrap;
    }
    
    #browser-site-selector {
        order: 3;
        width: 100%;
        margin-top: 10px;
    }
}

/* iOS-style Toggle Switch */
.ios-toggle-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.toggle-label {
    font-size: 14px;
    color: #ccc;
    font-weight: 500;
}

.ios-toggle {
    position: relative;
    display: inline-block;
    width: 55px;
    height: 29px;
}

.ios-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #4CAF50;
    -webkit-transition: .3s;
    transition: .3s;
    border-radius: 30px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 2px;
    background-color: white;
    -webkit-transition: .3s;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

input:checked + .toggle-slider {
    background-color: #FF9800;
}

input:checked + .toggle-slider:before {
    -webkit-transform: translateX(30px);
    -ms-transform: translateX(30px);
    transform: translateX(30px);
}

/* Button Visual Indicators with Service Differentiation */
/* Ideogram buttons - Deep Teal Theme */
.send-btn-internal.ideogram-btn,
.ideogram-btn.send-btn-internal {
    background: linear-gradient(135deg, #00897B, #004D40) !important;
    border-left: 5px solid #00251A !important;
    color: white !important;
}

.send-btn-external.ideogram-btn,
.ideogram-btn.send-btn-external {
    background: linear-gradient(135deg, #FF8F00, #E65100) !important;
    border-left: 5px solid #BF360C !important;
    color: white !important;
}

/* Midjourney buttons - Bright Cyan Theme */
.send-btn-internal.midjourney-btn,
.midjourney-btn.send-btn-internal {
    background: linear-gradient(135deg, #00BCD4, #0097A7) !important;
    border-left: 5px solid #006064 !important;
    color: white !important;
}

.send-btn-external.midjourney-btn,
.midjourney-btn.send-btn-external {
    background: linear-gradient(135deg, #FFD54F, #FFA000) !important;
    border-left: 5px solid #FF8F00 !important;
    color: white !important;
}

.send-btn-external {
    background: linear-gradient(135deg, #FF8F00, #E65100) !important;
    border-left: 5px solid #BF360C !important;
    color: white !important;
}

/* Recent Prompts Dashboard Styles */
.recent-prompts-controls {
  display: flex;
  gap: 1em;
  margin-bottom: 1em;
  align-items: center;
  justify-content: center;
}

#prompt-filter { 
  width: 100%;
  max-width: 400px;
  padding: 0.75em; 
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 11px;
  font-family: Menlo, monospace;
  background: var(--bg-dark);
  color: #91e700;
  outline: none;
}

#prompt-filter:focus {
  border-color: #91e700;
  box-shadow: 0 0 0 2px rgba(145, 231, 0, 0.2);
}

.danger-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 0.75em 1em;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85em;
  transition: all 0.2s ease;
}

.danger-btn:hover {
  background: #c0392b;
  transform: translateY(-1px);
}

.primary-btn {
  background: #4a6cf7 !important;
  color: white !important;
  border: none !important;
  padding: 0.75em 1em;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85em;
  transition: all 0.2s ease;
}

.primary-btn:hover {
  background: #3b5ce0 !important;
  transform: translateY(-1px);
}

.recent-prompt-item { 
  display: flex; 
  align-items: flex-start; 
  margin-bottom: 0.75em; 
  background: var(--bg-panel); 
  border-radius: 8px; 
  padding: 1em; 
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.recent-prompt-item:hover {
  background: var(--hover-bg);
  border-color: rgba(145, 231, 0, 0.3);
}

.prompt-meta { 
  flex: 0 0 100px; 
  color: #87c000; 
  font-size: 13px; 
  font-family: Menlo, monospace;
  padding-right: 1em;
  text-align: center;
  line-height: 1.4;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prompt-content { 
  flex: 1; 
  padding-right: 1em;
}

.prompt-edit { 
  width: 100%; 
  border: 1px solid var(--border-color); 
  background: var(--bg-dark); 
  color: #87c000;
  font-size: 12px; 
  padding: 0.75em;
  border-radius: 6px;
  resize: vertical;
  min-height: 80px;
  font-family: Menlo, monospace;
  line-height: 1.4;
  outline: none;
}

.prompt-edit::-webkit-scrollbar {
  display: none;
}

.prompt-edit[readonly] { 
  background: transparent;
  border-color: transparent;
}

.prompt-edit:not([readonly]) {
  background: var(--bg-dark);
  border-color: #91e700;
  box-shadow: 0 0 0 2px rgba(145, 231, 0, 0.2);
  color: #91e700;
}

.prompt-actions { 
  flex: 0 0 auto; 
  display: flex; 
  gap: 0.4em; 
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  max-width: 350px; /* Increased to accommodate more buttons */
}

.prompt-actions button { 
  border: none;
  padding: 6px 10px; /* Slightly reduced padding */
  font-size: 0.8em; /* Slightly smaller font */
  border-radius: 4px; 
  background: var(--bg-card); 
  color: var(--text-primary);
  cursor: pointer;
  min-width: 45px; /* Reduced min width */
  height: 28px; /* Reduced height */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1;
}

.prompt-actions button i {
  margin-right: 4px;
  font-size: 0.9em;
}

.prompt-actions button:hover { 
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.edit-btn { background: #FFC107; color: #000; }
.edit-btn:hover { background: #FFB300; }

.save-btn { background: #28A745; color: white; }
.save-btn:hover { background: #218838; }

.delete-btn { background: #DC3545; color: white; }
.delete-btn:hover { background: #C82333; }

.copy-btn { background: #007BFF; color: white; }
.copy-btn:hover { background: #0056B3; }

/* Recent Prompts specific button styles */
.btn-copy-prompt { background: #17A2B8; color: white; }
.btn-copy-prompt:hover { background: #138496; }

.btn-add-to-generator { background: #28A745; color: white; }
.btn-add-to-generator:hover { background: #218838; }

.btn-delete-prompt { background: #DC3545; color: white; }
.btn-delete-prompt:hover { background: #C82333; }

.midjourney-btn { 
  background-color: #FF6B35 !important; 
  color: white !important;
}

/* REMOVED DUPLICATE !important OVERRIDES - Main form styles at lines 640-720 are sufficient */

.midjourney-btn:hover { 
  background-color: #E55A2B !important; 
}

.ideogram-btn { 
  background-color: #8B5CF6 !important; 
  color: white !important; 
}
.ideogram-btn:hover { 
  background-color: #7C3AED !important; 
}

.recent-prompts-list .empty {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: 2em;
}

/* Settings - Authentication Status Indicators */
.auth-indicator {
  display: inline-block;
  margin-right: 8px;
  font-size: 20px;
  line-height: 1;
  transition: color 0.3s ease;
}

.auth-indicator.not-authenticated {
  color: #DC3545; /* Red */
}

.auth-indicator.authenticated {
  color: #28A745; /* Green */
}

.status-message {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.9em;
  padding: 4px 8px;
  border-radius: 4px;
}

.status-message.success {
  color: #28A745;
  background: rgba(40, 167, 69, 0.1);
}

.status-message.error {
  color: #DC3545;
  background: rgba(220, 53, 69, 0.1);
}

.status-message.warning {
  color: #FFC107;
  background: rgba(255, 193, 7, 0.1);
}

.status-message.info {
  color: #17A2B8;
  background: rgba(23, 162, 184, 0.1);
}

