/* ============================================================
   多多兔 · 计算器页面统一样式
   适用：计算器大全、代数计算器、平面向量角度计算器等
   ============================================================ */

/* ============================================================
   一、全局布局
   ============================================================ */

/* ----- 页面容器 ----- */
.wrapper {
    margin: 0 auto;
}

.cont {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ----- 左右列 ----- */
.col_left {
    flex: 1 1 65%;
    min-width: 280px;
}

.col_right {
    display: none;
    flex: 1 1 30%;
    min-width: 240px;
}

/* ============================================================
   二、主卡片容器
   ============================================================ */

/* ----- 主卡片（向量角度计算器） ----- */
/*.main {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 60px 60px 50px 50px;
    padding: 2.5rem 2.8rem;
    box-shadow: 0 20px 40px -8px rgba(66, 165, 245, 0.2), 0 8px 0 0 #42a5f5, 0 0 0 3px rgba(179, 229, 252, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 2.5rem;
    backdrop-filter: blur(2px);
}*/

/* ----- 功能模块卡片（通用） ----- */
.fn_part,
.mod_box_t2 {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 40px 40px 35px 35px;
    padding: 1.8rem 2rem 2rem;
    box-shadow: 0 20px 40px -8px rgba(66, 165, 245, 0.15), 0 6px 0 0 #42a5f5, 0 0 0 3px rgba(179, 229, 252, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.6);
    margin-bottom: 2rem;
    transition: all 0.25s ease;
    position: relative;
}

.fn_part:hover,
.mod_box_t2:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 48px -12px rgba(66, 165, 245, 0.25), 0 6px 0 0 #1e88e5, 0 0 0 4px rgba(66, 165, 245, 0.15);
}

