html {
    height: 100%;
}

body {
    min-height: 100%; /* 允许 body 随内容高度撑开 */
    margin: 0;
    padding: 0;
    /* 添加 'fixed' 让渐变背景固定不动，解决滚动后的背景截断问题 */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) fixed;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-container {
    max-width: 1400px;
    flex: 1 0 auto;
    padding-bottom: 10rem; /* 调整为 2rem (约32px)，保持适度的呼吸感，不要太大 */
}

footer {
    flex-shrink: 0;
    background-color: #fff; /* 纯白背景，防止悬浮感 */
    border-top: 1px solid #dee2e6;
    position: relative;
    z-index: 10;
}

[v-cloak] {
    display: none;
}

/* Card Styles from old/index.html */
.main-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* CodeMirror Container Styles from old/index.html */
.cm-editor {
    border: 0;
    border-radius: 0;
    height: 100%; /* Adjusted height */
    display: block;
    font-family: Arial, monospace;
    font-size: 14px;
    background-color: #fff;
    overflow: hidden; /* Ensure container doesn't overflow */
}

/* Tab Styles from old/index.html */
.nav-tabs {
    display: flex;
    width: 100%;
    margin-bottom: 0;
    border-bottom: none;
}

.nav-tabs .nav-item {
    flex: 1;
    text-align: center;
}

.nav-tabs .nav-link {
    width: 100%;
    border-radius: 8px 8px 0 0 !important;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    border-bottom: none;
    color: #495057;
    font-weight: bold;
}

.nav-tabs .nav-link.active {
    background-color: white;
    border-bottom: 1px solid white !important;
    margin-bottom: -1px;
}

/* Specific Tab Colors */
.input-tab .nav-link {
    background-color: #e3f2fd !important;
    color: #495057;
}

.input-tab .nav-link.active {
    background-color: #bbdefb !important;
    border-color: #90caf9 !important;
    color: #0d47a1 !important;
}

.output-tab .nav-link {
    background-color: #e8f5e9 !important;
    color: #495057;
}

.output-tab .nav-link.active {
    background-color: #c8e6c9 !important;
    border-color: #a5d6a7 !important;
    color: #2e7d32 !important;
}

.tab-content {
    border: 0 !important;
    background: #fff;
    display: flex;
    overflow: hidden;
    flex-direction: column;
    height: 518px; /* Or fixed height if needed */
}

/* Intensity Cards */
.intensity-card {
    transition: all 0.2s;
    background-color: #fff;
    border: 1px solid #dee2e6; /* Standard 1px border */
    color: #6c757d;
    position: relative;
    overflow: hidden;
    padding-top: 12px !important; /* Extra padding for the top bar */
}

.intensity-card:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

/* Pseudo-element for the thick top line */
.intensity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    transition: height 0.2s;
}

/* Low Intensity - Green */
.intensity-card.active-low {
    border: 1px solid #2ecc71 !important; /* Back to 1px to prevent layout jump */
    background-color: #e8f8f5 !important;
    color: #2ecc71 !important;
    /* Use inset shadow to simulate 2px border thickness without changing size */
    box-shadow: inset 0 0 0 1px #2ecc71, 0 4px 6px rgba(46, 204, 113, 0.1);
}
.intensity-card.active-low::before {
    height: 5px;
    background-color: #2ecc71;
}
.intensity-card.active-low i {
    color: #2ecc71;
}

/* Medium Intensity - Orange/Yellow */
.intensity-card.active-medium {
    border: 1px solid #f39c12 !important;
    background-color: #fef9e7 !important;
    color: #f39c12 !important;
    box-shadow: inset 0 0 0 1px #f39c12, 0 4px 6px rgba(243, 156, 18, 0.1);
}
.intensity-card.active-medium::before {
    height: 5px;
    background-color: #f39c12;
}
.intensity-card.active-medium i {
    color: #f39c12;
}

/* High Intensity - Red */
.intensity-card.active-high {
    border: 1px solid #e74c3c !important;
    background-color: #fdedec !important;
    color: #e74c3c !important;
    box-shadow: inset 0 0 0 1px #e74c3c, 0 4px 6px rgba(231, 76, 60, 0.1);
}
.intensity-card.active-high::before {
    height: 5px;
    background-color: #e74c3c;
}
.intensity-card.active-high i {
    color: #e74c3c;
}

.intensity-card .x-small {
    font-size: 0.7rem;
    color: #6c757d !important;
}

/* Custom Switches */
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Character Count Badge */
.char-count-badge {
    position: absolute;
    bottom: 10px;
    right: 20px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: #6c757d;
    z-index: 10;
    font-family: Arial, sans-serif;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Clear Code Badge/Button */
.clear-code-badge {
    position: absolute;
    bottom: 45px; /* Above char count */
    right: 20px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: #6c757d;
    z-index: 10;
    font-family: Arial, sans-serif;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.2s;
}

.clear-code-badge:hover {
    background-color: #e9ecef;
    color: #dc3545; /* Red on hover */
    border-color: #dc3545;
}

/* Log Colors */
.text-purple {
    color: #9c27b0;
}
.text-teal {
    color: #009688;
}

/* Utility */
.cursor-pointer {
    cursor: pointer;
}

.x-small {
    font-size: 0.75rem;
}

/* Animation */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Latest Log Highlight (Static, Last Item Only) */
.log-entry-new {
    background-color: rgba(13, 110, 253, 0.1);
    border-left: 3px solid #0d6efd;
    border-radius: 4px;
    padding: 2px 4px;
    font-weight: bold; /* Added bold text */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
