/* SVG Icons */
.svg-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}
.svg-icon svg {
    width: 100%;
    height: 100%;
}

.currency-icon .svg-icon {
    width: 24px;
    height: 24px;
}

.card-title .svg-icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
}

.result-icon .svg-icon {
    width: 48px;
    height: 48px;
}

/* ========== iOS 液态玻璃风格 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background: #000000;
    color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

/* ========== 应用容器 ========== */
.app-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    pointer-events: none;
    transform: translateY(30px) scale(0.96);
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 0 20px 30px;
    display: flex;
    flex-direction: column;
}

.page.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* ========== 卡片 - 液态玻璃质感 ========== */
.glass-card {
    background: linear-gradient(135deg, rgba(255,182,193,0.12) 0%, rgba(221,160,221,0.08) 50%, rgba(176,196,222,0.06) 100%);
    border-radius: 24px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.glass-card:active {
    transform: scale(0.97);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.08);
}

.glass-card:hover {
    border-color: rgba(255,182,193,0.2);
    box-shadow: 0 12px 40px rgba(255,182,193,0.1), inset 0 1px 0 rgba(255,255,255,0.15);
}

/* ========== 登录页 ========== */
.login-card {
    max-width: 380px;
    width: 100%;
    margin: auto;
    padding: 40px 28px 50px 28px;
    text-align: center;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255,182,193,0.15) 0%, rgba(221,160,221,0.1) 50%, rgba(176,196,222,0.08) 100%);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.12);
    animation: cardSlideIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes cardSlideIn {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.logo-area {
    margin-bottom: 32px;
    animation: fadeInUp 0.5s ease 0.1s both;
}

.logo-img {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    margin: 0 auto 20px;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,182,193,0.1);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(255,182,193,0.2);
}

.app-subtitle {
    font-size: 14px;
    color: #8e8e93;
    font-weight: 400;
}

/* ========== 输入框 - 液态玻璃 ========== */
.form-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    animation: fadeInUp 0.5s ease 0.2s both;
}

.input-group {
    text-align: left;
}

.input-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #98989d;
    margin-bottom: 8px;
    padding-left: 4px;
}

.glass-input {
    width: 100%;
    padding: 16px 18px;
    font-size: 16px;
    color: #ffffff;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.glass-input::placeholder {
    color: #636366;
}

.glass-input:focus {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,105,180,0.5);
    box-shadow: 0 0 0 4px rgba(255,105,180,0.15), 0 4px 12px rgba(255,105,180,0.1);
}

/* ========== 按钮 - 粉紫渐变 ========== */
.glass-button {
    padding: 16px 28px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #FF69B4, #FF1493);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(255,20,147,0.25);
    position: relative;
    overflow: hidden;
}

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

.glass-button:hover::before {
    left: 100%;
}

.glass-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255,20,147,0.35);
}

.glass-button:active {
    transform: scale(0.97) translateY(0);
    box-shadow: 0 2px 8px rgba(255,20,147,0.2);
}

.glass-button.primary {
    background: linear-gradient(135deg, #FF69B4, #FF1493);
    width: 100%;
    animation: fadeInUp 0.5s ease 0.3s both;
}

.glass-button.secondary {
    background: linear-gradient(135deg, rgba(255,182,193,0.15), rgba(221,160,221,0.12));
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.glass-button.secondary:hover {
    background: linear-gradient(135deg, rgba(255,182,193,0.2), rgba(221,160,221,0.18));
    border-color: rgba(255,182,193,0.3);
}

.glass-button.large {
    width: 100%;
    padding: 18px;
    font-size: 17px;
    border-radius: 18px;
}

.glass-button.icon-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 12px;
    font-size: 20px;
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.1);
}

.glass-button.icon-btn:hover {
    background: rgba(255,182,193,0.15);
    border-color: rgba(255,182,193,0.2);
}

.glass-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========== 加载动画 ========== */
.btn-loader {
    display: inline-flex;
    align-items: center;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== 提示文字 ========== */
.hint-text {
    font-size: 12px;
    text-align: center;
    margin-top: 16px;
    background: linear-gradient(90deg, #ff69b4, #ff1493, #ff69b4, #ff8c69, #ffb6c1, #ff69b4);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow 3s linear infinite;
    font-weight: 600;
}

@keyframes rainbow {
    to { background-position: 200% center; }
}

/* ========== 页面头部 ========== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0 20px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(255,182,193,0.2);
}

.header-spacer {
    width: 40px;
}

/* ========== 内容区域 ========== */
.content-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 40px;
}

/* ========== 状态卡片 ========== */
.status-card {
    padding: 16px;
    animation: cardSlideIn 0.5s ease 0.05s both;
}

.status-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.status-row:last-child {
    margin-bottom: 0;
}

.status-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.2s ease;
}

.status-item:hover {
    background: rgba(255,182,193,0.08);
    border-color: rgba(255,182,193,0.15);
}

.status-label {
    font-size: 12px;
    color: #8e8e93;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
}

.status-value.banned {
    color: #ff453a;
}

.status-value.safe {
    color: #30d158;
}

/* ========== 货币卡片 ========== */
.currency-card {
    padding: 16px;
    animation: cardSlideIn 0.5s ease 0.1s both;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: #8e8e93;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency-row {
    display: flex;
    gap: 12px;
}

.currency-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.06);
}

.currency-item:hover {
    background: rgba(255,182,193,0.08);
    border-color: rgba(255,182,193,0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,182,193,0.1);
}

.currency-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(255,255,255,0.08);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
}

.currency-item.soft .currency-icon {
    background: rgba(255,159,10,0.15);
    border-color: rgba(255,159,10,0.2);
}

