/* ===========================
   GLOBAL STYLES & RESET
   =========================== */

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

:root {
    /* Color Palette - Nurimate Brand */
    /* Warm, welcoming light theme with coral accent */
    --bg-primary: #FFFCF9;           /* Cream white background */
    --bg-secondary: #FAF8F5;         /* Light cream */
    --bg-tertiary: #F5F3F0;          /* Slightly darker cream for cards */
    --bg-card: #FFFFFF;              /* Pure white for elevated cards */
    --bg-hover: #F0EDE8;             /* Hover state */

    --text-primary: #2D2926;         /* Dark warm brown for primary text */
    --text-secondary: #5A524D;       /* Medium brown for secondary text */
    --text-muted: #8A857F;           /* Muted warm gray */

    /* Nurimate Brand Color: #E17A5F */
    --accent-primary: #E17A5F;       /* Main coral accent */
    --accent-hover: #F08A6F;         /* Lighter coral on hover */
    --accent-active: #D16A4F;        /* Darker coral when active */
    --accent-light: #FFF5F2;         /* Very light coral background */
    --accent-success: #7FB685;       /* Warm green for success */
    --accent-success-dark: #6FA675;  /* Darker success */
    --accent-warning: #E8A65F;       /* Warm orange for warnings */
    --accent-danger: #E17B73;        /* Warm red for danger */
    --accent-danger-dark: #D16763;   /* Darker danger */

    --border-color: #E5E2DD;         /* Light warm border */
    --border-radius: 12px;           /* Slightly rounder for friendlier look */

    /* Shadows for depth in light theme */
    --shadow-sm: 0 2px 4px rgba(45, 41, 38, 0.08);
    --shadow-md: 0 4px 12px rgba(45, 41, 38, 0.12);
    --shadow-lg: 0 8px 24px rgba(45, 41, 38, 0.15);

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===========================
   APP LAYOUT
   =========================== */

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

.app-header {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.header-logo {
    flex-shrink: 0;
}

.header-logo svg {
    display: block;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.header-text {
    flex: 1;
}

.app-title {
    font-size: 2rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 2px;
}

.app-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.main-content {
    position: relative;
}

/* ===========================
   VIEW CONTAINERS
   =========================== */

.view-container {
    display: none;
}

.view-container.active {
    display: block;
}

/* ===========================
   EMPTY STATE
   =========================== */

.empty-state {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    background: var(--bg-card);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
}

.empty-state h2 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-sm);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* ===========================
   GLOBAL AI CONFIGURATION
   =========================== */

.global-ai-config-section {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.global-ai-config-section h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.section-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    font-size: 0.95rem;
}

.config-section.mandatory {
    border-left: 4px solid var(--accent-primary);
    background: var(--accent-light);
}

.config-section.optional {
    border-left: 4px solid var(--border-color);
    background: var(--bg-secondary);
}

.section-header {
    margin-bottom: var(--spacing-md);
}

.section-header h3 {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.2rem;
    margin-bottom: var(--spacing-xs);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.required-badge {
    background: var(--accent-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.optional-badge {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid var(--border-color);
}

/* ===========================
   BOT LIST
   =========================== */

.bot-list-section {
    margin-top: var(--spacing-xl);
}

.bot-list-section h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.bot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.bot-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.bot-card:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.bot-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.bot-card-name {
    font-size: 1.3rem;
    font-weight: 600;
}

.bot-card-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.bot-card-status.online {
    background: rgba(127, 182, 133, 0.15);
    color: var(--accent-success);
    border: 1px solid rgba(127, 182, 133, 0.3);
}

.bot-card-status.offline {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.bot-card-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.bot-card-info-item {
    display: flex;
    justify-content: space-between;
}

.bot-card-info-label {
    color: var(--text-muted);
}

/* ===========================
   BOT DETAIL VIEW
   =========================== */

.bot-detail-container {
    max-width: 900px;
    margin: 0 auto;
}

.bot-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.btn-back {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: var(--bg-hover);
}

.bot-header-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.bot-header-info h2 {
    font-size: 2rem;
}

.bot-status {
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 500;
}

.bot-status.online {
    background: rgba(127, 182, 133, 0.15);
    color: var(--accent-success);
    border: 1px solid rgba(127, 182, 133, 0.3);
}

.bot-status.offline {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* ===========================
   BOT PROFILE CARD
   =========================== */

.bot-profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.profile-section h3 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.profile-item {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

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

.profile-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.profile-value {
    color: var(--text-primary);
}

/* ===========================
   MEMORY CONTROLS
   =========================== */

.memory-controls {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.memory-controls h4 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
}

.memory-buttons {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.memory-help-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===========================
   CONFIGURATION TABS
   =========================== */

.config-tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: var(--spacing-md) var(--spacing-lg);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-content {
    display: none;
}

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

/* ===========================
   CONFIGURATION SECTIONS
   =========================== */

.config-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.config-section h3 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.help-text {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.input-with-button {
    display: flex;
    gap: var(--spacing-sm);
}

.input-with-button input {
    flex: 1;
}

.test-result {
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    display: none;
}

.test-result.success {
    display: block;
    background: rgba(127, 182, 133, 0.1);
    border: 1px solid var(--accent-success);
    color: var(--accent-success);
}

.test-result.error {
    display: block;
    background: rgba(225, 123, 115, 0.1);
    border: 1px solid var(--accent-danger);
    color: var(--accent-danger);
}

.test-result.loading {
    display: block;
    background: rgba(225, 122, 95, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

/* ===========================
   FEATURE TOGGLES
   =========================== */

.feature-toggle {
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-md);
}

.toggle-header {
    margin-bottom: var(--spacing-sm);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    cursor: pointer;
    user-select: none;
}

.toggle-checkbox {
    display: none;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    background: var(--bg-tertiary);
    border-radius: 13px;
    transition: background 0.3s ease;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-checkbox:checked + .toggle-switch {
    background: var(--accent-primary);
}

.toggle-checkbox:checked + .toggle-switch::after {
    left: 27px;
    background: white;
}

.toggle-text {
    font-size: 1rem;
    font-weight: 500;
}

.feature-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-left: 66px;
}

/* ===========================
   CHAT INTERFACE
   =========================== */

.chat-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    height: 500px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
}

.chat-empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.chat-note {
    margin-top: var(--spacing-sm);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.chat-message {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    max-width: 80%;
}

.chat-message.user {
    background: var(--accent-primary);
    color: white;
    margin-left: auto;
}

.chat-message.bot {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.chat-message-sender {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    font-size: 0.85rem;
}

.chat-message-text {
    line-height: 1.5;
}

.chat-input-container {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.chat-input-container input {
    flex: 1;
}

/* ===========================
   PLAY BUTTON
   =========================== */

.play-button-container {
    margin-top: var(--spacing-xl);
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.btn-play {
    width: 100%;
    max-width: 400px;
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: 1.3rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-success), var(--accent-success-dark));
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin: 0 auto;
}

.btn-play:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(225, 122, 95, 0.3);
}

.btn-play.playing {
    background: linear-gradient(135deg, var(--accent-danger), var(--accent-danger-dark));
}

.play-icon {
    font-size: 1.5rem;
}

.play-help-text {
    margin-top: var(--spacing-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===========================
   BUTTONS
   =========================== */

.btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

.btn-danger:hover {
    background: var(--accent-danger-dark);
}

.btn-test {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: var(--spacing-sm) var(--spacing-md);
}

.btn-test:hover {
    background: var(--bg-hover);
}

/* ===========================
   MODALS
   =========================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 41, 38, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.modal-content.modal-small {
    max-width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

/* ===========================
   SCROLLBAR STYLING
   =========================== */

::-webkit-scrollbar {
    width: 10px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-hover);
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {
    .app-container {
        padding: var(--spacing-md);
    }
    
    .app-title {
        font-size: 2rem;
    }
    
    .bot-grid {
        grid-template-columns: 1fr;
    }
    
    .config-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .tab-btn {
        white-space: nowrap;
    }
    
    .memory-buttons {
        flex-direction: column;
    }
}


/* ===========================
   EPISODIC MEMORY
   =========================== */

.episodic-memory {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.episode-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    transition: all 0.2s ease;
}

.episode-card:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.episode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.episode-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.episode-weight {
    color: var(--accent-warning);
    font-size: 0.9rem;
}

.episode-content {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
}

.episode-meta {
    display: flex;
    gap: var(--spacing-md);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.episode-date, .episode-tags, .episode-access {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* ===========================
   PERSONALITY CREATION UI
   =========================== */

.modal-wide {
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
}

.personality-divider {
    height: 1px;
    background: var(--border-color);
    margin: var(--spacing-lg) 0;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

/* Personality Sliders */
.personality-section {
    margin-bottom: var(--spacing-md);
}

.personality-slider-group {
    margin-bottom: var(--spacing-lg);
}

.slider-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xs);
}

.slider-label-left,
.slider-label-right {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 80px;
}

.slider-label-left {
    text-align: right;
}

.slider-label-right {
    text-align: left;
}

.personality-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
    transition: background 0.2s;
}

.personality-slider:hover {
    background: var(--bg-hover);
}

.personality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.personality-slider::-webkit-slider-thumb:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.personality-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.personality-slider::-moz-range-thumb:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

/* Personality Extras */
.personality-extras {
    margin-bottom: var(--spacing-md);
}

.extras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-sm);
}

.personality-checkbox {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.personality-checkbox:hover {
    background: var(--bg-hover);
}

.personality-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.personality-checkbox span {
    font-size: 13px;
    color: var(--text-primary);
}

/* Personality Preview */
.personality-preview {
    margin-bottom: var(--spacing-md);
}

.preview-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
}

.preview-description {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
}

.preview-extras {
    font-size: 13px;
    color: var(--accent-primary);
    margin-bottom: var(--spacing-md);
    font-weight: 500;
}

.preview-extras:empty {
    display: none;
}

.preview-example {
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--accent-primary);
}

/* Modal Footer Adjustments for Randomize Button */
.modal-footer {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
}

.modal-footer .btn:first-child {
    margin-right: auto;
}
/* ===========================
   MINECRAFT CONNECTOR STYLES
   =========================== */

.connector-code-section,
.connector-status-section,
.connector-download-section,
.connector-instructions {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.connector-code-section h4,
.connector-status-section h4,
.connector-download-section h4,
.connector-instructions h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

/* Code Display */
.code-display {
    background: var(--accent-light);
    border: 2px solid var(--accent-primary);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.code-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.code-value span {
    font-size: 24px;
    font-weight: 700;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    color: var(--accent-active);
    letter-spacing: 2px;
}

.btn-icon-only {
    background: transparent;
    border: none;
    padding: var(--spacing-sm);
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.2s;
}

.btn-icon-only:hover {
    transform: scale(1.1);
}

.code-expiry {
    margin-top: var(--spacing-sm);
    font-size: 12px;
    color: var(--text-muted);
}

/* Status Display */
.status-display {
    padding: var(--spacing-md);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-dot.connected {
    background: var(--accent-success);
    animation: pulse 2s infinite;
}

.status-dot.connecting {
    background: var(--accent-warning);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-weight: 600;
    color: var(--text-primary);
}

.status-details {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: 8px;
}

.status-details p {
    margin-bottom: var(--spacing-xs);
    font-size: 14px;
    color: var(--text-secondary);
}

/* Download Buttons */
.download-buttons {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    flex-wrap: wrap;
}

.download-buttons .btn {
    flex: 1;
    min-width: 120px;
}

/* Instructions */
.connector-instructions ol {
    margin-left: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

.connector-instructions li {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===========================
   LUCIDE ICONS
   =========================== */

/* Icon sizing for different contexts */
.empty-state-icon svg,
.empty-state-icon i {
    width: 64px !important;
    height: 64px !important;
    stroke-width: 1.5;
}

.btn-icon svg,
.btn-icon i {
    width: 20px !important;
    height: 20px !important;
    stroke-width: 2;
}

.play-icon svg,
.play-icon i {
    width: 24px !important;
    height: 24px !important;
    stroke-width: 2;
}

/* Ensure icons are inline */
.btn i,
.tab-btn i {
    display: inline-block;
    vertical-align: middle;
}

/* Icon-only buttons */
.btn-icon-only svg,
.btn-icon-only i {
    width: 18px !important;
    height: 18px !important;
}
