/* 记了么 H5 - 主样式文件 (基于荧光绿深色主题设计系统) */

/* ==================== CSS 变量定义 ==================== */
:root {
    /* 主色调 - 荧光绿 */
    --primary-color: #C4FF0E;
    --primary-dark: #A8E000;
    --primary-light: #E0FF80;

    /* 背景色 */
    --bg-dark: #000000;
    --bg-card: #1A1A1A;
    --bg-card-light: #FFFFFF;
    --bg-section: #F5F5F5;
    --bg-page: #0A0A0A;

    /* 文字色 */
    --text-primary: #FFFFFF;
    --text-secondary: #999999;
    --text-dark: #333333;
    --text-muted: #666666;

    /* 状态色 */
    --success-color: #A8E000;
    --warning-color: #FFB800;
    --danger-color: #FF4D4F;
    --info-color: #1890FF;

    /* 间距系统 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 24px;
    --spacing-xxl: 32px;

    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-round: 50%;

    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(196, 255, 14, 0.3);
}

/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-page);
}

/* ==================== 容器 ==================== */
.container {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ==================== 顶部导航栏 ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--bg-dark);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-lg);
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.navbar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(196, 255, 14, 0.5);
}

.navbar-action {
    cursor: pointer;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-primary);
    font-size: 14px;
    transition: color 0.3s;
}

.navbar-action:hover {
    color: var(--primary-color);
}

/* ==================== 底部导航栏 ==================== */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--bg-dark);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #222222;
    z-index: 1000;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.3);
}

.tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 11px;
    transition: all 0.3s;
    padding: var(--spacing-sm) 0;
}

.tabbar-item.active {
    color: var(--primary-color);
}

.tabbar-item.active .tabbar-item-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(196, 255, 14, 0.6));
}

.tabbar-item-icon {
    width: 24px;
    height: 24px;
    margin-bottom: var(--spacing-xs);
    transition: all 0.3s;
    object-fit: contain;
}

/* ==================== 主内容区 ==================== */
.main-content {
    margin-top: 56px;
    margin-bottom: 64px;
    min-height: calc(100vh - 120px);
    padding: var(--spacing-lg) 0;
    background: var(--bg-page);
}

/* ==================== 卡片样式 ==================== */
.card {
    background: var(--bg-card-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:active {
    transform: scale(0.98);
}

/* ==================== 资产卡片 ==================== */
.asset-card {
    position: relative;
    cursor: pointer;
    background: var(--bg-card-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.asset-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.asset-card:hover::before {
    opacity: 1;
}

.asset-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.asset-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.asset-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-dark);
    color: var(--primary-color);
}

.asset-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    color: var(--text-muted);
    font-size: 13px;
}

.asset-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid #F0F0F0;
}

.days-remaining {
    font-size: 18px;
    font-weight: 600;
}

.status-normal {
    color: var(--success-color);
}

.status-expiring {
    color: var(--warning-color);
}

.status-expired {
    color: var(--danger-color);
}

/* ==================== 资产列表模式样式 ==================== */
.asset-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.asset-list-item:active {
    transform: scale(0.98);
}

.asset-list-item .asset-name {
    font-size: 15px;
    margin-bottom: 0;
}

.asset-list-item .asset-days {
    font-size: 14px;
    font-weight: 600;
}

.asset-list-item .status-normal {
    color: var(--success-color);
}

.asset-list-item .status-expiring {
    color: var(--warning-color);
}

.asset-list-item .status-expired {
    color: var(--danger-color);
}

/* ==================== 按钮 ==================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    outline: none;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-dark);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(196, 255, 14, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-danger {
    background: var(--bg-dark);
    color: var(--text-primary);
    border: 1px solid var(--danger-color);
}

.btn-danger:hover {
    background: var(--danger-color);
    color: var(--text-primary);
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
    height: 48px;
}

/* ==================== 表单 ==================== */
.form-group {
    margin-bottom: var(--spacing-xl);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14px;
}

.form-label.required::before {
    content: '*';
    color: var(--danger-color);
    margin-right: var(--spacing-xs);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E5E5E5;
    border-radius: var(--radius-md);
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    background: var(--bg-section);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary-color);
    background: var(--bg-card-light);
    box-shadow: 0 0 0 3px rgba(196, 255, 14, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ==================== 块状类型选择器 ==================== */
.type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.type-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    background: var(--bg-section);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s;
    min-height: 60px;
}

.type-option:hover {
    background: var(--bg-card-light);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.type-option.selected {
    background: var(--bg-dark);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.type-icon {
    font-size: 0px;
    margin-bottom: 0;
    margin-right: var(--spacing-sm);
}

.type-option.selected .type-icon {
    filter: drop-shadow(0 0 8px rgba(196, 255, 14, 0.6));
}

.type-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.type-option.selected .type-text {
    color: var(--primary-color);
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: var(--spacing-xl);
    opacity: 0.5;
}

/* ==================== 加载状态 ==================== */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

/* ==================== 浮动按钮 ==================== */
.fab {
    position: fixed;
    bottom: 84px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-round);
    background: var(--primary-color);
    color: var(--bg-dark);
    border: none;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: all 0.3s;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(196, 255, 14, 0.6);
}

.fab:active {
    transform: scale(0.95);
}

/* ==================== 开关 ==================== */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

/* ==================== 列表项 ==================== */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    background: var(--bg-card-light);
    border-bottom: 1px solid #F0F0F0;
}

.list-item:last-child {
    border-bottom: none;
}

/* ==================== Toast 提示 ==================== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: var(--text-primary);
    padding: 14px 24px;
    border-radius: var(--radius-md);
    z-index: 9999;
    font-size: 14px;
    max-width: 80%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

/* ==================== 响应式 ==================== */
@media (max-width: 480px) {
    .navbar-title {
        font-size: 16px;
    }

    .asset-name {
        font-size: 15px;
    }

    .container {
        padding: 0 var(--spacing-md);
    }
}

/* ==================== 工具类 ==================== */
.text-center {
    text-align: center;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

/* ==================== 动画效果 ==================== */
@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(196, 255, 14, 0.3);
    }

    50% {
        box-shadow: 0 0 30px rgba(196, 255, 14, 0.6);
    }
}

.glow-animation {
    animation: glow 2s ease-in-out infinite;
}