/* assets/css/style.css */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background: linear-gradient(135deg, #0b1120 0%, #19233c 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.container {
    max-width: 900px;
    width: 100%;
    background: rgba(18, 28, 46, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 30px;
    border: 1px solid rgba(74, 144, 226, 0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}
.balance-card {
    background: linear-gradient(145deg, #1f2b42, #151f32);
    border-radius: 20px;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border: 1px solid #2f4565;
}
.balance-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, #29539b, #1e3a6b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    border: 2px solid #4f7ec9;
}
.user-detail {
    color: #8da4cc;
}
.user-name {
    color: #aaccff;
    font-weight: bold;
    font-size: 16px;
}
.login-btn {
    background: #2d4672;
    color: white;
    padding: 8px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid #4f7ec9;
    transition: 0.2s;
}
.login-btn:hover {
    background: #3a5a8c;
    transform: translateY(-2px);
}
.logout-btn {
    color: #ff9b9b;
    text-decoration: none;
    font-size: 14px;
    margin-left: 10px;
}
.balance-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.balance-info .label {
    color: #8da4cc;
    font-size: 14px;
}
.balance-info .time {
    font-size: 32px;
    font-weight: bold;
    color: #aaccff;
    text-shadow: 0 0 10px #2979ff;
    background: #0c1625;
    padding: 5px 20px;
    border-radius: 40px;
    display: inline-block;
}
.pay-btn {
    background: #2d4672;
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 40px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid #4f7ec9;
    box-shadow: 0 4px 0 #0f1e30;
    white-space: nowrap;
}
.pay-btn:hover { 
    background: #3a5a8c; 
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #0f1e30;
}
.pay-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #0f1e30;
}
.chain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin: 20px 0 30px;
}
.chain-item {
    background: #1a2538;
    padding: 12px 5px;
    text-align: center;
    border-radius: 40px;
    color: #a2bbdf;
    border: 1px solid #2f4160;
    cursor: pointer;
    transition: 0.2s;
}
.chain-item.active {
    background: linear-gradient(145deg, #29539b, #1e3a6b);
    color: white;
    border-color: #6ca5ff;
    box-shadow: 0 0 15px #29539b;
}
.generator {
    background: #0f1827;
    border-radius: 30px;
    padding: 25px;
    margin-bottom: 20px;
}
.input-group {
    margin-bottom: 20px;
}
.input-group label {
    display: block;
    color: #b0c8f0;
    margin-bottom: 8px;
    font-size: 16px;
}
.input-group input {
    width: 100%;
    background: #1b263b;
    border: 1px solid #314a6b;
    padding: 15px 20px;
    border-radius: 40px;
    font-size: 16px;
    color: white;
}
.generate-btn {
    width: 100%;
    background: linear-gradient(95deg, #2b5f9e, #1b3b66);
    border: none;
    color: white;
    font-size: 24px;
    font-weight: bold;
    padding: 15px;
    border-radius: 60px;
    cursor: pointer;
    border: 1px solid #4d86cf;
    box-shadow: 0 8px 0 #0d1d31;
    transition: 0.1s;
}
.generate-btn:active {
    transform: translateY(6px);
    box-shadow: 0 2px 0 #0d1d31;
}
.generate-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}
.result {
    background: #0f1a28;
    border-radius: 20px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #2d4d7a;
    display: none;
}
.address-box, .key-box {
    background: #0b121f;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    word-break: break-all;
}
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    background: #1b263b;
    max-width: 500px;
    width: 90%;
    border-radius: 40px;
    padding: 30px;
    border: 2px solid #3870b0;
}
.packages {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}
.package {
    background: #0f1a2b;
    padding: 20px;
    border-radius: 25px;
    text-align: center;
    cursor: pointer;
    border: 1px solid #305685;
    transition: 0.2s;
}
.package:hover {
    background: #1e3452;
    border-color: #6ca5ff;
    transform: scale(1.02);
}
.package .price { 
    font-size: 24px; 
    color: #a6c9ff; 
    font-weight: bold; 
}
.close {
    float: right;
    font-size: 30px;
    cursor: pointer;
    color: #8da4cc;
}
.close:hover {
    color: #aaccff;
}
.fingerprint {
    display: none;
}
@media (max-width: 768px) {
    .balance-card {
        flex-direction: column;
        gap: 15px;
    }
    .balance-left {
        width: 100%;
        justify-content: space-between;
    }
    .pay-btn {
        width: 100%;
    }
}

/* 登录注册按钮样式 */
.login-register {
    display: flex;
    align-items: center;
}

.login-register-btn {
    background: linear-gradient(145deg, #2d4672, #1f3452);
    color: white;
    padding: 12px 30px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    border: 1px solid #4f7ec9;
    transition: 0.2s;
    display: inline-block;
    white-space: nowrap;
    box-shadow: 0 4px 0 #0f1e30;
}

.login-register-btn:hover {
    background: linear-gradient(145deg, #3a5a8c, #2a4070);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #0f1e30;
}

.login-register-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #0f1e30;
}

/* 结果显示区域文字颜色 */
.result .address-box .value,
.result .key-box .value,
#resultAddress,
#resultKey {
    color: #ffffff !important;
    background: #0b121f;
}

.address-box, .key-box {
    background: #0b121f;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    word-break: break-all;
}

.address-box .value, .key-box .value {
    color: #d1e5ff;
    font-family: monospace;
    font-size: 14px;
}

/* 计数器动画 */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

#generate-counter {
    animation: pulse 2s infinite;
}

#attempt-counter {
    text-shadow: 0 0 10px #ffd700;
}