/* Custom CSS for LINE Anti-Ban Message Mutator App */

:root {
    /* Fresh Light Theme (Default) */
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --bg-input: #f1f5f9;
    
    --primary: #10b981; /* Emerald */
    --primary-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --secondary: #6366f1; /* Indigo */
    --secondary-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    --line-color: #06c755;
    --line-gradient: linear-gradient(135deg, #059669 0%, #06c755 100%);
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-dark: #94a3b8;
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --font-heading: 'Outfit', 'Inter', 'Noto Sans TC', sans-serif;
    --font-body: 'Inter', 'Noto Sans TC', sans-serif;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 4px 14px rgba(16, 185, 129, 0.15);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --orb-opacity: 0.08;

    /* Theme Tokens for Light theme compatibility */
    --card-header-text: #0f172a;
    --header-bg: rgba(255, 255, 255, 0.85);
    --header-border: #e2e8f0;
    --logo-text-gradient: linear-gradient(120deg, #047857 0%, #065f46 100%);
    
    --badge-bg-purple: rgba(139, 92, 246, 0.08);
    --badge-border-purple: rgba(139, 92, 246, 0.2);
    --badge-text-purple: #6d28d9;
    --badge-bg-blue: rgba(59, 130, 246, 0.08);
    --badge-border-blue: rgba(59, 130, 246, 0.2);
    --badge-text-blue: #1d4ed8;
    
    --variant-card-bg: #ffffff;
    --variant-body-bg: #f8fafc;
    --variant-body-text: #0f172a;
    
    --bento-title-color: #0f172a;
    --bento-para-bold: #059669;
    
    --advanced-bg: #f8fafc;
    
    --select-option-bg: #ffffff;
    --select-option-text: #0f172a;
    
    --sim-card-bg: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    --sim-card-border: rgba(16, 185, 129, 0.25);
    --sim-card-hover-border: rgba(16, 185, 129, 0.5);

    --btn-secondary-bg: rgba(15, 23, 42, 0.05);
    --btn-secondary-border: rgba(15, 23, 42, 0.1);
    --btn-secondary-text: #0f172a;
    --btn-secondary-hover-bg: rgba(15, 23, 42, 0.08);
    --btn-secondary-hover-border: rgba(15, 23, 42, 0.18);
}

.theme-dark-cyber {
    /* Cyber Dark Theme (Current Dark Theme) */
    --bg-dark: #090b11;
    --bg-card: rgba(17, 22, 37, 0.75);
    --bg-card-hover: rgba(22, 28, 48, 0.9);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --bg-input: rgba(10, 11, 18, 0.6);
    
    --primary: #8b5cf6; /* Purple */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --secondary: #3b82f6; /* Blue */
    --secondary-gradient: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #4b5563;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.25);
    --orb-opacity: 0.22;

    /* Theme Tokens for Dark Theme */
    --card-header-text: #ffffff;
    --header-bg: rgba(10, 12, 22, 0.8);
    --header-border: rgba(255, 255, 255, 0.08);
    --logo-text-gradient: linear-gradient(120deg, #ffffff 30%, #e9d5ff 100%);
    
    --badge-bg-purple: rgba(139, 92, 246, 0.15);
    --badge-border-purple: rgba(139, 92, 246, 0.3);
    --badge-text-purple: #c084fc;
    --badge-bg-blue: rgba(59, 130, 246, 0.15);
    --badge-border-blue: rgba(59, 130, 246, 0.3);
    --badge-text-blue: #60a5fa;
    
    --variant-card-bg: rgba(255, 255, 255, 0.02);
    --variant-body-bg: rgba(10, 11, 18, 0.4);
    --variant-body-text: #e5e7eb;
    
    --bento-title-color: #ffffff;
    --bento-para-bold: #ffffff;
    
    --advanced-bg: rgba(10, 11, 18, 0.4);
    
    --select-option-bg: #090b11;
    --select-option-text: #ffffff;
    
    --sim-card-bg: linear-gradient(135deg, rgba(17, 22, 37, 0.8) 0%, rgba(26, 21, 44, 0.8) 100%);
    --sim-card-border: rgba(139, 92, 246, 0.35);
    --sim-card-hover-border: rgba(139, 92, 246, 0.6);

    --btn-secondary-bg: rgba(255, 255, 255, 0.05);
    --btn-secondary-border: rgba(255, 255, 255, 0.08);
    --btn-secondary-text: #ffffff;
    --btn-secondary-hover-bg: rgba(255, 255, 255, 0.1);
    --btn-secondary-hover-border: rgba(255, 255, 255, 0.15);
}

/* Global Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: 2rem;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #60a5fa;
    text-decoration: underline;
}

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

::-webkit-scrollbar-track {
    background: #0d1117;
}

::-webkit-scrollbar-thumb {
    background: #2f363d;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444d56;
}

/* Decorative Background Glow Orbs */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.22;
    pointer-events: none;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #8b5cf6 0%, rgba(139,92,246,0) 70%);
    top: -100px;
    left: -150px;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #3b82f6 0%, rgba(59,130,246,0) 70%);
    top: 200px;
    right: -200px;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #ec4899 0%, rgba(236,72,153,0) 70%);
    bottom: -100px;
    left: 20%;
}

/* Header Styling */
.app-header {
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--header-border);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: var(--shadow-glow);
}

.logo-area h1 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: var(--logo-text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.header-badges {
    display: flex;
    gap: 0.5rem;
}

.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-purple {
    background: var(--badge-bg-purple);
    border: 1px solid var(--badge-border-purple);
    color: var(--badge-text-purple);
}

.badge-badge {
    background: var(--badge-bg-purple);
    border: 1px solid var(--badge-border-purple);
    color: var(--badge-text-purple);
}

.badge-blue {
    background: var(--badge-bg-blue);
    border: 1px solid var(--badge-border-blue);
    color: var(--badge-text-blue);
}

/* Card Styling (Glassmorphism) */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(16px);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.75rem;
}

.card-header h2 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--card-header-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* Layout Grid */
.app-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.5rem;
    margin-top: 2rem;
    align-items: start;
}

