/* Base Theme (Default: Bash / Unix Terminal - SSH Terminal Style) */
.ccb-box {
    --ccb-bg: #000000;
    --ccb-header-bg: #000000;
    --ccb-border: #222222;
    --ccb-header-border: #222222;
    --ccb-text: #ffffff;
    --ccb-title-color: #ffffff;
    --ccb-accent-color: #3fb950;
    --ccb-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --ccb-glow: rgba(63, 185, 80, 0.02);
    --ccb-copy-btn-bg: rgba(255, 255, 255, 0.02);
    --ccb-copy-btn-border: rgba(255, 255, 255, 0.05);
    --ccb-copy-btn-hover-bg: rgba(255, 255, 255, 0.07);
    --ccb-copy-btn-color: #aaaaaa;

    /* Syntax Highlighting - SSH Style (No colorful IDE syntax) */
    --ccb-syntax-prompt: #3fb950;
    /* green prompt */
    --ccb-syntax-string: #ffffff;
    /* white text */
    --ccb-syntax-escape: #ffffff;
    /* white text */
    --ccb-syntax-info: #ffffff;
    /* white text */

    position: relative;
    background: var(--ccb-bg);
    border: 1px solid #111111;
    border-radius: 14px;
    overflow: hidden;
    margin: 24px 0;
    box-shadow: var(--ccb-shadow);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

/* .ccb-box:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: var(--ccb-shadow), 0 0 25px var(--ccb-glow);
} */

/* Theme: PowerShell (Blue Theme) */
.ccb-box.ccb-type-powershell,
.ccb-box.ccb-type-ps {
    --ccb-bg: #0c0c0c;
    --ccb-header-bg: #181818;
    --ccb-border: #2b2b2b;
    --ccb-header-border: #222222;
    --ccb-text: #cccccc;
    --ccb-title-color: #ffffff;
    --ccb-accent-color: #39ff14;
    --ccb-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --ccb-glow: rgba(57, 255, 20, 0.03);
    --ccb-copy-btn-bg: rgba(255, 255, 255, 0.02);
    --ccb-copy-btn-border: rgba(255, 255, 255, 0.05);
    --ccb-copy-btn-hover-bg: rgba(255, 255, 255, 0.07);
    --ccb-copy-btn-color: #aaaaaa;

    --ccb-syntax-prompt: #39ff14;
    --ccb-syntax-string: #ffffff;
    --ccb-syntax-escape: #ffff00;
    --ccb-syntax-info: #00ffff;
}

/* Theme: Windows CMD (Classic Command Prompt Theme) */
.ccb-box.ccb-type-cmd,
.ccb-box.ccb-type-command {
    --ccb-bg: #0c0c0c;
    --ccb-header-bg: #181818;
    --ccb-border: #2b2b2b;
    --ccb-header-border: #222222;
    --ccb-text: #cccccc;
    --ccb-title-color: #ffffff;
    --ccb-accent-color: #39ff14;
    --ccb-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --ccb-glow: rgba(57, 255, 20, 0.03);
    --ccb-copy-btn-bg: rgba(255, 255, 255, 0.02);
    --ccb-copy-btn-border: rgba(255, 255, 255, 0.05);
    --ccb-copy-btn-hover-bg: rgba(255, 255, 255, 0.07);
    --ccb-copy-btn-color: #aaaaaa;

    --ccb-syntax-prompt: #39ff14;
    --ccb-syntax-string: #ffffff;
    --ccb-syntax-escape: #ffff00;
    --ccb-syntax-info: #00ffff;
}

/* Theme: Python (Interactive Terminal Theme) */
.ccb-box.ccb-type-python,
.ccb-box.ccb-type-py {
    --ccb-bg: #1e1e24;
    --ccb-header-bg: #16161c;
    --ccb-border: #2d2d34;
    --ccb-header-border: #25252c;
    --ccb-text: #e3e3e3;
    --ccb-title-color: #ffd43b;
    --ccb-accent-color: #306998;
    --ccb-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    --ccb-glow: rgba(255, 212, 59, 0.03);
    --ccb-copy-btn-bg: rgba(255, 255, 255, 0.04);
    --ccb-copy-btn-border: rgba(255, 255, 255, 0.08);
    --ccb-copy-btn-hover-bg: rgba(255, 255, 255, 0.08);
    --ccb-copy-btn-color: #8b949e;

    --ccb-syntax-prompt: #ffd43b;
    --ccb-syntax-string: #4b8bbe;
    --ccb-syntax-escape: #ffd43b;
    --ccb-syntax-info: #ff79c6;
}

/* Theme: SQL Console */
.ccb-box.ccb-type-sql,
.ccb-box.ccb-type-mysql {
    --ccb-bg: #0f172a;
    --ccb-header-bg: #1e293b;
    --ccb-border: #334155;
    --ccb-header-border: #1e293b;
    --ccb-text: #cbd5e1;
    --ccb-title-color: #38bdf8;
    --ccb-accent-color: #38bdf8;
    --ccb-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --ccb-glow: rgba(56, 189, 248, 0.03);
    --ccb-copy-btn-bg: rgba(255, 255, 255, 0.04);
    --ccb-copy-btn-border: rgba(255, 255, 255, 0.08);
    --ccb-copy-btn-hover-bg: rgba(255, 255, 255, 0.08);
    --ccb-copy-btn-color: #94a3b8;

    --ccb-syntax-prompt: #38bdf8;
    --ccb-syntax-string: #e2e8f0;
    --ccb-syntax-escape: #f43f5e;
    --ccb-syntax-info: #38bdf8;
}

/* Header */
.ccb-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 24px !important;
    border-bottom: 1px solid #0f0f0f !important;
    background: var(--ccb-header-bg) !important;
    user-select: none !important;
}

