/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --bg-card: rgba(20, 20, 30, 0.6);
    --bg-card-hover: rgba(30, 30, 45, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --border: rgba(99, 102, 241, 0.2);
    --border-light: rgba(255, 255, 255, 0.1);
    --glow: rgba(99, 102, 241, 0.4);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    text-align: center;
}

.loader-circle {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

.loader-text {
    font-size: 1.2rem;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Particle Background */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-light);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-card);
    padding: 0.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-light);
}

.lang-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 0 20px var(--glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--glow);
}

.btn-primary.connected {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.btn-primary.connected:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-light);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 1;
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

/* Staking Header */
.staking-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 1.5rem;
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.staking-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.title-icon {
    font-size: 3rem;
}

.staking-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card.highlight {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-color: var(--primary);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-change {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.stat-change.positive {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

/* Section */
.section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.subsection-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Pools Grid */
.pools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;  /* 增加间距从 1.5rem 到 2.5rem，防止特效重叠 */
}

.pool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pool-card:hover::before {
    opacity: 1;
}

.pool-card:hover {
    /* transform: translateY(-8px); */ /* 禁用悬停位移，防止抖动 */
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.3);
}

.pool-card.popular {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.2);
}

.pool-card.premium {
    border-color: var(--warning);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.2);
}

.pool-ribbon {
    position: absolute;
    top: 1rem;
    right: -2rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 2.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    transform: rotate(45deg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.pool-ribbon.gold {
    background: var(--gradient-gold);
}

.pool-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.pool-name {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.token-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.5rem;
}

.pool-name h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.pool-type {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pool-badge {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    border: 1px solid var(--primary);
}

.pool-badge.flexible {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent);
    border-color: var(--accent);
}

.pool-badge.premium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border-color: var(--warning);
}

.pool-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pool-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pool-stat .label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pool-stat .value {
    font-weight: 600;
    color: var(--text-primary);
}

.pool-stat .apy {
    font-size: 1.25rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pool-btn {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.pool-btn:hover {
    /* transform: translateY(-2px); */ /* 禁用按钮悬停位移，防止抖动 */
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

/* My Staking Stats */
.my-staking-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.my-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.my-stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.my-stat-card.action {
    padding: 0;
    background: transparent;
    border: none;
}

.my-stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 0.75rem;
}

.my-stat-content {
    flex: 1;
}

.my-stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.my-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.action-btn {
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary);
    border-radius: 1rem;
    color: var(--primary-light);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-3px);
}

.action-btn.primary {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.action-btn.primary:hover {
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

/* My Positions */
.my-positions {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
}

.positions-table {
    width: 100%;
}

.table-header {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.table-body {
    min-height: 200px;
}

.position-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border-light);
    align-items: center;
    transition: background 0.3s ease;
}

.position-row:hover {
    background: rgba(99, 102, 241, 0.05);
}

.position-amount {
    font-weight: 600;
    color: var(--text-primary);
}

.position-status {
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
}

.position-status.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.position-status.unlocking {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.position-status.unlocked {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent);
}

.position-action-btn {
    padding: 0.5rem 1rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.position-action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.position-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-hint {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Referral Card */
.referral-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid var(--primary);
    border-radius: 1.5rem;
    padding: 2rem;
    position: relative;
}

.wallet-notice {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
    border: 1px solid var(--warning);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

.wallet-notice.hidden {
    display: none;
}

.wallet-notice-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.wallet-notice-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--warning);
}

.wallet-notice-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 5px rgba(245, 158, 11, 0.2);
    }
}

.referral-header h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.referral-header p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.referral-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.referral-stats {
    display: flex;
    gap: 2rem;
}

.referral-stat {
    text-align: center;
}

.referral-stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.referral-stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.referral-link {
    display: flex;
    gap: 1rem;
}

.referral-link input {
    flex: 1;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.referral-link input:disabled {
    background: rgba(20, 20, 30, 0.3);
    color: var(--text-secondary);
    cursor: not-allowed;
    font-style: italic;
    opacity: 0.7;
}

.referral-link input:not(:disabled):hover {
    border-color: var(--primary);
}

.copy-btn {
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 1rem;
    max-width: 400px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.close-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    font-size: 0.95rem;
}

.info-row:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 1.25rem;
    padding-right: 170px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    transition: border-color 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
}