/* Left Panel Input Area */
.input-wrapper {
    position: relative;
    width: 100%;
}

#input-message {
    width: 100%;
    height: 180px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    padding: 1rem;
    padding-right: 2.5rem;
    resize: vertical;
    outline: none;
    transition: var(--transition);
}

#input-message:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
    background: var(--bg-card);
}

.char-counter {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.clear-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-dark);
    font-size: 1.15rem;
    cursor: pointer;
    transition: var(--transition);
}

.clear-btn:hover {
    color: var(--danger);
}

/* Parameter Settings Styling */
.settings-card {
    margin-top: 1.5rem;
}

.setting-group {
    margin-bottom: 1.5rem;
}

.setting-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.setting-label strong {
    color: var(--primary);
}

/* Custom Range Slider */
.range-slider-wrapper {
    width: 100%;
    padding: 0.5rem 0;
}

#variant-count {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
}

#variant-count::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid white;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    transition: transform 0.1s;
}

#variant-count::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.range-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-dark);
    margin-top: 0.4rem;
    padding: 0 2px;
}

/* Tabs System */
.tab-wrapper {
    margin-top: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    background: rgba(10, 11, 18, 0.3);
    overflow: hidden;
}

.tabs {
    display: flex;
    background: rgba(10, 11, 18, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    flex: 1;
    padding: 0.85rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
    color: white;
    background: rgba(139, 92, 246, 0.06);
    border-bottom-color: var(--primary);
}

.tab-content {
    padding: 1.25rem;
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.tab-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* Option Checkboxes (Non-AI) */
.checkbox-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: var(--transition);
}

.checkbox-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.checkbox-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: transparent;
    font-size: 0.65rem;
    flex-shrink: 0;
    margin-top: 0.15rem;
    transition: var(--transition);
}

.checkbox-card input[type="checkbox"]:checked ~ .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.4);
}

.checkbox-card:hover input[type="checkbox"]:not(:checked) ~ .checkbox-custom {
    border-color: rgba(255, 255, 255, 0.4);
}

