/* TRON地址生成器 - 现代化移动端样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #151b38;
    --bg-card: rgba(255, 255, 255, 0.03);
    --accent-color: #00ffa3;
    --accent-secondary: #00d4ff;
    --text-primary: #ffffff;
    --text-secondary: #8a92a8;
    --border-color: rgba(255, 255, 255, 0.08);
    --danger-color: #ff4757;
    --success-color: #00ffa3;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(0, 255, 163, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1428 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 255, 163, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 212, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ========== 登录页面 ========== */
.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
}

.login-container {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    padding: 0;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.login-content-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 20px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.main-title {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

.login-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 36px 28px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.5;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

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

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-group input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 255, 163, 0.1);
    transform: translateY(-1px);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 50px;
}

.eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
}

.checkbox-group {
    margin: 16px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 14px;
    color: var(--text-secondary);
}

.btn-primary {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-secondary) 100%);
    border: none;
    border-radius: 12px;
    color: #0a0e27;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 255, 163, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(0, 255, 163, 0.4);
}

.register-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.register-link a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.back-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 20px;
    cursor: pointer;
}

/* ========== 主应用 ========== */
.app {
    display: none;
    min-height: 100vh;
    padding-bottom: 80px;
    position: relative;
    z-index: 1;
}

.app.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content {
    min-height: calc(100vh - 80px);
    padding: 20px 16px;
    padding-top: max(env(safe-area-inset-top, 5px) + 10px, 5px);
}

.loading-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    font-size: 16px;
    color: var(--text-secondary);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ========== 底部导航 ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 39, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    padding: 12px 8px calc(12px + env(safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 8px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
    border-radius: 0 0 4px 4px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item.active::before {
    width: 60%;
}

.nav-item.active {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.nav-item.active .nav-icon {
    filter: drop-shadow(0 0 8px rgba(0, 255, 163, 0.6));
}

.nav-icon {
    font-size: 26px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
}

/* ========== 页面内容卡片 ========== */
.content-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-secondary {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.12);
}

.btn-danger,
.btn-primary.btn-danger {
    background: linear-gradient(135deg, #ff4757 0%, #ff6348 100%) !important;
    color: white !important;
    border: none;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3) !important;
}

.btn-danger:active,
.btn-primary.btn-danger:active {
    box-shadow: 0 2px 6px rgba(255, 71, 87, 0.4) !important;
}

/* ========== Toast提示 ========== */
#toastContainer {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 90%;
}

.toast {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: slideInBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 280px;
    text-align: center;
    font-weight: 600;
}

.toast.success {
    background: linear-gradient(135deg, rgba(0, 255, 163, 0.9), rgba(0, 212, 255, 0.9));
    color: #0a0e27;
    border-color: rgba(0, 255, 163, 0.5);
    box-shadow: 0 8px 32px rgba(0, 255, 163, 0.4);
}

.toast.error {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.9), rgba(255, 99, 72, 0.9));
    color: white;
    border-color: rgba(255, 71, 87, 0.5);
    box-shadow: 0 8px 32px rgba(255, 71, 87, 0.4);
}

@keyframes slideInBounce {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    50% {
        transform: translateY(5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========== 地址卡片 ========== */
.address-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.address-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.3s;
}

.address-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-md);
}

.address-item:hover::before {
    opacity: 1;
}

.address-item .label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.address-item .value {
    font-size: 14px;
    color: var(--text-primary);
    word-break: break-all;
    line-height: 1.6;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

.address-item .actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.address-item .btn-small {
    flex: 1;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.address-item .btn-small:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.1);
}

/* ========== VIP配置 ========== */
.vip-config {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 20px;
}

.vip-config-item {
    flex: 1;
    min-width: 0;
}

.vip-config-item label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 600;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.vip-config-item label:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
}

.vip-config-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-color);
}

.vip-config-item input[type="text"],
.vip-config-item select,
.vip-input {
    width: 100%;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vip-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.vip-config-item input:focus,
.vip-config-item select:focus,
.vip-input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 255, 163, 0.1);
    transform: translateY(-1px);
}

/* ========== 响应式 ========== */
@media (max-width: 380px) {
    .login-card {
        padding: 28px 20px;
    }
    
    .main-title {
        font-size: 28px;
    }
    
    .nav-icon {
        font-size: 22px;
    }
    
    .nav-label {
        font-size: 10px;
    }
    
    .content {
        padding: 16px 12px;
    }
    
    .content-card {
        padding: 20px 16px;
    }
}

/* ========== 滚动条样式 ========== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 163, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 163, 0.5);
}

/* ========== 自定义规则按钮 ========== */
.btn-custom-rule {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-custom-rule:active {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

/* ========== VIP统计面板 ========== */
.vip-stats {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    gap: 12px;
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ========== VIP标签导航 ========== */
.vip-tabs {
    display: flex;
    gap: 8px;
    margin: 16px 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 6px;
}

.vip-tabs .tab-item {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    font-size: 13px;
    color: var(--text-secondary);
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.vip-tabs .tab-item:active {
    transform: scale(0.95);
}

.vip-tabs .tab-item.active {
    background: var(--accent-color);
    color: #0a0e27;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 255, 163, 0.3);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* ========== 模态框 ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
    padding: 20px;
}

.modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    max-width: 450px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:active {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    justify-content: flex-end;
}

.btn-secondary {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:active {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

