:root {
    --primary-color: #125c88;
    --secondary-color: #5a7689;
    --accent-color: #3c8dbc;
    --background-color: #f5f8fa;
    --nav-hover-color: #e3eef7;
    --border-color: #e2e8f0;
}

strong {
    color: var(--secondary-color);
}

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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 0;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.header-title {
    font-size: 1.65rem;
    margin: 0;
    color: white;
    font-weight: 600;
}

.calculator-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
    font-size: 1.6rem;
}
.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.75rem;
    margin: 0;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 260px;
    padding: 0.5rem 0;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--nav-hover-color);
    color: var(--primary-color);
    padding-left: 2rem;
}

.dropdown-toggle .fa-caret-down {
    font-size: 0.8em;
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

.dropdown:hover .fa-caret-down {
    transform: rotate(180deg);
}

.nav-menu {
    display: flex;
    gap: 1rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size:0.95rem;
}

.nav-link i {
    font-size: 0.9em;
}

.nav-link:hover {
    background-color: var(--nav-hover-color);
    color: var(--primary-color);
}

.main-content {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    flex: 1;
}

.main-content h3{
    font-size: 1.3rem;
    color: #2d3748;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.date-unit-group label,
.time-unit-group label {
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date-picker-input {
    padding: 0.8rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
    cursor: pointer;
}

.calculation-section .input-group > label {
    color: #2a4d6d;
    border-left: 3px solid #5a7689;
    margin-bottom: 1.2rem;
}

.date-picker-input:hover {
    border-color: var(--accent-color);
}

.date-input-group {
    display: flex;
    gap: 1rem;
    max-width: 600px;
}

.date-input {
    width: 100px;
    text-align: center;
}

.date-picker-btn {
    order: 2;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.8rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
}

.date-picker-btn:hover {
    background-color: #2b6a8b;
}

.calculator {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}

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

.input-group > label {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 0.5rem;
    border-left: 3px solid var(--accent-color);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-weight: 600;
}

input, select {
    padding: 0.8rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.time-unit-input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    text-align: center;
}

.operation-group {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
    justify-content: center;
}

.operation-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid var(--accent-color);
    background: white;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

button[type="button"] {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    width: auto;
    display: inline-flex;
    justify-content: center;
    transition: all 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

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

.operation-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent-color);
}

button {
    background-color: var(--accent-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: auto;
    font-size: 0.9rem;
    justify-content: center;
}

button:hover {
    background-color: #2b6a8b;
}

.result {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--background-color);
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
}

.result-item {
    margin: 1rem 0;
    font-size: 1.1rem;
}

.highlight {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.2rem;
}

.footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto;
}

.info-sections {
    margin-top: 1.5rem;
}

.info-sections code {
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 0.95em;
    font-weight: 500;

    background-color: #f5f7fa;
    color: #e53935;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e0e6ed;

    white-space: nowrap;
    box-sizing: border-box;
}

.info-sections pre {
    margin: 16px 0;
    padding: 0;
    overflow-x: auto;
    border-radius: 6px;
    background-color: #f8f9fa;
}

.info-sections pre code {
    display: block;
    padding: 16px;
    background-color: transparent;
    border: none;
    color: #2d3748;
    white-space: pre;
    line-height: 1.6;
}

.info-section {
    background: white;
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.info-section h2 {
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.info-section ul,
.info-section ol {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.info-section li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.use-cases {
    display: grid;
    gap: 1.5rem;
}

.use-case {
    background: var(--background-color);
    padding: 1.2rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
}

.use-case h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.article-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid #eaeff5;
}

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

.article-list-title {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.article-meta i {
    margin-right: 0.3rem;
}

.article-excerpt {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.read-more:hover {
    gap: 1rem;
    color: #2b6a8b;
}

.pagination {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.page-item {
    list-style: none;
}

.page-link {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--accent-color);
    border-radius: 6px;
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.page-link:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.page-link.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.page-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.page-link-arrow {
    padding: 0.75rem;
}

.article-header {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}

.article-title {
    color: var(--primary-color);
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.article-meta {
    display: flex;
    gap: 2rem;
    color: var(--secondary-color);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eaeff5;
}

.article-meta i {
    margin-right: 0.5rem;
}

.article-body {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}

.article-body h2 {
    color: var(--primary-color);
    margin: 1rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
    font-size: 1.6rem;
}

.article-body h3 {
    color: var(--secondary-color);
    margin: 1.5rem 0 1rem;
    font-size: 1.4rem;
}

.article-body p {
    margin: 1rem 0;
    line-height: 1.7;
    color: #4a5568;
}

.article-body ul,
.article-body ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-body li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.code-block {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    font-family: 'Courier New', Courier, monospace;
    position: relative;
}

.code-block::before {
    content: 'Code Example';
    position: absolute;
    top: -12px;
    left: 15px;
    background: white;
    padding: 0 8px;
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 600;
}

.back-to-articles {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: all 0.2s ease;
}

.back-to-articles:hover {
    gap: 1rem;
    color: #2b6a8b;
}

.code-block-container {
    position: relative;
    margin: 1em 0;
}


.copy-success {
    position: absolute;
    top: 40px;
    right: 8px;
    font-size: 0.9em;
    color: #4CAF50;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: rgba(0, 0, 0, 0.8);
    padding: 4px 8px;
    border-radius: 3px;
}

pre {
    position: relative;
    padding: 1.5em 1em !important;
    background: #f8f8f8 !important;
    color: #333 !important;
    border-radius: 6px;
    overflow-x: auto;
}

pre code {
    font-family: 'Fira Code', Consolas, monospace !important;
    font-size: 0.9em;
    line-height: 1.5;
}
.footer-links a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 5px;
}

.footer-links a:hover {
    text-decoration: underline;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 3px solid var(--accent-color);
}

table td {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    color: #4a5568;
}

table tr:last-child td {
    border-bottom: 0;
}

table tr:nth-child(even) {
    background-color: rgba(242, 245, 249, 0.4);
}

table tr:hover {
    background-color: rgba(42, 77, 109, 0.05);
}

.tool-switcher {
    margin-bottom: 1.5rem;
}

.tool-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 1rem;
}

.tool-tab {
    padding: 0.5rem 1rem;
    background: #f0f0f0;
    border-radius: 4px;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.tool-tab:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.tool-tab.active {
    background: var(--accent-color);
    color: white;
    font-weight: 500;
}

.responsive-feature-img {
    display: block;
    margin: 1.5rem auto;
    width: 60%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.subtitle {
    font-size: 0.8em;
}

.presets-section {
    margin-top:0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

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

.presets-links {
    flex: 1;
}

.presets-section a {
    color: var(--accent-color);
    text-decoration: none;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.presets-section a:hover {
    background-color: rgba(60, 141, 188, 0.1);
    color: var(--primary-color);
}

.action-buttons-inline {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.action-btn-small i {
    font-size: 0.85em;
}

.remove-btn {
    flex: none !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    white-space: nowrap;
    width: auto !important;
}

.action-btn-small {
    padding: 8px 12px !important;
    font-size: 13px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    color: white;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.demo-btn  { background-color: #6c757d; }
.sort-btn  { background-color: #4ea8db; }
.copy-btn  { background-color: #3da890; }
.clear-btn { background-color: #e0866b; }

.demo-btn:hover  { background-color: #5a6268; }
.sort-btn:hover  { background-color: #3d8fc2; }
.copy-btn:hover  { background-color: #318c79; }
.clear-btn:hover { background-color: #cc765e; }


.panels-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.textarea-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
}

.output-area {
    background: #f5f8fa;
    color: #374151;
    cursor: default;
}

.text-stats {
    display: flex;
    gap: 20px;
    font-size: 0.82rem;
    color: var(--secondary-color);
    margin-top: 6px;
    flex-wrap: wrap;
}

.text-stats strong {
    color: var(--accent-color);
    font-weight: 700;
}

.config-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.config-options {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: flex-start;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 170px;
}

.checkbox-label label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2d3748;
    font-weight: 500;
    margin-bottom: 0;
}

.help-text {
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.4;
    padding-left: 24px;
}

.config-item-actions {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
}

.code-textarea {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: #fafcff;
    color: #2d3748;
    line-height: 1.6;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.25s ease;
}

.code-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: #fff;
}

.code-textarea::placeholder {
    color: #999;
    font-style: italic;
}

.assumptions {
    font-size: 0.85rem;
    color: var(--secondary-color);
    background: #eef4fb;
    border-left: 3px solid var(--accent-color);
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    line-height: 1.5;
}

.config-section {
    background: var(--background-color);
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
}

.checkbox-label {
    display: flex;
    align-items: center;
}

.checkbox-label label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-color);
    cursor: pointer;
    padding: 0;
    border: none;
    border-radius: 3px;
    flex-shrink: 0;
}

.remove-btn {
    background-color: var(--accent-color);
    color: white;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: auto;
    width: 100%;
}

.remove-btn:hover {
    background-color: #2b6a8b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .info-sections pre code {
        padding: 12px;
        font-size: 0.9em;
    }
    .panels-wrapper {
        grid-template-columns: 1fr;
    }

    .config-item-actions {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .header {
        padding: 0.6rem 0;
    }
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    .calculator-title {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .dropdown-menu {
        position: absolute;
        background: white;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        left: -10px;
        width: calc(100% + 20px);
        padding: 0;
        display: none;
    }

    .dropdown-item {
        color: var(--primary-color);
        padding: 0.75rem 1.5rem;
        background: white;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-toggle .fa-caret-down {
        position: static;
        margin-left: 0.5rem;
    }

    .nav-menu {
        width: 100%;
        justify-content: space-between;
    }

    .dropdown-item:hover {
        background-color: var(--nav-hover-color);
        padding-left: 1.5rem;
    }

    .header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .nav-link {
        padding: 0.3rem 0.6rem;
        font-size: 0.85rem;
    }

    .date-input-group {
        flex-wrap: wrap;
        gap: 0.5rem;
        overflow-x: visible;
    }

    .date-unit-group {
        flex: 1 1 30%;
        min-width: 110px;
        margin-bottom: 0.5rem;
    }

    .date-unit-group label {
        white-space: normal;
        line-height: 1.3;
        text-align: center;
        margin-top: 0.3rem;
        font-size: 0.8rem;
    }

    .date-input {
        width: 100% !important;
        padding: 0.8rem 0.5rem;
        font-size: 0.95rem;
        min-height: 48px;
    }

    .date-picker-btn {
        order: 3;
        width: 100%;
        margin: 0.5rem 0;
        flex-shrink: 0;
    }

    .flatpickr-calendar {
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%);
        width: 90% !important;
        max-width: 320px !important;
        z-index: 99999 !important;
    }

    .flatpickr-time {
        padding: 5px !important;
    }

    .flatpickr-time input {
        font-size: 16px !important;
    }

    .result {
        padding: 1rem;
        margin-top: 1.5rem;
    }

    .result-item {
        font-size: 1rem;
    }

    .operation-group {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .operation-btn {
        flex: 1 1 45%;
        padding: 0.6rem;
    }

    button[type="button"] {
        width: 100%;
        padding: 0.8rem;
    }

    .input-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .input-group > label {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .time-unit-group label {
        font-size: 0.8rem;
    }

    .info-section {
        padding: 1.5rem;
    }

    .use-cases {
        grid-template-columns: 1fr;
    }

    .article-list {
        padding: 1.5rem;
    }

    .article-title {
        font-size: 1.2rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.85rem;
    }

    .article-excerpt {
        -webkit-line-clamp: 3;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .page-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .page-link-arrow span {
        display: none;
    }

    .page-link-arrow i {
        margin: 0;
    }

    .main-content {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        padding: 0 15px;
        overflow-x: hidden;
    }

    .article-body {
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        padding: 20px 15px !important;
    }

    .article-header,
    .article-body {
        padding: 1.5rem;
    }

    .article-title {
        font-size: 1.8rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 1rem;
        font-size: 0.9rem;
    }

    .code-block {
        padding: 1rem;
        overflow-x: auto;
    }

    .article-body h2 {
        font-size: 1.5rem;
    }

    .article-body h3 {
        font-size: 1.2rem;
    }

    .article-body pre {
        max-width: 100%;
        margin: 1rem 0 !important;
        padding: 1rem !important;
        border-radius: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        background: #f8f8f8 !important;
    }
    pre code {
        display: inline-block;
        min-width: 100%;
        box-sizing: border-box;
        padding-right: 1em !important;
    }
    table {
        width: 100vw;
        margin-left: -15px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    ul, ol {
        padding-left: 1.2rem;
        margin-left: 0;
    }

    code:not(pre code) {
        word-break: break-word;
        white-space: pre-wrap;
    }
    .article-body {
        width: 100%;
        left: auto;
        right: auto;
        margin-left: 0;
        margin-right: 0;
        padding: 15px !important;
    }

    .footer p {
        text-align: center;
        line-height: 1.5;
    }

    .footer-links {
        display: block;
        margin-top: 8px;
    }

    .footer-links a {
        display: block;
        margin: 5px 0;
    }
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

    table th,
    table td {
        min-width: 120px;
        font-size: 0.9em;
        padding: 0.8rem;
    }

    .tool-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 5px;
    }

    .tool-tab {
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .subtitle {
        display: none;
    }
}

@media (max-width: 600px) {
    .footer p {
        text-align: center;
        line-height: 1.5;
    }

    .footer-links {
        display: block;
        margin-top: 8px;
    }

    .footer-links a {
        display: block;
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    .remove-btn {
        width: 100% !important;
    }

    .text-stats {
        gap: 12px;
    }
    .article-body pre {
        font-size: 12px;
        line-height: 1.3;
        border-radius: 4px;
    }

    pre code {
        white-space: pre-wrap;
        word-wrap: break-word;
    }
}

@media (max-width: 768px) {
    .responsive-feature-img {
        width: 100%;
        margin: 1rem auto;
    }
}

/* alert */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-left: 4px solid var(--accent-color);
    animation: slideIn 0.3s ease forwards, fadeOut 0.3s ease forwards;
    animation-delay: 0s, calc(var(--auto-close-delay) - 0.3s);
    max-width: 380px;
    width: 100%;
}

.alert-toast.success {
    border-left-color: #28a745;
}

.alert-toast.error {
    border-left-color: #dc3545;
}

.alert-toast.warning {
    border-left-color: #ffc107;
}

.alert-toast.info {
    border-left-color: var(--accent-color);
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-toast.success .alert-icon {
    color: #28a745;
}

.alert-toast.error .alert-icon {
    color: #dc3545;
}

.alert-toast.warning .alert-icon {
    color: #ffc107;
}

.alert-toast.info .alert-icon {
    color: var(--accent-color);
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.alert-message {
    color: var(--secondary-color);
    font-size: 0.85rem;
    line-height: 1.4;
}

.alert-close {
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    width: auto;
    height: auto;
}

.alert-close:hover {
    background: var(--nav-hover-color);
    color: var(--primary-color);
    transform: none;
    box-shadow: none;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@media (max-width: 768px) {
    .alert-container {
        top: 15px;
        right: 15px;
        left: 15px;
    }

    .alert-toast {
        max-width: 100%;
        padding: 0.8rem 1rem;
    }
}

@media (min-width: 769px) {
    .config-item-actions {
        gap: 12px !important;
    }

    .config-item-actions .remove-btn {
        padding: 8px 18px !important;
        font-size: 15px !important;
        min-height: 38px;
    }

    .config-item-actions .action-btn-small {
        padding: 8px 14px !important;
        font-size: 14px !important;
        min-height: 34px;
    }
}

@media (max-width: 768px) {
    .config-item-actions {
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: flex-start;
    }

    .config-item-actions .remove-btn,
    .config-item-actions .action-btn-small {
        width: calc(50% - 4px) !important;
        box-sizing: border-box;
        flex-shrink: 0;
        margin: 0 !important;
    }
}

@media (max-width: 480px) {
    .config-item-actions .remove-btn,
    .config-item-actions .action-btn-small {
        width: calc(50% - 4px) !important;
    }
}