/* ========================================
   短信接收站 - 样式表
   配色：浅绿 + 玻璃态 + 渐变
   ======================================== */

:root {
    --primary: #52c41a;
    --primary-light: #73d13d;
    --primary-dark: #389e0d;
    --accent: #36cfc9;
    --bg-start: #f0f5ff;
    --bg-mid: #e8f5e9;
    --bg-end: #e0f7fa;
    --card-bg: rgba(255, 255, 255, 0.72);
    --card-border: rgba(255, 255, 255, 0.55);
    --text: #1a1a2e;
    --text-secondary: #595959;
    --text-muted: #8c8c8c;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 12px 40px rgba(82, 196, 26, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-mid) 40%, var(--bg-end) 100%);
    min-height: 100vh;
    color: var(--text);
    position: relative;
    overflow-x: hidden;
}

/* 背景装饰粒子 */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(82, 196, 26, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(54, 207, 201, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(82, 196, 26, 0.03) 0%, transparent 60%);
    animation: bgFloat 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(1%, -1%); }
    66% { transform: translate(-1%, 0.5%); }
}

/* 容器 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    position: relative;
    z-index: 1;
}

/* 头部 */
.header {
    text-align: center;
    padding: 36px 0 20px;
    position: relative;
}

.header .icon {
    font-size: 48px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    width: 80px;
    height: 80px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 28px rgba(82, 196, 26, 0.3);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 8px 28px rgba(82, 196, 26, 0.3); }
    50% { box-shadow: 0 8px 40px rgba(82, 196, 26, 0.5); }
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.header .subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

/* 状态栏 */
.status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 20px;
    margin-bottom: 20px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 13px;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* 操作按钮区 */
.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 18px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.25);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(82, 196, 26, 0.35);
}

.btn-outline {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(82, 196, 26, 0.3);
    color: var(--primary-dark);
}
.btn-outline:hover {
    background: rgba(82, 196, 26, 0.08);
}

.btn-danger {
    background: rgba(255, 77, 79, 0.08);
    color: #ff4d4f;
    border: 1px solid rgba(255, 77, 79, 0.2);
}
.btn-danger:hover {
    background: rgba(255, 77, 79, 0.15);
}

/* 短信卡片列表 */
.sms-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sms-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: default;
    animation: fadeInUp 0.4s ease-out;
}

.sms-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.sms-card.new {
    border-left: 3px solid var(--primary);
    animation: highlightNew 0.6s ease-out;
}

@keyframes highlightNew {
    0% { background: rgba(82, 196, 26, 0.12); }
    100% { background: var(--card-bg); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.sms-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.sms-phone {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sms-phone .phone-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
}

.sms-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.tag {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.tag-sim {
    background: rgba(82, 196, 26, 0.1);
    color: var(--primary-dark);
}

.tag-time {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-muted);
    font-size: 12px;
}

.sms-content {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    word-break: break-all;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-sm);
    margin-top: 4px;
}

.sms-card .card-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: flex-end;
}

.sms-card .card-actions .btn {
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 14px;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.loading .spinner {
    width: 32px;
    height: 32px;
    margin: 0 auto 12px;
    border: 3px solid rgba(82, 196, 26, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 空状态 */
.empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty p {
    font-size: 15px;
    margin-bottom: 8px;
}

.empty .hint {
    font-size: 13px;
    color: var(--text-muted);
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-sm);
    display: inline-block;
    font-family: "SF Mono", "Fira Code", monospace;
    word-break: break-all;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.pagination .page-info {
    padding: 6px 14px;
    background: var(--card-bg);
    border-radius: 20px;
    font-size: 13px;
}

/* 弹窗 */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.modal h3 { margin-bottom: 12px; font-size: 18px; }
.modal p { color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }
.modal .btn-row { display: flex; gap: 10px; justify-content: center; }

/* Toast */
.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: #1a1a2e;
    color: #fff;
    border-radius: 24px;
    font-size: 14px;
    z-index: 200;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
    animation: toastIn 0.3s ease-out;
    pointer-events: none;
}

.toast.success { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }
.toast.error { background: linear-gradient(135deg, #ff4d4f, #ff7875); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 响应式 */
@media (max-width: 600px) {
    .container { padding: 12px 10px 30px; }
    .header { padding: 20px 0 12px; }
    .header h1 { font-size: 22px; }
    .sms-card { padding: 14px 14px; border-radius: 12px; }
    .sms-content { font-size: 14px; }
    .toolbar { gap: 6px; }
    .btn { padding: 6px 14px; font-size: 13px; }
}