.input-suffix {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.token-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.max-btn {
    padding: 0.5rem 1rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.max-btn:hover {
    transform: scale(1.05);
}

.input-info {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.estimate-rewards {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid var(--primary);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.estimate-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.estimate-value {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn.primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

.modal-btn.secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.modal-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.warning-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    border-radius: 0.75rem;
    padding: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.warning-icon {
    font-size: 1.5rem;
}

.unstake-list {
    margin-bottom: 2rem;
}

.unstake-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.unstake-info h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.unstake-detail {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.unstake-btn {
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.unstake-btn:hover {
    transform: scale(1.05);
}

/* Footer */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo img {
    width: 40px;
    height: 40px;
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .referral-body {
        flex-direction: column;
    }

    .table-header,
    .position-row {
        grid-template-columns: 1fr 0.8fr 0.8fr 1fr 1fr;
        font-size: 0.75rem;
    }

    .table-header > div:nth-child(3),
    .table-header > div:nth-child(4),
    .position-row > div:nth-child(3),
    .position-row > div:nth-child(4) {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .staking-title {
        font-size: 2rem;
    }

    .pools-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .referral-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .my-staking-stats {
        grid-template-columns: 1fr;
    }
}

/* ========== 演示数据样式 ========== */

/* 演示数据横幅 */
.demo-data-banner {
    background: linear-gradient(135deg, 
        rgba(251, 191, 36, 0.1), 
        rgba(245, 158, 11, 0.1));
    border: 2px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    animation: demoPulse 3s ease-in-out infinite;
}

@keyframes demoPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(251, 191, 36, 0.4);
    }
}

.demo-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.demo-icon {
    font-size: 1.5rem;
    animation: demoRotate 4s linear infinite;
}

@keyframes demoRotate {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-10deg) scale(1.1); }
    50% { transform: rotate(0deg) scale(1); }
    75% { transform: rotate(10deg) scale(1.1); }
}

.demo-text {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.demo-connect-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: none;
    border-radius: 8px;
    color: #1a1a2e;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

.demo-connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.5);
}

/* 演示数据行样式 */
.demo-row {
    position: relative;
    opacity: 0.9;
}

.demo-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
    border-radius: 4px 0 0 4px;
    opacity: 0.6;
}

.demo-row:hover {
    background: rgba(251, 191, 36, 0.05);
}

/* 演示标签 */
.demo-label {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 8px;
    background: linear-gradient(135deg, 
        rgba(251, 191, 36, 0.2), 
        rgba(245, 158, 11, 0.2));
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: labelGlow 2s ease-in-out infinite;
}

@keyframes labelGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(251, 191, 36, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(251, 191, 36, 0.5);
    }
}

/* 演示模式的统计卡片 */
.my-stat-card.demo-mode {
    position: relative;
    border: 2px solid rgba(251, 191, 36, 0.2);
    background: linear-gradient(135deg,
        rgba(251, 191, 36, 0.03),
        rgba(245, 158, 11, 0.03));
}

.my-stat-card.demo-mode::before {
    content: '🎭';
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 1.2rem;
    opacity: 0.3;
    animation: demoCardIcon 3s ease-in-out infinite;
}

@keyframes demoCardIcon {
    0%, 100% {
        transform: rotate(0deg) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: rotate(20deg) scale(1.2);
        opacity: 0.5;
    }
}

/* 演示禁用按钮 */
.demo-disabled {
    background: rgba(251, 191, 36, 0.1) !important;
    border-color: rgba(251, 191, 36, 0.3) !important;
    color: #fbbf24 !important;
    cursor: not-allowed !important;
}

/* 响应式 */
@media (max-width: 768px) {
    .demo-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .demo-text {
        font-size: 0.875rem;
    }

    .demo-connect-btn {
        width: 100%;
    }
}

/* ========== 推荐人模态框样式 ========== */
#referralModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#referralModal.active {
    opacity: 1;
}

#referralModal .modal-content {
    background: linear-gradient(135deg, rgba(20, 20, 40, 0.95), rgba(30, 30, 50, 0.95));
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(99, 102, 241, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#referralModal.active .modal-content {
    transform: scale(1);
}

#referralModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

#referralModal .modal-header h3 {
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 1.3rem;
    margin: 0;
}

#referralModal .close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#referralModal .close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: rotate(90deg);
}

