﻿:root {
    --primary: #4361ee;
    --primary-light: #4895ef;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fb;
    color: var(--dark);
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}
.header-container {
    display:flex;
    align-items:center;
    justify-content:center;
}
.title {
    margin-left:6px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}
.radio-container {
    display:flex;
    align-items: center;
}


.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    margin-bottom: 25px;
    transition: var(--transition);
}

    .card:hover {
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    }

.card-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

    .card-title i {
        color: var(--primary-light);
    }

.platforms-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.platform-container {
    overflow-x: auto;
}

/* 桌面端表格样式 */
.desktop-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

    .desktop-table th, .desktop-table td {
        padding: 12px 15px;
        text-align: center;
        border-bottom: 1px solid #eaeaea;
    }

    .desktop-table th {
        background-color: #f8f9fa;
        font-weight: 600;
        color: var(--dark);
    }

.month-header {
    width: 80px;
    white-space: nowrap;
}

input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

    input[type="number"]:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
        outline: none;
    }

.btn-group {
    display: flex;
    justify-content: space-between;
    margin: 25px 0;
    flex-wrap: wrap;
    gap: 4px;
}

.left-buttons, .right-buttons {
    display: flex;
    gap: 4px;
}

.checkbox-container {
    display:flex;
    align-items:center;
}
.checkbox-Item {
    width:22px;
    height:22px;
    margin-left: 8px;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content:center;
    gap: 4px;
}

.reset-btn {
    background-color: var(--gray);
    color: white;
}

    .reset-btn:hover {
        background-color: #5a6268;
    }

.add-btn {
    background-color: var(--success);
    color: white;
    
}

    .add-btn:hover {
        background-color: #3aa8d8;
    }

.calc-btn {
    background-color: var(--primary);
    color: white;
    width: 130px;
}

.calc-btn:hover {
    background-color: var(--secondary);
}

#resultContainer {
    width: 100%;
    margin: 20px auto;
    text-align: center;
    display:none;
}

#resultTable {
    margin: 0 auto;
    width: 100%;
}

.highlight {
    background-color: rgba(76, 201, 240, 0.1);
    font-weight: 600;
}

.mobile-result {
    display: none;
}

.formula-explanation {
    background-color: #e8f4fc;
    border-left: 4px solid var(--primary);
    padding: 20px;
    border-radius: 4px;
    margin-top: 30px;
}

    .formula-explanation h3 {
        color: var(--primary);
        margin-bottom: 15px;
    }

    .formula-explanation p {
        margin-bottom: 15px;
    }

    .formula-explanation a {
        color: var(--primary);
        text-decoration: none;
        font-weight: 500;
    }

        .formula-explanation a:hover {
            text-decoration: underline;
        }

.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
    color: var(--gray);
    font-size: 0.9rem;
}

    .footer a {
        color: var(--gray);
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

        .footer a:hover {
            color: var(--primary);
        }

.platform-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-platform {
    background-color: var(--danger);
    color: white;
    padding: 8px 15px;
    font-size: 0.9rem;
}

    .remove-platform:hover {
        background-color: #e1156d;
    }

.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 移动端优化 - 关键改进 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    .checkbox-container {
        font-size: 13px;
    }
    h1 {
        font-size: 1.8rem;
    }

    .card {
        padding: 15px;
        margin-bottom: 15px;
    }

    .card-title {
        font-size: 1.3rem;
    }
    .month-header {
        width: 8px;
    }
    .calc-btn {
        background-color: var(--primary);
        color: white;
        width:100px;
    }

    /* 按钮组优化 - 保持一行显示但缩小 */
    .btn-group {
        margin: 15px 0;
        gap: 4px;
    }

    .left-buttons, .right-buttons {
        gap: 4px;
    }

    button {
        padding: 10px 2px;
        font-size: 0.7rem;
        justify-content: center;
    }

    /* 移动端表格优化 - 保持3列但缩小间距 */
    .desktop-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 10px;
    }

        .desktop-table th, .desktop-table td {
            padding: 8px 5px;
            text-align: center;
            border-bottom: 1px solid #eaeaea;
            font-size: 0.85rem;
        }

        .desktop-table th {
            background-color: #f8f9fa;
            font-weight: 600;
            color: var(--dark);
            padding: 8px 3px;
        }

        .desktop-table input[type="number"] {
            padding: 8px 5px;
            font-size: 0.85rem;
            min-width: 0;
        }

    /* 移动端结果表格隐藏，使用卡片视图 */
    #resultTable {
        display: none;
    }

    .mobile-result {
        display: block;
        width: 100%;
    }

    .result-card {
        border: 1px solid #ddd;
        border-radius: 5px;
        padding: 10px;
        margin-bottom: 15px;
        background-color: #f9f9f9;
    }

        .result-card h3 {
            margin-top: 0;
            color: #2196F3;
        }

    .result-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 5px;
    }

    .result-label {
        font-weight: bold;
        color: #555;
    }
}

