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

:root {
    --bg-color: #f8f9fa;
    --text-color: #2c3e50;
    --accent-color: #3498db;
    --accent-hover: #2980b9;
    --red-color: #e74c3c;
    --border-color: #dee2e6;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid var(--accent-color);
}

header h1 {
    color: var(--accent-color);
    font-size: 28px;
    margin-bottom: 5px;
}

.version {
    color: #6c757d;
    font-size: 14px;
}

.activation-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: var(--white);
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.status-icon {
    font-size: 20px;
}

.status-text {
    font-weight: bold;
}

.activation-status.active {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.activation-status.active .status-icon {
    content: '✅';
}

.activation-status.active .status-text {
    color: #155724;
}

.activate-btn {
    padding: 8px 20px;
    background: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.activate-btn:hover {
    background: var(--accent-hover);
}

.main-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.section {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.section h2 {
    color: var(--accent-color);
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    max-width: 120px;
}

.input-group .input-with-unit {
    position: relative;
    flex: 1;
}

.input-group .input-with-unit input {
    padding-right: 40px;
    max-width: 100%;
}

.input-group .input-with-unit .unit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 14px;
    pointer-events: none;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.input-group input[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.rate-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 10px;
}

.rate-info p {
    margin-bottom: 8px;
    font-size: 14px;
}

.rate-info span {
    font-weight: bold;
    color: var(--accent-color);
}

.update-rate-btn {
    width: 100%;
    padding: 10px;
    background: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    transition: background 0.3s;
}

.update-rate-btn:hover {
    background: var(--accent-hover);
}

.actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

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

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

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: var(--white);
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 30px;
}

footer p {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 5px;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 14px;
}

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

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.large-modal {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    color: var(--accent-color);
    font-size: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6c757d;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.3s;
}

.close-btn:hover {
    background: #f8f9fa;
    color: var(--text-color);
}

.modal-body {
    padding: 20px;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.modal-body input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.error-message {
    color: var(--red-color);
    font-size: 14px;
    margin-bottom: 15px;
    min-height: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.modal-footer p {
    color: #6c757d;
    font-size: 12px;
    margin-bottom: 5px;
}

.modal-footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 12px;
}

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

.help-content {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.help-content h3 {
    color: var(--accent-color);
    font-size: 16px;
    margin: 20px 0 10px 0;
}

.help-content h3:first-child {
    margin-top: 0;
}

.help-content p {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 10px;
}

.help-content ul,
.help-content ol {
    font-size: 14px;
    line-height: 1.8;
    margin-left: 20px;
    margin-bottom: 10px;
}

.help-content li {
    margin-bottom: 5px;
}

.help-content::-webkit-scrollbar {
    width: 6px;
}

.help-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.help-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.help-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 24px;
    }

    .main-content {
        grid-template-columns: 1fr;
    }

    .input-group {
        flex-direction: column;
    }

    .actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .modal-content {
        width: 95%;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 20px;
    }

    .section {
        padding: 15px;
    }

    .section h2 {
        font-size: 16px;
    }
}