.option-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.option-info strong {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 600;
}

.option-info span {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* AI Form Fields */
.ai-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-label-with-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.link-btn {
    font-size: 0.78rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.api-key-input-wrapper {
    position: relative;
    display: flex;
    width: 100%;
}

.api-key-input-wrapper input {
    width: 100%;
    padding: 0.75rem;
    padding-right: 2.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.api-key-input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--text-main);
}

.form-help {
    font-size: 0.75rem;
    color: var(--text-dark);
}

.form-group select {
    padding: 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.form-group select:focus {
    border-color: var(--primary);
}

.form-group select option {
    background: var(--select-option-bg);
    color: var(--select-option-text);
}

.custom-model-input {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.custom-model-input:focus {
    border-color: var(--primary);
}

.hidden {
    display: none !important;
}

.hybrid-card {
    background: rgba(139, 92, 246, 0.04);
    border-color: rgba(139, 92, 246, 0.15);
}

.hybrid-card:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.25);
}

/* Generate Button */
.btn-generate {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-glow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-generate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    transition: all 0.6s;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.4);
}

.btn-generate:hover::before {
    left: 100%;
}

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

.btn-generate:disabled {
    background: var(--text-dark);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.spinner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Right Panel: Results Header */
.results-card {
    min-height: 520px;
    display: flex;
    flex-direction: column;
}

.results-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.results-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.results-count-badge {
    background: rgba(139, 92, 246, 0.15);
    color: #c084fc;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-weight: 600;
}

.results-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Toggle Switch (ZWS Visibility) */
.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

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

.slider-round {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
    background-color: #374151;
    border-radius: 34px;
    margin-right: 0.4rem;
    transition: var(--transition);
}

.slider-round:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch input:checked + .slider-round {
    background-color: var(--primary);
}

.toggle-switch input:checked + .slider-round:before {
    transform: translateX(16px);
}

.toggle-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
}

.toggle-switch input:checked ~ .toggle-label {
    color: var(--text-main);
}

.btn-secondary {
    background: var(--btn-secondary-bg);
    border: 1px solid var(--btn-secondary-border);
    color: var(--btn-secondary-text);
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: var(--transition);
}

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

.btn-sm {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Empty State Styling */
.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    max-width: 420px;
    margin: auto;
}

.empty-icon {
    font-size: 3.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    animation: float 4s ease-in-out infinite;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--card-header-text);
}

.empty-state p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Skeleton Loading Styling */
.skeleton-container {
    padding: 0.5rem 0;
}

.skeleton-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.skeleton-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.skeleton-title {
    width: 120px;
    height: 16px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: loadingShimmer 1.5s infinite;
}

.skeleton-btn {
    width: 70px;
    height: 16px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: loadingShimmer 1.5s infinite;
}

.skeleton-body {
    width: 100%;
    height: 60px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: loadingShimmer 1.5s infinite;
}

/* Results List & Cards */
.results-list {
    flex: 1;
    overflow-y: auto;
    max-height: 650px;
    padding-right: 0.25rem;
}