/* ----- 卡片头部 ----- */
.fn_part .hd,
.mod_box_t2 .hd {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 1.2rem;
    border-bottom: 2px dashed rgba(66, 165, 245, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fn_part .hd h2,
.mod_box_t2 .hd h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0d2b3e;
    margin: 0;
}

.fn_part .hd h2 i {
    color: #42a5f5;
    margin-right: 10px;
}

/* ----- 卡片头部图标（mod_box_t2 专用） ----- */
.mod_box_t2 .hd h3:before {
    content: "🔹 ";
    font-size: 1.2rem;
    color: #42a5f5;
}

.mod_box_t2:nth-child(1) .hd h3:before { content: "🧮 "; }
.mod_box_t2:nth-child(2) .hd h3:before { content: "📊 "; }
.mod_box_t2:nth-child(3) .hd h3:before { content: "🔢 "; }
.mod_box_t2:nth-child(4) .hd h3:before { content: "📐 "; }
.mod_box_t2:nth-child(5) .hd h3:before { content: "🧊 "; }
.mod_box_t2:nth-child(6) .hd h3:before { content: "📈 "; }
.mod_box_t2:nth-child(7) .hd h3:before { content: "🛠️ "; }

/* ============================================================
   三、导航菜单
   ============================================================ */

.menu_xy {
    display: none;
    margin-bottom: 2rem;
}

.menu_xy_inner {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 60px;
    border: 2px solid rgba(66, 165, 245, 0.15);
    padding: 0.5rem 1.2rem;
    box-shadow: 0 4px 16px rgba(66, 165, 245, 0.08);
    backdrop-filter: blur(2px);
    overflow-x: auto;
}

.menu_xy_inner ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.menu_xy_inner ul li {
    display: inline-block;
}

.menu_xy_inner ul li a {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.8rem;
    color: #1e88e5;
    text-decoration: none;
    background: rgba(66, 165, 245, 0.08);
    border: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.menu_xy_inner ul li a:hover {
    background: rgba(66, 165, 245, 0.15);
    border-color: rgba(66, 165, 245, 0.3);
    transform: translateY(-1px);
}

.menu_xy_inner ul li a.current {
    background: #42a5f5;
    color: white;
    border-color: #1e88e5;
    box-shadow: 0 3px 0 #1e88e5;
}

/* ============================================================
   四、工具列表（统一）
   ============================================================ */

.mod_txt {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.4rem 0.8rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.mod_txt li {
    padding: 0.2rem 0;
    border-bottom: 1px solid rgba(66, 165, 245, 0.06);
    transition: all 0.15s ease;
}

.mod_txt li:last-child {
    border-bottom: none;
}

.mod_txt li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e88e5;
    text-decoration: none;
    transition: all 0.2s ease;
    background: rgba(66, 165, 245, 0.03);
}

.mod_txt li a:hover {
    background: rgba(66, 165, 245, 0.1);
    color: #0d2b3e;
    transform: translateX(4px);
}

.mod_txt li a:active {
    transform: scale(0.97);
}

.mod_txt li a::before {
    content: "▸";
    color: #42a5f5;
    font-weight: 700;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* ----- 特殊链接（更多计算器） ----- */
.mod_txt li a[href*="index.html"] {
    background: rgba(66, 165, 245, 0.06);
    border: 1px dashed rgba(66, 165, 245, 0.2);
    justify-content: center;
    font-weight: 700;
    color: #1e88e5;
}

.mod_txt li a[href*="index.html"]:hover {
    background: rgba(66, 165, 245, 0.12);
    border-color: #42a5f5;
    transform: translateX(0) scale(1.02);
}

.mod_txt li a[href*="index.html"]::before {
    content: "🚀 ";
    opacity: 1;
}

.mod_txt li a font[color="#FD5151"] {
    color: #ef5350 !important;
    font-weight: 700;
}

/* ============================================================
   五、计算器表单
   ============================================================ */

.mathmod_form {
    padding: 0.5rem 0;
}

.mathmod_form table {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    border-collapse: collapse;
}

.mathmod_form table td {
    padding: 0.6rem 0.4rem;
    font-weight: 600;
    color: #0d2b3e;
    font-size: 1rem;
}

.mathmod_form table td:first-child {
    text-align: right;
    width: 40%;
    padding-right: 1rem;
}

.mathmod_form table td:last-child {
    text-align: left;
}

.mathmod_form input[type="text"] {
    padding: 0.5rem 0.8rem;
    border-radius: 60px;
    border: 2px solid rgba(66, 165, 245, 0.2);
    background: white;
    font-family: 'Quicksand', 'Microsoft YaHei', sans-serif;
    font-weight: 600;
    color: #0d2b3e;
    font-size: 1rem;
    outline: none;
    transition: 0.15s ease;
    text-align: center;
    width: 80px;
}

.mathmod_form input[type="text"]:focus {
    border-color: #42a5f5;
    box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.2);
}

.mathmod_form input[type="text"][readonly] {
    background: rgba(225, 245, 254, 0.4);
    color: #0d2b3e;
    font-weight: 700;
    font-size: 1.1rem;
}



.mathmod_form input[type="button"] {
    padding: 0.5rem 0.8rem;
    border-radius: 60px;
    border: 2px solid rgba(66, 165, 245, 0.2);
    background: #42a5f5;
    font-family: 'Quicksand', 'Microsoft YaHei', sans-serif;
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: 0.15s ease;
    text-align: center;
    width: 80px;
}

.mathmod_form input[type="button"]:focus {
    border-color: #42a5f5;
    box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.2);
}

.mathmod_form input[type="button"][readonly] {
    background: rgba(225, 245, 254, 0.4);
    color: #0d2b3e;
    font-weight: 700;
    font-size: 1.1rem;
}

.mathmod_form input[type="reset"] {
    padding: 0.5rem 0.8rem;
    border-radius: 60px;
    border: 2px solid rgba(66, 165, 245, 0.2);
    background: #42a5f5;
    font-family: 'Quicksand', 'Microsoft YaHei', sans-serif;
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: 0.15s ease;
    text-align: center;
    width: 80px;
}

.mathmod_form input[type="reset"]:focus {
    border-color: #42a5f5;
    box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.2);
}

.mathmod_form input[type="reset"][readonly] {
    background: rgba(225, 245, 254, 0.4);
    color: #0d2b3e;
    font-weight: 700;
    font-size: 1.1rem;
}
















