/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

body {
    background-color: #f5f7fa;
    padding: 0;
    min-width: 1200px; /* 电脑端最小宽度 */
}

/* 导航栏样式 */
.navbar {
    background-color: #28a745;
    color: #fff;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}
.navbar-container {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.navbar-logo {
    font-size: 20px;
    font-weight: 700;
}
.navbar-menu {
    display: flex;
    gap: 30px;
}
.navbar-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.3s;
}
.navbar-menu a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: #ccc;
    padding: 20px 15px;
    margin-top: 40px;
}
.footer-copyright {
    text-align: center;
    font-size: 12px;
    color: #999;
    line-height: 1.6;
}

/* 容器样式 */
.container {
    width: 98%;
    max-width: 1920px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 30px;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* 标题样式 */
.title-btn-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}
.title-btn-container h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
    padding-left: 10px;
    border-left: 4px solid #28a745;
    font-weight: 700;
}

/* 表单与表格通用样式 */
.table-responsive {
    margin: 20px 0;
}
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.table-bordered {
    border: 1px solid #ddd;
}
.table-bordered td, .table-bordered th {
    border: 1px solid #ddd;
    padding: 12px 15px;
    font-size: 14px;
    color: #333;
}
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}
textarea.form-control {
    resize: vertical;
}

/* 输入组样式 */
.input-group {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
}
.input-group-text {
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    font-size: 14px;
    white-space: nowrap;
}
.input-group .form-control {
    flex: 1;
}

/* 按钮组 */
.btn-group {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: 5px;
}
.btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
}
.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}
.btn-primary {
    background: #28a745;
    color: #fff;
    border-color: #28a745;
}
.btn-primary:hover {
    background: #218838;
}
.btn-outline-primary {
    background: transparent;
    color: #28a745;
    border-color: #28a745;
}
.btn-outline-primary:hover,
.btn-outline-primary.active {
    background: #28a745;
    color: #fff;
}
.btn-outline-primary input {
    display: none;
}

/* 主要按钮 */
.button {
    padding: 10px 30px;
    background: #28a745 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.3s !important;
    margin-left: 10px;
}
.button:hover {
    background: #218838 !important;
}

/* 结果区域 */
#output {
    font-family: monospace;
    font-size: 13px;
    line-height: 1.5;
}

/* 手机端自适应 */
@media only screen and (max-width: 767px) {
    body {
        min-width: unset;
        width: 100%;
        overflow-x: hidden;
    }
    .container {
        width: 100%;
        padding: 15px;
        margin: 10px auto;
        border-radius: 8px;
    }
    .navbar {
        padding: 10px 15px;
    }
    .navbar-container {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .navbar-menu {
        gap: 10px;
        flex-wrap: wrap;
        width: 100%;
    }
    .navbar-menu a {
        font-size: 12px;
    }
    .table-bordered td {
        padding: 10px;
        display: block;
        width: 100%;
    }
    .input-group {
        flex-wrap: wrap;
        gap: 5px;
    }
    .btn-group {
        width: 100%;
        flex-wrap: wrap;
        margin-top: 5px;
    }
    .button {
        width: 100%;
        margin: 5px 0;
    }
    .title-btn-container h2 {
        font-size: 18px;
    }
}