* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-hover: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
    --success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #2d3748;
    --text-light: #718096;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
}

.section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.section.hidden {
    display: none;
}

.hidden {
    display: none !important;
}

/* 登录卡片 */
.login-card {
    background: var(--card-bg);
    padding: 60px 40px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    text-align: center;
    animation: fadeInUp 0.6s ease;
}

/* 登录/注册标签 */
.login-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.tab {
    padding: 10px 30px;
    background: #f7fafc;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab:hover {
    background: #edf2f7;
}

.tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

/* 登录提示 */
.login-tip {
    margin-top: 15px;
    font-size: 13px;
    color: var(--text-light);
    font-style: italic;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.title {
    font-size: 36px;
    font-weight: 700;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 40px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    max-width: 300px;
    padding: 16px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    width: 100%;
    max-width: 300px;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.error {
    color: #e53e3e;
    font-size: 14px;
    margin-top: 10px;
    min-height: 20px;
}

/* 主界面 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 20px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
}

/* 为角色和挑战页面的header添加特殊样式 */
.header .btn-back {
    position: absolute;
    left: 30px;
    background: #e2e8f0;
    color: var(--text);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header .btn-back:hover {
    background: #cbd5e0;
}

.header .section-title {
    flex: 1;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
}

.header-title {
    flex: 1;
    text-align: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.welcome {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.streak-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.btn-logout {
    padding: 10px 24px;
    background: #e2e8f0;
    color: var(--text);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: #cbd5e0;
}

/* 主内容 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 每日提醒提示 */
.notification-reminder {
    background: linear-gradient(135deg, rgba(246, 211, 101, 0.15) 0%, rgba(253, 160, 133, 0.15) 100%);
    border-left: 4px solid #f6d365;
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.5s ease;
    position: relative;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reminder-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.reminder-text {
    flex: 1;
    font-size: 16px;
    color: var(--text);
    font-weight: 500;
}

.reminder-close {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-light);
    flex-shrink: 0;
}

.reminder-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text);
    transform: rotate(90deg);
}

/* 打卡卡片 */
.checkin-card {
    background: var(--card-bg);
    padding: 50px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    text-align: center;
    animation: fadeInUp 0.6s ease;
}

.checkin-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.checkin-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.checkin-status {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 30px;
}

.btn-checkin {
    position: relative;
    padding: 20px 60px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.btn-checkin:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(17, 153, 142, 0.3);
}

.btn-checkin:active:not(:disabled) {
    transform: translateY(0);
}

.btn-checkin:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-checkin:active .btn-effect {
    width: 300px;
    height: 300px;
}

.checkin-message {
    margin-top: 20px;
    font-size: 16px;
    min-height: 24px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* 个人信息卡片 */
.profile-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease;
}

.profile-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    text-align: center;
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 16px;
}

.avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.profile-basic {
    flex: 1;
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.level-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: white;
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.gold-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(246, 211, 101, 0.2) 0%, rgba(253, 160, 133, 0.2) 100%);
    padding: 12px 20px;
    border-radius: 12px;
}

.gold-icon {
    font-size: 20px;
}

.gold-amount {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 迷你统计网格 */
.stats-grid-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-item {
    background: #f7fafc;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: #edf2f7;
    transform: translateY(-2px);
}

.stat-label-mini {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.stat-value-mini {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

/* 升级区域 */
.upgrade-section {
    text-align: center;
}

.btn-upgrade {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-upgrade:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

.btn-upgrade:active:not(:disabled) {
    transform: translateY(0);
}

.btn-upgrade:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upgrade-icon {
    font-size: 20px;
}

.upgrade-text {
    flex: 1;
    text-align: left;
}

.upgrade-cost {
    font-size: 16px;
    font-weight: 600;
}

.upgrade-message {
    margin-top: 15px;
    font-size: 14px;
    min-height: 20px;
}

.stat-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-light);
    font-size: 14px;
}

/* 排行榜 */
.leaderboard {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.leaderboard-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    text-align: center;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #f7fafc;
    border-radius: 12px;
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.leaderboard-item:hover {
    background: #edf2f7;
    transform: translateX(5px);
}

.leaderboard-item.current-user {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid #667eea;
}

.rank {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 16px;
    margin-right: 15px;
    background: #e2e8f0;
    color: var(--text);
}

.rank.rank-1 {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: white;
}

.rank.rank-2 {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: white;
}

.rank.rank-3 {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    color: white;
}

.user-name {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.user-stats {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-streak {
    font-size: 14px;
    color: var(--text-light);
}

.user-streak span {
    font-weight: 700;
    color: #667eea;
}

.user-streak-icon {
    font-size: 16px;
}

/* 挑战按钮 */
.btn-challenge {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: var(--shadow);
}

.btn-challenge:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(240, 147, 251, 0.4);
}

.challenge-icon {
    font-size: 24px;
}

.challenge-text {
    flex: 1;
    text-align: left;
}

/* 导航按钮 */
.nav-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.btn-nav {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

.btn-nav:active {
    transform: translateY(0);
}

.nav-icon {
    font-size: 32px;
}

.nav-text {
    font-size: 14px;
}

/* 战斗容器 */
.battle-container {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease;
}

.battle-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    position: relative;
    gap: 20px;
    padding-top: 10px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.challenge-count {
    background: linear-gradient(135deg, rgba(246, 211, 101, 0.2) 0%, rgba(253, 160, 133, 0.2) 100%);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-back {
    position: absolute;
    left: 0;
    padding: 10px 20px;
    background: #e2e8f0;
    color: var(--text);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #cbd5e0;
}

.battle-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 战斗区域 */
.battle-arena {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 20px;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.fighter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 25px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    min-width: 200px;
}

.player-fighter {
    border: 2px solid #667eea;
}

.monster-fighter {
    border: 2px solid #f5576c;
}

.fighter:hover {
    transform: translateY(-5px);
}

.fighter-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f7fafc 0%, #e2e8f0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.fighter-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.fighter-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.fighter-stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f7fafc;
    border-radius: 8px;
    font-size: 14px;
}

.stat-label {
    font-weight: 500;
    color: var(--text-light);
}

.fighter-level {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.vs-badge {
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-style: italic;
}

/* 战斗控制 */
.battle-controls {
    text-align: center;
    margin-bottom: 30px;
}

.btn-battle-start {
    padding: 18px 50px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-battle-start:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(240, 147, 251, 0.4);
}

.battle-in-progress {
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #f5576c;
}

.battle-animation {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 战斗日志 */
.battle-log {
    background: #1a202c;
    padding: 25px;
    border-radius: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.log-title {
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

.log-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.log-entry {
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.log-start {
    background: rgba(102, 126, 234, 0.3);
    color: #90cdf4;
    font-weight: 600;
}

.log-round {
    background: rgba(128, 128, 128, 0.2);
    color: #a0aec0;
    font-style: italic;
    text-align: center;
}

.log-player {
    background: rgba(102, 126, 234, 0.2);
    color: #90cdf4;
}

.log-monster {
    background: rgba(245, 87, 108, 0.2);
    color: #fc8181;
}

.log-success {
    background: rgba(56, 239, 125, 0.2);
    color: #38ef7d;
    font-weight: 600;
}

.log-victory {
    background: rgba(246, 211, 101, 0.3);
    color: #f6d365;
    font-weight: 700;
    font-size: 16px;
}

.log-defeat {
    background: rgba(229, 62, 62, 0.3);
    color: #e53e3e;
    font-weight: 700;
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .login-card {
        padding: 40px 25px;
    }

    .title {
        font-size: 28px;
    }

    .login-tabs {
        margin-bottom: 25px;
    }

    .tab {
        padding: 8px 20px;
        font-size: 14px;
    }

    .login-tip {
        font-size: 12px;
    }

    .checkin-card {
        padding: 35px 20px;
    }

    .checkin-icon {
        font-size: 48px;
    }

    .checkin-title {
        font-size: 24px;
    }

    .btn-checkin {
        padding: 16px 40px;
        font-size: 18px;
    }

    .profile-card {
        padding: 20px 15px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .profile-basic {
        text-align: center;
    }

    .stats-grid-mini {
        grid-template-columns: 1fr;
    }

    .header {
        padding: 15px 20px;
    }

    .welcome {
        font-size: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 28px;
    }

    .user-stats {
        gap: 10px;
    }

    .user-streak {
        font-size: 12px;
    }

    .leaderboard {
        padding: 20px 15px;
    }

    .leaderboard-item {
        padding: 12px 15px;
    }

    .rank {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 24px;
    }

    .subtitle {
        font-size: 14px;
    }

    .checkin-card {
        padding: 30px 15px;
    }

    .btn-checkin {
        padding: 14px 30px;
        font-size: 16px;
    }
}

/* 角色卡片 */
.character-card {
    background: var(--card-bg);
    padding: 40px 30px 30px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease;
}

.character-content {
    padding: 30px 0 0 0;
}

.character-header {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 20px;
    margin-bottom: 30px;
}

/* 设置界面 */
.settings-section {
    background: var(--card-bg);
    padding: 35px;
    border-radius: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.settings-section:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.settings-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f7fafc;
}

.settings-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.settings-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.settings-form input[type="password"],
.settings-form input[type="email"] {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
    background: #f7fafc;
}

.settings-form input[type="password"]:focus,
.settings-form input[type="email"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.settings-btn {
    width: 100%;
    padding: 16px;
    margin-top: 10px;
    font-size: 18px;
}

.settings-message {
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
    min-height: 20px;
}

.notification-toggle {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    position: relative;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.toggle-label:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateX(5px);
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 56px;
    height: 30px;
    background: #cbd5e0;
    border-radius: 15px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(26px);
}

.toggle-text {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
}

.notification-tip {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
    text-align: center;
    padding: 12px 20px;
    background: #f7fafc;
    border-radius: 10px;
    border-left: 3px solid #667eea;
}

.character-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.character-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.character-name {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
}

.character-name h4 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.character-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.character-stats .stat-item {
    background: #f7fafc;
    padding: 25px 20px;
    border-radius: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.character-stats .stat-item:hover {
    background: #edf2f7;
    transform: translateY(-3px);
}

.character-stats .stat-icon {
    font-size: 36px;
    margin: 0;
}

.character-stats .stat-value {
    font-size: 32px;
    font-weight: 700;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.character-stats .stat-label {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

/* 战斗结果弹窗 */
.battle-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.battle-result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.battle-result-content {
    position: relative;
    background: white;
    padding: 50px 40px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.battle-result-emoji {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 0.6s ease;
}

.battle-result-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.battle-result-message {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.5;
}

.battle-reward {
    background: linear-gradient(135deg, rgba(246, 211, 101, 0.15) 0%, rgba(253, 160, 133, 0.15) 100%);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 30px;
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.battle-result-btn {
    padding: 16px 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.battle-result-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.battle-result-btn:active {
    transform: translateY(0);
}