@media (min-width: 769px) {
   
}

@media (max-width: 480px) {
    .mobile-month-details {
        grid-template-columns: 1fr;
    }

    .month-header {
        width: 8px;
        white-space: nowrap;
    }
    .checkbox-container {
        font-size:13px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .card-title {
        font-size: 1.2rem;
    }
    .calc-btn {
        background-color: var(--primary);
        color: white;
        width:100px;
    }

    .remove-platform {
        background-color: var(--danger);
        color: white;
        padding: 8px 15px;
        font-size: 0.9rem;
        width: 120px;
    }

    .remove-platform:hover {
        background-color: #e1156d;
    }

    /* 进一步缩小移动端表格间距 */
    .desktop-table th, .desktop-table td {
        padding: 6px 3px;
        font-size: 0.8rem;
    }

    .desktop-table input[type="number"] {
        padding: 6px 4px;
        font-size: 0.8rem;
    }

    /* 进一步缩小按钮 */
    button {
        padding: 8px 4px;
        font-size: 0.7rem;
    }
}

/* 针对小屏幕手机的额外优化 */
@media (max-width: 360px) {
    .container {
        padding: 5px;
    }

    .card {
        padding: 10px;
    }

    /* 极限缩小表格间距 */
    .desktop-table th, .desktop-table td {
        padding: 5px 2px;
        font-size: 0.75rem;
    }

    .desktop-table input[type="number"] {
        padding: 5px 3px;
        font-size: 0.75rem;
    }

    /* 极限缩小按钮 */
    button {
        padding: 7px 2px;
        font-size: 0.6rem;
    }

    .btn-group {
        gap: 4px;
    }

    .left-buttons, .right-buttons {
        gap: 2px;
    }
}

/* 弹窗遮罩层 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
 }
.tip-modal-container {
    position: fixed;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    width: 360px;
    background-color: #fdf6ec;
    border: 1px solid #f3d4a5;
    border-radius: 4px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    padding: 10px 20px;
    transition: all 0.3s ease;
}
 .tip-modal-container.active {
        opacity: 1;
        visibility: visible;
    }
.error-info {
    margin-left: 8px;
    color: #eaaf58;
}
/* 弹窗容器 */
.verification-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 80%;
    max-width: 420px;
    text-align: center;
    transform: translateY(-20px) scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .verification-modal {
    transform: translateY(0) scale(1);
}

.verification-modal:hover {
    transform: translateY(-5px);
}

.modal-overlay.active .verification-modal:hover {
    transform: translateY(-5px) scale(1);
}

.verification-header {
    margin-bottom: 30px;
}

.verification-icon {
    width: 42px;
    height: 42px;
    margin: 0 auto 20px;
    background: #f0f7ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a90e2;
    font-size: 32px;
}

.verification-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.verification-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.verification-code-container {
    margin: 30px 0;
    position: relative;
}

.verification-code-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5eb;
    border-radius: 10px;
    font-size: 18px;
    text-align: center;
    letter-spacing: 8px;
    transition: all 0.3s;
    outline: none;
}

    .verification-code-input:focus {
        border-color: #4a90e2;
        box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
    }

.verification-code-image {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 94px;
    position: relative;
}

.code-img {
    height:72px;
}

.verification-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
}

.btn {
    padding: 12px 4px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    outline: none;
}

.btn-refresh {
    background: #f0f7ff;
    color: #4a90e2;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .btn-refresh:hover {
        background: #e1eeff;
    }

.btn-submit {
    background: #4a90e2;
    color: white;
    flex: 1;
    margin-left: 15px;
}

    .btn-submit:hover {
        background: #3a80d2;
        box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    }

.btn-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

    .btn-close:hover {
        color: #666;
    }

.verification-footer {
    margin-top: 25px;
    font-size: 13px;
    color: #999;
}

    .verification-footer a {
        color: #4a90e2;
        text-decoration: none;
    }

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

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

@media (max-width: 480px) {
    .verification-modal {
        padding: 30px 20px;
    }

    .verification-actions {
        flex-direction: column;
        gap: 15px;
    }

    .btn-submit {
        margin-left: 0;
    }

    .verification-code-image {
        height: 80px;
    }

    .code-img {
        height: 60px;
    }
}