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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #2c2d50;
    color: #ecf0f1;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.sidebar-animations-enabled .sidebar {
    transition: transform 0.3s ease;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 20px;
    background-color: #34345e;
    border-bottom: 1px solid #1a252f;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
}

/* Navigation Group Styles */
.nav-group {
    margin-bottom: 8px;
}

.nav-group-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    background-color: #34345e;
    transition: background-color 0.2s ease;
    user-select: none;
    border-bottom: 1px solid #2c3e50;
}

.nav-group-header {
    transition: transform 0.2s ease;
}

.nav-group-header:hover {
    transform: scale(1.02);
}

.nav-group-icon {
    margin-right: 8px;
    font-size: 12px;
    color: #bdc3c7;
    transition: transform 0.2s ease;
    width: 12px;
    display: inline-block;
}

.nav-group.expanded .nav-group-icon {
    transform: rotate(90deg);
}

.nav-group-title {
    font-weight: 600;
    color: #ecf0f1;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-group-active-indicator {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-group.has-active-utility .nav-group-active-indicator {
    opacity: .5;
}

.nav-group-items {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-group.expanded .nav-group-items {
    max-height: 500px;
}

.nav-link {
    display: block;
    padding: 15px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: background-color 0.3s ease;
    border-left: 10px solid transparent;
}

.nav-link {
    transition: transform 0.2s ease;
}

.nav-link:hover {
    transform: scale(1.02);
}

.nav-link.active {
    background-color: #3e3e6a;
    border-left: 4px solid transparent;
    border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) 1;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-animations-enabled .main-content {
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .main-content {
    margin-left: -250px;
}

.content-header {
    padding: 20px 30px;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    z-index: 5;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.content-header h1 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin: 0;
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    position: relative;
    z-index: 10;
    gap: 4px;
}

.sidebar-toggle-btn {
    transition: transform 0.2s ease;
}

.sidebar-toggle-btn:hover {
    transform: scale(1.05);
}

.sidebar-toggle-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.25);
}

.hamburger {
    width: 20px;
    height: 2px;
    background-color: #2c3e50;
    border-radius: 1px;
}

.sidebar-animations-enabled .hamburger {
    transition: all 0.3s ease;
}

/* Hamburger animation when sidebar is collapsed */
.sidebar-collapsed .sidebar-toggle-btn .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(2px, 6px);
}

.sidebar-collapsed .sidebar-toggle-btn .hamburger:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.sidebar-collapsed .sidebar-toggle-btn .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(2px, -6px);
}

.utility-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background-color: #f8f9fa;
}

.utility-content p {
    color: #6c757d;
    font-size: 1.1rem;
}

.utility-container {
    width: 100%;
    margin: 0;
}

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

.input-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.input-section textarea,
.input-section input[type="text"],
.input-section select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
    background-color: #fff;
}