.currency-item.hard .currency-icon {
    background: rgba(255,105,180,0.15);
    border-color: rgba(255,105,180,0.2);
}

.currency-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.currency-name {
    font-size: 12px;
    color: #8e8e93;
    font-weight: 500;
}

.currency-value {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.currency-item.soft .currency-value {
    color: #ff9f0a;
}

.currency-item.hard .currency-value {
    color: #ff69b4;
}

/* ========== 领取卡片 ========== */
.claim-card {
    padding: 16px;
    animation: cardSlideIn 0.5s ease 0.15s both;
}

.claim-row {
    display: flex;
    gap: 12px;
}

.claim-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px;
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.3s ease;
}

.claim-item:hover {
    background: rgba(255,182,193,0.08);
    border-color: rgba(255,182,193,0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,182,193,0.1);
}

.claim-label {
    font-size: 12px;
    color: #8e8e93;
    font-weight: 500;
}

.claim-value {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 8px rgba(255,182,193,0.2);
}

.claim-unit {
    font-size: 12px;
    color: #636366;
}

/* ========== 恐龙卡片 ========== */
.dinos-card {
    padding: 16px;
    animation: cardSlideIn 0.5s ease 0.2s both;
}

.dinos-summary {
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dinos-count {
    font-size: 14px;
    color: #8e8e93;
}

.dinos-count strong {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(255,182,193,0.2);
}

.dinos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.dino-tag {
    padding: 10px 6px;
    font-size: 12px;
    text-align: center;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    color: #98989d;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dino-tag:hover {
    background: rgba(255,182,193,0.1);
    border-color: rgba(255,182,193,0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255,182,193,0.08);
}

.dino-tag.unlocked {
    background: rgba(255,105,180,0.15);
    color: #ff69b4;
    border-color: rgba(255,105,180,0.25);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255,105,180,0.15);
}

.dino-tag.unlocked::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 10px;
    color: #30d158;
    opacity: 0.8;
}

.dino-tag.locked {
    background: rgba(255,255,255,0.02);
    color: #48484a;
    border-color: rgba(255,255,255,0.04);
    text-decoration: line-through;
    opacity: 0.6;
}

@media (max-width: 480px) {
    .dinos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dino-tag {
        font-size: 11px;
        padding: 8px 4px;
    }
}

/* ========== 操作区域 ========== */
.action-area {
    padding: 8px 0 24px;
    animation: fadeInUp 0.5s ease 0.25s both;
}

/* ========== 结果页 ========== */
.result-card {
    text-align: center;
    padding: 40px 24px;
    border-radius: 28px;
    animation: cardSlideIn 0.5s ease;
}

.result-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: resultPop 0.5s ease;
}

@keyframes resultPop {
    0% { transform: scale(0) rotate(-20deg); opacity: 0; }
    60% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.result-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 24px;
    text-shadow: 0 2px 8px rgba(255,182,193,0.2);
}

.result-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    animation: fadeInUp 0.5s ease 0.2s both;
}

.result-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(255,255,255,0.05);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.2s ease;
}

.result-stat-item:hover {
    background: rgba(255,182,193,0.08);
    border-color: rgba(255,182,193,0.15);
}

.result-stat-label {
    font-size: 14px;
    color: #8e8e93;
}

.result-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
}

.result-summary {
    padding: 20px;
    background: linear-gradient(135deg, rgba(255,182,193,0.1), rgba(221,160,221,0.08));
    border-radius: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(255,182,193,0.15);
    animation: fadeInUp 0.5s ease 0.3s both;
}

.result-summary-title {
    font-size: 14px;
    font-weight: 600;
    color: #8e8e93;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.result-summary-row:last-child {
    border-bottom: none;
}

.result-summary-label {
    font-size: 14px;
    color: #8e8e93;
}

.result-summary-value {
    font-size: 16px;
    font-weight: 700;
    color: #ff69b4;
    font-variant-numeric: tabular-nums;
}

/* ========== Toast 通知 - 液态玻璃 ========== */
.glass-toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(255,182,193,0.15) 0%, rgba(221,160,221,0.12) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000;
    white-space: nowrap;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
}

.glass-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.glass-toast.error {
    background: linear-gradient(135deg, rgba(255,69,58,0.2), rgba(255,105,180,0.12));
    border-color: rgba(255,69,58,0.3);
}

.glass-toast.success {
    background: linear-gradient(135deg, rgba(48,209,88,0.15), rgba(255,182,193,0.12));
    border-color: rgba(48,209,88,0.3);
}

/* ========== 下载区域 ========== */
.download-area {
    animation: fadeInUp 0.5s ease 0.35s both;
}

.download-area a {
    background: linear-gradient(135deg, rgba(255,182,193,0.1), rgba(221,160,221,0.08)) !important;
    border: 1px solid rgba(255,182,193,0.15) !important;
    transition: all 0.3s ease !important;
}

.download-area a:hover {
    background: linear-gradient(135deg, rgba(255,182,193,0.15), rgba(221,160,221,0.12)) !important;
    border-color: rgba(255,182,193,0.25) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,182,193,0.1);
}

/* ========== 响应式 ========== */
@media (max-width: 480px) {
    .page {
        padding: 0 16px 24px;
    }
    
    .login-card {
        padding: 32px 24px;
    }
    
    .logo-img {
        width: 88px;
        height: 88px;
        border-radius: 22px;
    }
    
    .app-title {
        font-size: 24px;
    }
    
    .dinos-list {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .currency-value {
        font-size: 18px;
    }
    
    .claim-value {
        font-size: 24px;
    }
}

/* ========== 滚动条 - 玻璃质感 ========== */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,182,193,0.3);
    border-radius: 4px;
}

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