/* ----- 计算器按钮 ----- */
.calc {
    padding: 0.6rem 2rem;
    margin: 5px;
    border: none;
    border-radius: 60px;
    font-weight: 700;
    font-size: 1rem;
    font-family: 'Quicksand', 'Microsoft YaHei', sans-serif;
    background: #42a5f5;
    color: white;
    border: 2px solid white;
    box-shadow: 0 5px 0 #1e88e5, 0 4px 12px rgba(66, 165, 245, 0.12);
    transition: 0.15s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.calc:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #1e88e5, 0 10px 24px rgba(66, 165, 245, 0.2);
    background: #64b5f6;
}

.calc:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #1e88e5;
}

input[type="reset"].calc {
    background: #ef5350;
    box-shadow: 0 5px 0 #c62828;
}

input[type="reset"].calc:hover {
    background: #e57373;
}

/* ============================================================
   六、提示与说明区域
   ============================================================ */

.intro_area {
    display: none;
    background: rgba(225, 245, 254, 0.4);
    border-radius: 30px;
    padding: 1.2rem 1.8rem;
    margin-top: 1.5rem;
    border-left: 5px solid #42a5f5;
}

.intro_area p {
    font-family: 'Quicksand', 'Microsoft YaHei', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #0d2b3e;
    line-height: 1.8;
    margin: 0.2rem 0;
}

.intro_area p code {
    background: rgba(255, 255, 255, 0.6);
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
}

/* ============================================================
   七、热门工具推荐
   ============================================================ */

.iframeCon {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 30px;
    padding: 1.2rem 1.8rem;
    margin-top: 1rem;
}

.iframeCon h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0d2b3e;
    margin-bottom: 0.8rem;
    text-align: center;
}

.iframeCon h4 i {
    color: #42a5f5;
    margin-right: 8px;
}

.iframeCon a {
    color: #1e88e5;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    display: inline-block;
    padding: 0.2rem 0.4rem;
    border-radius: 12px;
}

.iframeCon a:hover {
    color: #0d2b3e;
    background: rgba(66, 165, 245, 0.08);
}

/* ============================================================
   八、装饰元素（隐藏，保留兼容）
   ============================================================ */

.flag_tl_t1,
.flag_tr_t1,
.flag_bl_t1,
.flag_br_t1,
.flag_tl_t3,
.flag_tr_t3,
.flag_bl_t3,
.flag_br_t3,
.flag_l_t2,
.flag_r_t2 {
    display: none;
}

/* ============================================================
   九、侧边栏
   ============================================================ */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 220px;
    height: 100vh;
    background: linear-gradient(180deg, #2196f3 0%, #64b5f6 100%);
    color: white;
    padding: 20px 0;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    text-align: center;
    padding: 20px 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo img {
    height: 80px;
    width: auto;
}

.sidebar-logo h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: white;
}

.sidebar-logo p {
    font-size: 0.9rem;
    opacity: 0.9;
    color: #e3f2fd;
}

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

.sidebar-nav li {
    margin-bottom: 8px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 5px;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid white;
}

.sidebar-nav i {
    margin-right: 10px;
    font-size: 1.1rem;
    min-width: 24px;
    text-align: center;
}

.sidebar-nav span {
    font-size: 0.95rem;
}

/* ============================================================
   十、响应式适配
   ============================================================ */