.input-section textarea:focus,
.input-section input[type="text"]:focus,
.input-section select:focus {
    outline: none;
    border: 1px solid transparent;
    background: linear-gradient(white, white) padding-box,
               linear-gradient(135deg, #667eea 0%, #764ba2 100%) border-box;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Custom select styling */
.input-section select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.input-section textarea:hover,
.input-section input[type="text"]:hover,
.input-section select:hover {
    border: 1px solid transparent;
    background: linear-gradient(white, white) padding-box,
               linear-gradient(135deg, #667eea 0%, #764ba2 100%) border-box;
    transform: scale(1.02);
}

.input-section select:focus {
    background-color: #fff;
}

/* Firefox specific styling */
.input-section select::-moz-focus-inner {
    border: 0;
}

/* IE/Edge specific styling */
.input-section select::-ms-expand {
    display: none;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary {
    transition: transform 0.2s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary {
    transition: transform 0.2s ease;
}

.btn-secondary:hover {
    transform: scale(1.05);
}

.btn-secondary:active {
    transform: scale(0.95);
}

.button-group {
    margin: 20px 0;
}

.output-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.output-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.output-section textarea,
.output-section pre {
    width: 100%;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    min-height: 100px;
}

/* Specific styling for non-Monaco divs in output section */
.output-section > div:not(.monaco-editor-wrapper) {
    width: 100%;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    min-height: 100px;
}

/* Override the above styles for Monaco editor wrappers */
.output-section > .monaco-editor-wrapper {
    width: 100%;
    padding: 0;
    background-color: transparent;
    font-family: inherit;
    font-size: inherit;
    min-height: auto;
}

.output-section pre {
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

#output-result,
#regex-results {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    font-family: inherit;
}

#regex-results ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

#regex-results li {
    margin: 5px 0;
    color: #2c3e50;
}

/* Tooltip Styles */
.tooltip {
    position: absolute;
    background-color: #2c3e50;
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-width: 300px;
    min-width: 200px;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

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

.tooltip::after {
    content: '';
    position: absolute;
    border: 8px solid transparent;
}

.tooltip.position-bottom::after {
    top: 100%;
    left: 20px;
    border-top: 8px solid #2c3e50;
}

.tooltip.position-top::after {
    bottom: 100%;
    left: 20px;
    border-bottom: 8px solid #2c3e50;
}

.tooltip.position-right::after {
    top: var(--arrow-top, 20px);
    right: 100%;
    border-right: 8px solid #2c3e50;
}

.tooltip.position-left::after {
    top: var(--arrow-top, 20px);
    left: 100%;
    border-left: 8px solid #2c3e50;
}

.tooltip-title {
    font-weight: 600;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.tooltip-example {
    font-family: 'Courier New', monospace;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 4px 6px;
    border-radius: 3px;
    margin-top: 4px;
    font-size: 12px;
}

.hoverable {
    cursor: help;
    position: relative;
}

.hoverable code {
    background-color: rgba(52, 152, 219, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    cursor: help;
}

.hoverable {
    transition: transform 0.2s ease;
}

.hoverable:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
        position: absolute;
        z-index: 1000;
        height: 100vh;
    }
    
    .sidebar:not(.collapsed) {
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    }
    
    .main-content {
        width: 100%;
    }
    
    .content-header {
        padding: 15px 20px;
    }
    
    .utility-content {
        padding: 20px;
    }
    
    .tooltip {
        max-width: 250px;
        min-width: 180px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .header-content {
        gap: 10px;
    }
    
    .content-header h1 {
        font-size: 1.4rem;
    }
    
    .sidebar-toggle-btn {
        width: 28px;
        height: 22px;
    }
    
    .hamburger {
        width: 18px;
    }
}

/* Code Comparison Styles */
.comparison-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.comparison-input {
    min-width: 0;
}

.comparison-results {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 15px;
    min-height: 400px;
    overflow-x: auto;
    white-space: pre-wrap;
}

.diff-line {
    padding: 2px 8px;
    margin: 1px 0;
    border-radius: 2px;
}

.diff-added {
    background-color: #d4edda;
    border-left: 3px solid #28a745;
}

.diff-removed {
    background-color: #f8d7da;
    border-left: 3px solid #dc3545;
}

.diff-unchanged {
    background-color: #f8f9fa;
    color: #6c757d;
}

.diff-line-number {
    display: inline-block;
    width: 60px;
    color: #6c757d;
    font-size: 11px;
    text-align: right;
    padding-right: 10px;
    border-right: 1px solid #e9ecef;
    margin-right: 10px;
}

.diff-content {
    display: inline-block;
}

.diff-header {
    font-weight: 600;
    color: #495057;
    margin: 15px 0 10px 0;
    padding: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .comparison-layout {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* CSS String Detection Styles */
.css-string {
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 3px;
    padding: 1px 3px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease;
}

.css-string {
    transition: transform 0.2s ease;
}

.css-string:hover {
    transform: scale(1.02);
}

.format-css-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    top: -2px;
}

.format-css-btn:hover {
    transform: scale(1.05);
}

.format-css-btn:active {
    transform: scale(0.95);
}

.css-formatting-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.css-formatting-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 80%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.css-formatting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.css-formatting-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close-modal-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
}

.close-modal-btn {
    transition: transform 0.2s ease;
}

.close-modal-btn:hover {
    transform: scale(1.05);
}

.close-modal-btn:active {
    transform: scale(0.95);
}

.css-formatting-body {
    display: flex;
    gap: 15px;
    flex: 1;
    min-height: 0;
}

.css-input-section,
.css-output-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.css-input-section textarea,
.css-output-section pre {
    flex: 1;
    min-height: 300px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 10px;
}

.css-output-section pre {
    background-color: #f8f9fa;
    overflow: auto;
    white-space: pre-wrap;
}

.css-formatting-actions {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.css-formatting-actions .btn {
    margin: 0;
}

/* Monaco Editor Styles */
#monaco-editor-container {
    height: 400px !important;
    width: 100% !important;
    border: 1px solid #ced4da;
    border-radius: 4px;
    overflow: hidden;
    font-family: 'Courier New', monospace;
}

/* Ensure Monaco Editor takes full dimensions */
.monaco-editor {
    height: 100% !important;
    width: 100% !important;
}

.monaco-editor .overflow-guard {
    border-radius: 4px;
}

/* Fix Monaco Editor loader issues */
.monaco-editor .monaco-scrollable-element > .scrollbar > .slider {
    background: rgba(121, 121, 121, 0.4);
}

.monaco-editor .monaco-scrollable-element > .scrollbar > .slider:hover {
    background: rgba(100, 100, 100, 0.7);
}

/* Diff highlighting styles for Monaco Editor */
.diff-line-added {
    background-color: rgba(40, 167, 69, 0.15) !important;
}

.diff-line-removed {
    background-color: rgba(220, 53, 69, 0.15) !important;
}

.diff-line-modified {
    background-color: rgba(255, 193, 7, 0.15) !important;
}

.diff-gutter-added {
    background-color: #28a745;
    width: 4px !important;
}

.diff-gutter-removed {
    background-color: #dc3545;
    width: 4px !important;
}

.diff-gutter-modified {
    background-color: #ffc107;
    width: 4px !important;
}

/* Phantom spacer styles for line alignment */
.phantom-spacer {
    display: block !important;
    width: 100% !important;
    height: 1.2em !important;
    margin-top: 1.2em !important;
    background-color: rgba(128, 128, 128, 0.05) !important;
    border-left: 2px solid rgba(128, 128, 128, 0.2) !important;
    position: relative !important;
}

.phantom-spacer::before {
    content: '⋯' !important;
    color: rgba(128, 128, 128, 0.4) !important;
    font-size: 12px !important;
    position: absolute !important;
    left: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.phantom-phantom-added {
    background-color: rgba(40, 167, 69, 0.05) !important;
    border-left-color: rgba(40, 167, 69, 0.3) !important;
}

.phantom-phantom-removed {
    background-color: rgba(220, 53, 69, 0.05) !important;
    border-left-color: rgba(220, 53, 69, 0.3) !important;
}

.phantom-phantom-modified {
    background-color: rgba(255, 193, 7, 0.05) !important;
    border-left-color: rgba(255, 193, 7, 0.3) !important;
}

/* Chat Interface Styles */
.chat-icon-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
}

.chat-icon-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.chat-icon-button:active {
    transform: scale(0.95);
}

.chat-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    border: 2px solid white;
}

.chat-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 600px;
    height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 999;
    animation: slideUp 0.3s ease;
}

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

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-title {
    font-weight: 600;
    font-size: 16px;
}

.chat-status {
    font-size: 12px;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
}

.chat-close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.chat-close-btn {
    transition: transform 0.2s ease;
}

.chat-close-btn:hover {
    transform: scale(1.05);
}

.chat-close-btn:active {
    transform: scale(0.95);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f9fafb;
}

.chat-message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

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

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-message.assistant .message-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.chat-message.user .message-avatar {
    background: #e5e7eb;
    color: #6b7280;
}

.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.chat-message.assistant .message-content {
    background: white;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}

.chat-message.user .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-content p {
    margin: 0;
    color: inherit;
}

.message-content pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 8px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 8px 0;
}

.message-content code {
    background: rgba(107, 114, 128, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.chat-input-container {
    padding: 16px;
    background: white;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 12px 12px;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    resize: none;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    max-height: 120px;
    transition: border-color 0.2s ease;
}

.chat-input:focus {
    border-color: #667eea;
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-send-btn:hover {
    transform: scale(1.05);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

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

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9ca3af;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .chat-window {
        width: calc(100vw - 24px);
        right: 12px;
        bottom: 80px;
        height: calc(100vh - 100px);
        max-height: 600px;
    }
    
    .chat-icon-button {
        right: 16px;
        bottom: 16px;
        width: 48px;
        height: 48px;
    }
}

/* Custom Smart CSS Diff Decorations */
.custom-diff-added {
    background-color: rgba(40, 167, 69, 0.15) !important;
    border-left: 3px solid #28a745 !important;
}

.custom-diff-removed {
    background-color: rgba(220, 53, 69, 0.15) !important;
    border-left: 3px solid #dc3545 !important;
}

.custom-diff-modified {
    background-color: rgba(255, 193, 7, 0.15) !important;
    border-left: 3px solid #ffc107 !important;
}

.custom-diff-added-gutter {
    background-color: #28a745 !important;
    width: 4px !important;
}

.custom-diff-removed-gutter {
    background-color: #dc3545 !important;
    width: 4px !important;
}

.custom-diff-modified-gutter {
    background-color: #ffc107 !important;
    width: 4px !important;
}

/* Smart CSS current line highlight */
.smart-css-current-line {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border: 2px solid #ffc107 !important;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.5) !important;
    position: relative;
}

.smart-css-current-line::before {
    content: '▶';
    position: absolute;
    left: -20px;
    color: #ffc107;
    font-weight: bold;
    font-size: 14px;
}

.smart-css-current-line-gutter {
    background-color: #ffc107 !important;
    width: 8px !important;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.8) !important;
}

/* Current diff navigation line highlighting */
.monaco-diff-editor .current-diff-line {
    background-color: rgba(0, 123, 255, 0.08) !important;
    border-left: 3px solid #007bff !important;
}

/* Glyph margin decoration - works even without line numbers */
.monaco-editor .glyph-margin .current-diff-glyph {
    background: #007bff !important;
    border-radius: 2px;
    width: 14px !important;
    height: 19px !important;
    left: 2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.monaco-editor .glyph-margin .current-diff-glyph::before {
    content: '▶';
    color: white;
    font-weight: bold;
    font-size: 10px;
}

/* Margin decoration - the line number area */
.monaco-editor .margin .current-diff-margin,
.monaco-editor .margin-view-overlays .current-diff-margin {
    background: #007bff !important;
}

/* Style line numbers when they have the current-diff-margin class */
.monaco-editor .margin .current-diff-margin .line-numbers {
    background: #007bff !important;
    color: white !important;
    font-weight: bold !important;
    padding: 0 4px !important;
}

/* Blank Line Placeholder Styles */
/* Whole line decoration for blank lines - covers the entire line content area */
.monaco-editor .blank-line-placeholder-whole-line {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(108, 117, 125, 0.08) 15%, 
        rgba(108, 117, 125, 0.08) 85%, 
        transparent 100%) !important;
    border-top: 1px dotted rgba(108, 117, 125, 0.2) !important;
    border-bottom: 1px dotted rgba(108, 117, 125, 0.2) !important;
    position: relative !important;
}

/* Add a visual placeholder in the center of blank lines */
.monaco-editor .blank-line-placeholder-whole-line::before {
    content: '· · ·';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: rgba(108, 117, 125, 0.4);
    font-size: 11px;
    font-weight: normal;
    letter-spacing: 4px;
    pointer-events: none;
    z-index: 1;
}

/* Margin decoration for blank lines - affects the line number/margin area */
.monaco-editor .margin .blank-line-placeholder-margin,
.monaco-editor .margin-view-overlays .blank-line-placeholder-margin {
    background: rgba(108, 117, 125, 0.1) !important;
    border-right: 2px solid rgba(108, 117, 125, 0.3) !important;
}

/* Hover effects for blank line placeholders */
.monaco-editor .blank-line-placeholder-whole-line:hover {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(108, 117, 125, 0.12) 15%, 
        rgba(108, 117, 125, 0.12) 85%, 
        transparent 100%) !important;
    border-color: rgba(108, 117, 125, 0.4) !important;
}

.monaco-editor .blank-line-placeholder-whole-line:hover::before {
    color: rgba(108, 117, 125, 0.6);
}

/* Make sure the placeholder doesn't interfere with diff highlighting */
.monaco-diff-editor .blank-line-placeholder-whole-line {
    z-index: 1 !important;
}

.monaco-diff-editor .diff-line-added .blank-line-placeholder-whole-line,
.monaco-diff-editor .diff-line-removed .blank-line-placeholder-whole-line,
.monaco-diff-editor .diff-line-modified .blank-line-placeholder-whole-line {
    background: rgba(108, 117, 125, 0.05) !important;
}