.variant-card {
    background: var(--variant-card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.variant-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.variant-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.85rem;
    color: var(--text-muted);
}

.variant-index {
    color: var(--card-header-text);
    font-weight: 700;
}

.variant-stats {
    display: flex;
    gap: 0.85rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.similarity-high {
    color: var(--success);
}

.similarity-mid {
    color: var(--warning);
}

.similarity-low {
    color: var(--secondary);
}

.variant-body {
    background: var(--variant-body-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.85rem;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-all;
    user-select: all;
    line-height: 1.5;
    margin-bottom: 0.85rem;
    color: var(--variant-body-text);
}

/* Zero Width Character Visualizer */
.zws-indicator {
    background: rgba(239, 68, 68, 0.2);
    border: 1px dashed rgba(239, 68, 68, 0.6);
    border-radius: 3px;
    color: #f87171;
    font-size: 0.65rem;
    font-family: monospace;
    padding: 0 2px;
    margin: 0 1px;
    display: none;
    vertical-align: middle;
    user-select: none;
}

.show-zws .zws-indicator {
    display: inline-block;
}

/* Card Buttons Group */
.variant-footer {
    display: flex;
    gap: 0.75rem;
}

.variant-footer button {
    flex: 1;
    padding: 0.6rem;
    border-radius: 8px;
    border: none;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.btn-copy-variant {
    background: var(--primary-gradient);
    color: white;
}

.btn-copy-variant:hover {
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.35);
    transform: scale(1.02);
}

.btn-line-variant {
    background: var(--line-gradient);
    color: white;
}

.btn-line-variant:hover {
    box-shadow: 0 0 12px rgba(6, 199, 85, 0.35);
    transform: scale(1.02);
}

/* "Used / Copied" greyed-out state */
.variant-card.used {
    opacity: 0.45;
    filter: saturate(0.2) contrast(0.9);
}

.variant-card.used .variant-index::after {
    content: " (已複製)";
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.4rem;
}

/* Toast System */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: rgba(16, 185, 129, 0.95);
    color: white;
    padding: 0.85rem 1.75rem;
    border-radius: 9999px;
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
}

.toast.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(40px);
    pointer-events: none;
}

/* Knowledge Section (Bento Grid) */
.info-section {
    margin-top: 5rem;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-tag {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--primary);
    text-transform: uppercase;
}

.section-title h2 {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    margin-top: 0.35rem;
    margin-bottom: 0.75rem;
    color: var(--bento-title-color);
}

.section-title p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(140px, auto);
    gap: 1.25rem;
}

.bento-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: var(--transition);
}

.bento-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.bento-card:nth-child(1) {
    grid-column: span 3;
    grid-row: span 1;
}

.bento-card:nth-child(2) {
    grid-column: span 3;
    grid-row: span 1;
}

.bento-card:nth-child(3) {
    grid-column: span 3;
    grid-row: span 2;
}

.bento-card:nth-child(4) {
    grid-column: span 3;
    grid-row: span 2;
}