/* 推荐人地址验证提示 */
#referrerValidation {
    font-size: 0.85rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#referrerValidation.error {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

#referrerValidation.success {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* 模态框按钮 */
.modal-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modal-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.modal-btn:hover::before {
    width: 300px;
    height: 300px;
}

.modal-btn span {
    position: relative;
    z-index: 1;
}

.modal-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.modal-btn.primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: 1px solid rgba(99, 102, 241, 0.5);
}

.modal-btn.primary:hover {
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.modal-btn.primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.modal-btn.primary:disabled:hover {
    box-shadow: none;
}

/* 推荐图标动画 */
.zeus-icon-referral {
    display: inline-block;
    animation: giftBounce 2s ease-in-out infinite;
}

@keyframes giftBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* 响应式设计 */
@media (max-width: 600px) {
    #referralModal .modal-content {
        max-width: 95%;
        padding: 1.5rem;
    }

    #referralModal .modal-header h3 {
        font-size: 1.1rem;
    }

    .modal-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ========== 推荐统计网格样式 ========== */
.referral-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.referral-stat-card {
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.8), rgba(20, 20, 40, 0.8));
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.referral-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #06b6d4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.referral-stat-card:hover {
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.referral-stat-card:hover::before {
    opacity: 1;
}

/* 卡片图标 */
.stat-card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
    display: inline-block;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* 卡片内容 */
.stat-card-content {
    margin-bottom: 0.5rem;
    width: 100%;
}

.stat-card-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.3rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-card-value.highlight {
    font-size: 1.3rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stat-card-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

.reward-rate {
    color: #10b981;
    font-weight: 700;
    font-size: 1rem;
}

/* 收益显示 */
.stat-card-earnings {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    width: 100%;
}

.earnings-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

.earnings-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: #10b981;
    white-space: nowrap;
}

/* 特殊卡片样式 */
.referral-stat-card.team-overview {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3)) !important;
    border-color: rgba(99, 102, 241, 0.5) !important;
    border-width: 3px !important;
}

.referral-stat-card.level-one {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.15));
    border-color: rgba(251, 191, 36, 0.3);
}

.referral-stat-card.level-two {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(14, 165, 233, 0.15));
    border-color: rgba(6, 182, 212, 0.3);
}

.referral-stat-card.total-rewards {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    border-color: rgba(16, 185, 129, 0.3);
}

/* 领取奖励按钮 */
.claim-rewards-btn {
    width: 100%;
    padding: 0.6rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.claim-rewards-btn::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 ease;
}

.claim-rewards-btn:hover::before {
    left: 100%;
}

.claim-rewards-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

.claim-rewards-btn:active {
    transform: scale(0.98);
}

.claim-rewards-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    transform: none;
}

.claim-rewards-btn:disabled:hover {
    box-shadow: none;
}

.btn-icon {
    font-size: 0.95rem;
    animation: bounceIcon 2s ease-in-out infinite;
}

@keyframes bounceIcon {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-2px) rotate(-5deg);
    }
    75% {
        transform: translateY(-2px) rotate(5deg);
    }
}

/* 推荐链接区域 */
.referral-link-section {
    background: rgba(20, 20, 40, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 1rem;
}

.referral-link-header {
    margin-bottom: 1rem;
}

.referral-link-header h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.referral-link-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.referral-link {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.referral-link input {
    flex: 1;
    padding: 1rem 1.5rem;
    background: rgba(26, 26, 46, 0.8);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    color: #fff;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

.referral-link input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.6);
}

.referral-link .copy-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.referral-link .copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.copy-icon {
    font-size: 1.2rem;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .referral-stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .referral-stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .stat-card-value {
        font-size: 1.3rem;
    }

    .stat-card-icon {
        font-size: 1.3rem;
    }

    .stat-card-label {
        font-size: 0.75rem;
    }

    .stat-card-desc {
        font-size: 0.65rem;
    }

    .referral-link {
        flex-direction: column;
    }

    .referral-link .copy-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .referral-stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.5rem;
    }

    .referral-stat-card {
        padding: 0.8rem;
    }

    .stat-card-value {
        font-size: 1.2rem;
    }

    .stat-card-icon {
        font-size: 1.2rem;
    }
}
/* CSS Version 31 - Updated 2025年11月13日 10:30:16 */