@media (max-width: 992px) {
    .cont {
        padding: 0 1rem;
    }

    .mod_txt {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    }

    .col_right {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem 0.8rem;
    }

    .wrapper,
    .cont {
        padding: 0 0.8rem;
    }

    .main {
        padding: 1.5rem;
        border-radius: 40px;
    }

    .cont {
        flex-direction: column;
        gap: 1.5rem;
    }

    .col_left,
    .col_right {
        display: block;
        flex: 1 1 100%;
        min-width: unset;
    }

    .fn_part,
    .mod_box_t2 {
        padding: 1.2rem 1rem 1.5rem;
        border-radius: 30px;
    }

    .fn_part .hd h2,
    .mod_box_t2 .hd h3 {
        font-size: 1.2rem;
    }

    .mod_txt {
        grid-template-columns: 1fr 1fr;
        gap: 0.2rem 0.6rem;
    }

    .mod_txt li a {
        font-size: 0.82rem;
        padding: 0.25rem 0.6rem;
        border-radius: 20px;
    }

    .mod_txt li a::before {
        content: "•";
        font-size: 1rem;
        opacity: 0.8;
    }

    .mod_txt li a[href*="index.html"] {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .menu_xy_inner {
        padding: 0.8rem 0.6rem;
        border-radius: 40px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .menu_xy_inner ul {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0.2rem;
    }

    .menu_xy_inner ul li a {
        font-size: 0.7rem;
        padding: 0.3rem 0.7rem;
    }

    .mathmod_form table {
        max-width: 100%;
    }

    .mathmod_form table td {
        display: block;
        text-align: left !important;
        padding: 0.3rem 0;
        width: 100%;
    }

    .mathmod_form table td:first-child {
        text-align: left !important;
        padding-right: 0;
        font-size: 0.9rem;
    }

    .mathmod_form input[type="text"] {
        width: 100%;
        max-width: 120px;
        font-size: 0.95rem;
    }

    .calc {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
        margin: 0.2rem 0;
    }

    .intro_area {
        padding: 1rem 1.2rem;
        border-radius: 20px;
    }

    .intro_area p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .iframeCon {
        padding: 1rem;
        border-radius: 20px;
    }

    .iframeCon h4 {
        font-size: 1.1rem;
    }

    .iframeCon a {
        font-size: 0.85rem;
        display: inline-block;
        margin: 0.2rem 0;
    }
}

@media (max-width: 500px) {
    .main {
        padding: 1rem 0.8rem;
        border-radius: 30px;
    }

    .fn_part,
    .mod_box_t2 {
        padding: 1rem 0.8rem 1.2rem;
        border-radius: 24px;
    }

    .fn_part .hd h2,
    .mod_box_t2 .hd h3 {
        font-size: 1rem;
    }

    .mod_txt {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }

    .mod_txt li a {
        font-size: 0.78rem;
        padding: 0.2rem 0.5rem;
    }

    .mod_txt li a[href*="index.html"] {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    .menu_xy_inner ul li a {
        font-size: 0.65rem;
        padding: 0.2rem 0.6rem;
    }

    .mathmod_form input[type="text"] {
        max-width: 80px;
        font-size: 0.85rem;
        padding: 0.4rem 0.5rem;
    }

    .intro_area p {
        font-size: 0.8rem;
    }

    .iframeCon a {
        font-size: 0.8rem;
    }
}

@media (max-width: 380px) {
    .mod_box_t2 .hd h3 {
        font-size: 0.9rem;
    }

    .mod_txt li a {
        font-size: 0.75rem;
        padding: 0.25rem 0.4rem;
    }
}

/* ============================================================
   十一、打印样式
   ============================================================ */

@media print {
    body {
        background: white;
        padding: 0.5in;
    }

    .header,
    .config-panel,
    .btn-group,
    .footer,
    .tip,
    .breadcrumb,
    .tool-nav,
    .donation-section,
    .footprint-deco,
    .divider-deco,
    .card-click-hint,
    .menu_xy,
    .sidebar,
    .iframeCon {
        display: none !important;
    }

    .main,
    .fn_part,
    .mod_box_t2 {
        box-shadow: none;
        border: 1px solid #ddd;
        padding: 1rem;
        page-break-inside: avoid;
        background: white;
        border-radius: 0;
    }

    .main:hover,
    .fn_part:hover,
    .mod_box_t2:hover {
        transform: none;
        box-shadow: none;
    }

    .mod_txt li a {
        color: #333;
        background: none;
        padding: 0.2rem 0;
    }

    .mod_txt li a:hover {
        background: none;
        transform: none;
    }

    .mod_txt li a::before {
        content: "·";
        color: #666;
    }

    .mod_txt {
        grid-template-columns: repeat(3, 1fr);
    }

    .mod_box_t2 .hd h3:before,
    .fn_part .hd h2 i {
        content: "";
        display: none;
    }

    .hero-message h2 {
        font-size: 1.8rem;
        background: none;
        box-shadow: none;
        border: none;
        padding: 0.2rem 0;
        color: #333;
    }

    .hero-message .sub-title {
        border: 1px solid #ddd;
        background: #f9f9f9;
    }
}