/* ----- 全局重置 ----- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* ----- 主容器 ----- */
.container {
    background: #ffffff;
    max-width: 380px;
    width: 100%;
    padding: 20px 16px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #eef2f6;
    text-align: center;
}
.title {
    font-size: 20px;
    font-weight: 600;
    color: #1a2634;
    letter-spacing: -0.2px;
}
.subtitle {
    font-size: 12px;
    color: #8b9bb0;
    margin-top: 2px;
}

/* ----- 用户信息栏 ----- */
.user-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-radius: 30px;
    padding: 4px 4px 4px 14px;
    margin-top: 14px;
    border: 1px solid #eef2f6;
}
.user-bar .username {
    font-size: 13px;
    font-weight: 500;
    color: #1a2634;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
}
.user-bar .btn-group { display: flex; gap: 4px; }
.user-bar .btn-group button {
    padding: 5px 12px;
    border: none;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    background: #e8f0fe;
    color: #1a73e8;
}
.user-bar .btn-group button:hover { background: #d2e0fc; }
.user-bar .btn-group button.primary {
    background: #1a73e8;
    color: white;
}
.user-bar .btn-group button.primary:hover { background: #1557b0; }

/* ----- 邮箱状态栏 ----- */
.email-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: #1a2634;
    background: #f8fafc;
    border-radius: 30px;
    padding: 6px 14px;
    border: 1px solid #eef2f6;
}
.email-status .email-label { font-weight: 600; }
.email-status .email-value { font-weight: 500; color: #1a73e8; }

/* ----- 状态标签 ----- */
.status-badge {
    display: inline-block;
    background: #e8f0fe;
    color: #1a73e8;
    padding: 3px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 10px;
}

/* ----- 输入框组 ----- */
.input-group {
    display: flex;
    border-radius: 50px;
    overflow: hidden;
    border: 1.5px solid #dce3ec;
    background: white;
    margin-top: 12px;
}
.input-group input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    font-size: 13px;
    background: transparent;
    font-family: monospace;
    outline: none;
}
.input-group input::placeholder { color: #b0c0d0; }
.copy-btn {
    background: #f0f4fa;
    border: none;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    color: #1a2634;
    cursor: pointer;
    transition: 0.2s;
    border-left: 1px solid #dce3ec;
}
.copy-btn:hover { background: #e2eaf5; }

/* ----- 主按钮 ----- */
.btn-main {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    background: #1a73e8;
    color: white;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 3px 10px rgba(26, 115, 232, 0.15);
    margin-top: 18px;
}
.btn-main:hover { background: #1557b0; transform: translateY(-1px); }
.btn-main:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ----- 冷却倒计时 ----- */
.cooldown {
    text-align: center;
    font-size: 13px;
    color: #6b7a8f;
    margin-top: 14px;
    padding: 6px;
    background: #f5f8fc;
    border-radius: 30px;
    min-height: 32px;
}

/* ----- 历史记录按钮 ----- */
.history-btn {
    margin-top: 12px;
    padding: 8px;
    background: #f0f4fa;
    border: none;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: #1a2634;
    cursor: pointer;
    transition: 0.2s;
    width: 100%;
}
.history-btn:hover { background: #e2eaf5; }

/* ----- 日志区域 ----- */
.log-area {
    margin-top: 16px;
    background: #f8fafc;
    border-radius: 14px;
    padding: 8px 12px;
    font-size: 11px;
    color: #2c3e50;
    max-height: 100px;
    overflow-y: auto;
    border: 1px solid #eef2f6;
    font-family: monospace;
    text-align: left;
}
.log-area .log-item { padding: 2px 0; border-bottom: 1px dashed #eef2f6; }
.log-area .log-item:last-child { border-bottom: none; }
.log-area .success { color: #1e7e34; }
.log-area .error { color: #c62828; }
.log-area .info { color: #1a73e8; }
.log-area .warn { color: #b7651a; }

/* ----- 悬浮球 ----- */
#floatContainer {
    position: fixed;
    right: 0;
    top: 0;
    width: 120px;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}
.float-btn {
    position: absolute;
    right: 0;
    width: 120px;
    height: 42px;
    border-radius: 50px 0 0 50px;
    background: #1a73e8;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.25);
    cursor: grab;
    text-decoration: none;
    transition: box-shadow 0.25s;
    border: none;
    padding: 0 12px 0 16px;
    user-select: none;
    touch-action: none;
    pointer-events: auto;
    z-index: 10000;
}
.float-btn:active { cursor: grabbing; }
.float-btn:hover { box-shadow: 0 6px 20px rgba(26, 115, 232, 0.35); }
.float-btn .text { white-space: nowrap; }

.float-btn.color-1 { background: #34a853; }
.float-btn.color-2 { background: #f9ab00; }
.float-btn.color-3 { background: #ea4335; }
.float-btn.color-4 { background: #8e44ad; }
.float-btn.color-5 { background: #00bcd4; }

@media (max-width: 480px) {
    #floatContainer { width: 100px; }
    .float-btn { width: 100px; height: 36px; font-size: 12px; padding: 0 10px 0 14px; }
}

/* ----- 模态框 ----- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: white;
    max-width: 380px;
    width: 100%;
    padding: 24px 20px;
    border-radius: 28px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-box h2 {
    font-size: 18px;
    margin-bottom: 6px;
    color: #1a2634;
    font-weight: 600;
}
.modal-box .field { margin-top: 12px; text-align: left; }
.modal-box .field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #3c4a5a;
    margin-bottom: 3px;
}
.modal-box .field input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #dce3ec;
    border-radius: 30px;
    font-size: 13px;
    outline: none;
}
.modal-box .field input:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

/* 验证码行 */
.field-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.field-row input {
    flex: 2;
    min-width: 0;
}
.field-row button {
    flex: 1;
    min-width: 80px;
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 600;
}
.field-row button:hover { background: #1557b0; }
.field-row button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-box .btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 14px;
}
.modal-box .btn-primary { background: #1a73e8; color: white; }
.modal-box .btn-primary:hover { background: #1557b0; }
.modal-box .btn-secondary { background: #ecf0f5; color: #1a2634; }
.modal-box .btn-secondary:hover { background: #dce3ec; }
.modal-box .link {
    color: #1a73e8;
    cursor: pointer;
    font-weight: 500;
    background: none;
    border: none;
    font-size: 13px;
    margin-top: 10px;
}
.modal-box .link:hover { text-decoration: underline; }

/* 历史记录列表 */
.history-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 8px;
    border: 1px solid #eef2f6;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.history-item .info .account { font-family: monospace; font-weight: 600; font-size: 13px; }
.history-item .info .time { color: #8b9bb0; font-size: 11px; }
.history-item .copy-btn-sm {
    padding: 4px 12px;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    background: #e8f0fe;
    color: #1a73e8;
    cursor: pointer;
}
.history-item .copy-btn-sm:hover { background: #d2e0fc; }

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a2634;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 2000;
}
.toast.show { opacity: 1; }
.toast.success { background: #1e7e34; }
.toast.error { background: #c62828; }
.toast.warning { background: #b7651a; }

/* 验证码弹窗 */
.modal-box .hint {
    background: #f0f4fa;
    padding: 8px 14px;
    border-radius: 16px;
    color: #3c4a5a;
    font-size: 13px;
    margin: 10px 0;
}
.modal-box img {
    max-width: 100%;
    max-height: 120px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    margin: 10px 0;
}
.modal-input {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    text-align: center;
    border: 2px solid #dce3ec;
    border-radius: 50px;
    margin: 10px 0 14px;
    font-family: monospace;
    outline: none;
}
.modal-input:focus { border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26,115,232,0.15); }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; margin-top: 0; }

.btn-sm { padding: 4px 12px; font-size: 12px; border-radius: 30px; }