.ccb-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}

/* Window controls */
.ccb-dots {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
}

.ccb-dot {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    display: inline-block !important;
    opacity: 0.85 !important;
    transition: opacity 0.2s ease !important;
}

.ccb-header:hover .ccb-dot {
    opacity: 1 !important;
}

.ccb-dot-red {
    background-color: #ff5f56 !important;
}

.ccb-dot-yellow {
    background-color: #ffbd2e !important;
}

.ccb-dot-green {
    background-color: #27c93f !important;
}

/* Title styling */
.ccb-title {
    color: var(--ccb-title-color) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    letter-spacing: 0.2px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block !important;
}

/* Copy Button */
.ccb-copy {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid var(--ccb-copy-btn-border) !important;
    background: var(--ccb-copy-btn-bg) !important;
    color: var(--ccb-copy-btn-color) !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    user-select: none !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.ccb-copy-inner {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.ccb-copy-icon,
.ccb-check-icon {
    flex-shrink: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.ccb-check-icon {
    display: none;
    transform: scale(0.5);
    opacity: 0;
    color: #4ade80;
}

.ccb-copy:hover {
    background: var(--ccb-copy-btn-hover-bg);
    color: var(--ccb-title-color);
    border-color: rgba(255, 255, 255, 0.2);
}

.ccb-copy.copied {
    background: rgba(74, 222, 128, 0.1) !important;
    border-color: rgba(74, 222, 128, 0.3) !important;
    color: #4ade80 !important;
}

.ccb-copy.copied .ccb-copy-icon {
    display: none !important;
}

.ccb-copy.copied .ccb-check-icon {
    display: block !important;
    transform: scale(1) !important;
    opacity: 1 !important;
}

/* Code Area */
.ccb-pre {
    margin: 0 !important;
    padding: 22px 24px !important;
    overflow-x: auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.ccb-pre code {
    display: block !important;
    font-family: Menlo, Monaco, Consolas, "Fira Code", "JetBrains Mono", "Courier New", monospace !important;
    font-size: 14.5px !important;
    line-height: 1.75 !important;
    color: var(--ccb-text) !important;
    white-space: pre !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Reset Tailwind prose pseudo-elements for backticks */
.ccb-pre code::before,
.ccb-pre code::after {
    content: "" !important;
    display: none !important;
}

/* Syntax Highlighting */
.ccb-pre .gp {
    color: var(--ccb-syntax-prompt);
    font-weight: 600;
    user-select: none;
}

.ccb-pre .s2 {
    color: var(--ccb-syntax-string);
}

.ccb-pre .se {
    color: var(--ccb-syntax-escape);
}

.ccb-pre .si {
    color: var(--ccb-syntax-info);
}

/* Scrollbar styling */
.ccb-pre::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.ccb-pre::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15);
}

.ccb-pre::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.ccb-pre::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}