.bento-icon {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.text-purple { color: #c084fc; }
.text-blue { color: #60a5fa; }
.text-green { color: #34d399; }
.text-red { color: #f87171; }

.bento-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--bento-title-color);
    margin-bottom: 0.75rem;
}

.bento-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.bento-card p strong {
    color: var(--bento-para-bold);
}

/* Guidelines Checklist */
.guidelines-list {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.guidelines-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.guidelines-list li i {
    color: var(--success);
    font-size: 0.95rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.guidelines-list li strong {
    color: var(--bento-title-color);
}

/* Footer styling */
.app-footer-bar {
    border-top: 1px solid var(--border-color);
    margin-top: 6rem;
    padding: 2rem 0;
    background: var(--bg-card);
}

.app-footer-bar p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.app-footer-bar .text-muted {
    font-size: 0.78rem;
    color: var(--text-dark);
    margin-top: 0.35rem;
}

/* Keyframes Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .app-layout {
        grid-template-columns: 1fr;
    }
    .bento-card:nth-child(1),
    .bento-card:nth-child(2),
    .bento-card:nth-child(3),
    .bento-card:nth-child(4) {
        grid-column: span 6;
        grid-row: auto;
    }
}

@media (max-width: 640px) {
    body {
        padding-bottom: 1rem;
    }
    .container {
        padding: 0 1rem;
    }
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .logo-area {
        width: 100%;
    }
    .header-badges {
        margin-top: 0.5rem;
    }
    .app-layout {
        margin-top: 1rem;
        gap: 1.25rem;
    }
    .card {
        padding: 1.25rem;
    }
    .results-card {
        min-height: 400px;
    }
    .variant-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Advanced Collapsible Settings Panel */
.advanced-settings-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    background: var(--variant-card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 1.25rem;
    transition: var(--transition);
    user-select: none;
}

.advanced-settings-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.advanced-settings-toggle .toggle-arrow {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.advanced-settings-toggle.open .toggle-arrow {
    transform: rotate(180deg);
}

.advanced-settings-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--advanced-bg);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 10px 10px;
    margin-top: -10px;
    margin-bottom: 1rem;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.advanced-settings-panel .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.advanced-settings-panel label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

.advanced-settings-panel textarea {
    width: 100%;
    height: 75px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.8rem;
    padding: 0.5rem;
    resize: vertical;
    outline: none;
    font-family: inherit;
    line-height: 1.4;
    transition: var(--transition);
}

.advanced-settings-panel textarea:focus {
    border-color: var(--primary);
    background: var(--bg-card);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Virtual Cursor */
.virtual-cursor {
    position: fixed;
    width: 24px;
    height: 24px;
    color: #e0f2fe;
    font-size: 1.4rem;
    pointer-events: none;
    z-index: 9999;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
    transition: top 0.8s cubic-bezier(0.25, 1, 0.5, 1), left 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.virtual-cursor i {
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

/* Click Ripple animation on virtual cursor */
.click-ripple {
    position: absolute;
    top: 5px;
    left: 2px;
    width: 24px;
    height: 24px;
    border: 3px solid var(--primary);
    border-radius: 50%;
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

.click-ripple.animate {
    animation: ripple 0.5s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

/* Simulator Card & Controls */
.simulator-card {
    border: 1px dashed var(--sim-card-border) !important;
    background: var(--sim-card-bg) !important;
    margin-bottom: 1.5rem;
}

.simulator-card .card-header h2 {
    color: var(--card-header-text) !important;
}

.simulator-card .card-header h2 i {
    color: var(--primary) !important;
}

.simulator-card:hover {
    border-color: var(--sim-card-hover-border) !important;
}

.sim-controls-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.sim-controls-wrapper .form-group {
    flex: 1;
    margin-bottom: 0;
}

.sim-btns {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2px;
}

.btn-sim-action {
    white-space: nowrap;
}

/* Monospace HUD terminal style */
.sim-hud {
    margin-top: 1.25rem;
    background: #05070c;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.75rem;
    font-family: monospace;
    font-size: 0.8rem;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease-out;
}

.sim-hud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.35rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.sim-hud-status {
    color: var(--success);
    font-weight: bold;
}

.sim-hud-body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 120px;
    overflow-y: auto;
    text-align: left;
}

.sim-log-thought {
    color: #38bdf8; /* light blue */
}

.sim-log-action {
    color: #c084fc; /* light purple */
    padding-left: 0.5rem;
}

.sim-log-tool-call {
    color: #c084fc; /* light purple */
    padding-left: 0.5rem;
    font-weight: 500;
}

.sim-log-result {
    color: #4ade80; /* light green */
    padding-left: 0.5rem;
}

/* Custom highlighted styling for elements during computer use hover */
.sim-hover-target {
    position: relative;
    outline: 2px solid var(--primary) !important;
    outline-offset: 2px;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5) !important;
    z-index: 10;
}

/* Steganography Visualizer Diagnostic Indicators */
.homo-indicator, .inter-indicator {
    border: none;
    background: transparent;
    color: inherit;
    padding: 0;
    margin: 0;
}

.show-zws .homo-indicator {
    background: rgba(59, 130, 246, 0.25);
    border: 1px solid rgba(59, 130, 246, 0.6);
    border-radius: 3px;
    color: #60a5fa;
    padding: 0 2px;
    margin: 0 1px;
}

.show-zws .inter-indicator {
    background: rgba(245, 158, 11, 0.25);
    border: 1px dashed rgba(245, 158, 11, 0.6);
    border-radius: 3px;
    color: #fbbf24;
    padding: 0 2px;
    margin: 0 1px;
}

/* Theme Switcher Styles */
.theme-switcher {
    display: flex;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 9999px;
    gap: 4px;
    transition: var(--transition);
}

.theme-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 9999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition);
    font-family: var(--font-body);
}

.theme-btn:hover {
    color: var(--text-main);
}

.theme-btn.active {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.theme-dark-cyber .theme-btn.active {
    color: #a855f7; /* Purple active color in Cyber Theme */
    background: rgba(255, 255, 255, 0.08);
}


