/* ==================== 质押页面样式 ==================== */

.stake-main {
    padding-top: 120px;
    min-height: calc(100vh - 200px);
    background: #f8f9fa;
}

/* ==================== 质押概览 ==================== */
.stake-overview {
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05) 0%, rgba(108, 92, 231, 0.02) 100%);
}

.overview-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.overview-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.overview-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
}

.card-content {
    flex: 1;
}

.card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.card-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* ==================== 质押内容区域 ==================== */
.stake-content {
    padding: 0 2rem 3rem;
}

.stake-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* ==================== 质押导航 ==================== */
.stake-nav {
    display: flex;
    border-bottom: 2px solid var(--light-bg);
    padding: 0 1rem;
}

.stake-nav-btn {
    flex: 1;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-bottom: 3px solid transparent;
}

.stake-nav-btn:hover {
    color: var(--primary-color);
    background: rgba(108, 92, 231, 0.05);
}

.stake-nav-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.stake-nav-btn i {
    font-size: 1.1rem;
}

/* ==================== 质押标签页 ==================== */
.stake-tab {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

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

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

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--light-bg);
}

.tab-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.tab-actions {
    display: flex;
    gap: 1rem;
}

.sort-select,
.filter-select {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-select:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ==================== 质押列表 ==================== */
.stake-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stake-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: #f8f9fa;
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.stake-item:hover {
    background: white;
    box-shadow: var(--shadow);
    transform: translateX(5px);
}

.stake-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    flex-shrink: 0;
}

.stake-info {
    flex: 1;
}

.stake-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stake-series {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.stake-details {
    display: flex;
    gap: 2rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.detail-item .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.detail-item .value.positive {
    color: var(--success-color);
}

.stake-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ==================== 质押池网格 ==================== */
.pool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.pool-card {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05) 0%, rgba(108, 92, 231, 0.02) 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(108, 92, 231, 0.1);
    transition: all 0.3s ease;
}

.pool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.pool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pool-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
}

.pool-info h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.pool-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pool-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pool-stat {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: white;
    border-radius: 10px;
}

.pool-stat .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.pool-stat .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pool-stat .value.positive {
    color: var(--success-color);
}

.pool-actions {
    text-align: center;
}

.pool-actions .btn-primary {
    width: 100%;
}

/* ==================== 收益表格 ==================== */
.earnings-table {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
}

.earnings-table table {
    width: 100%;
    border-collapse: collapse;
}

.earnings-table th,
.earnings-table td {
    padding: 1rem 1.5rem;
    text-align: left;
}

.earnings-table th {
    background: white;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--light-bg);
}

.earnings-table td {
    border-bottom: 1px solid var(--light-bg);
}

.earnings-table tr:hover {
    background: white;
}

.earning-type {
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.earning-type.daily {
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary-color);
}

.earning-type.bonus {
    background: rgba(253, 203, 110, 0.1);
    color: var(--warning-color);
}

.amount {
    font-weight: 700;
    color: var(--text-primary);
}

.amount.positive {
    color: var(--success-color);
}

.status {
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status.confirmed {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success-color);
}

/* ==================== 质押表单 ==================== */
.stake-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-primary);
    background: white;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.nft-selector {
    width: 100%;
}

.selected-nft {
    width: 100%;
    padding: 3rem;
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.selected-nft:hover {
    border-color: var(--primary-color);
    background: rgba(108, 92, 231, 0.05);
}

.placeholder {
    text-align: center;
    color: var(--text-secondary);
}

.placeholder i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.placeholder span {
    font-size: 1.1rem;
}

.help-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* 质押期限选项 */
.period-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-label:hover {
    border-color: var(--primary-color);
    background: rgba(108, 92, 231, 0.05);
}

.radio-label input {
    display: none;
}

.radio-mark {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.radio-mark::after {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.radio-label input:checked + .radio-mark {
    border-color: var(--primary-color);
}

.radio-label input:checked + .radio-mark::after {
    opacity: 1;
    transform: scale(1);
}

.period-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.period-info .period {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.period-info .apy {
    font-size: 1rem;
    font-weight: 700;
    color: var(--success-color);
}

/* 预估收益 */
.estimated-earnings {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.1) 0%, rgba(0, 184, 148, 0.05) 100%);
    border-radius: 12px;
    border: 1px solid rgba(0, 184, 148, 0.2);
}

.earning-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.earning-item .label {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.earning-item .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success-color);
}

/* 注意事项 */
.notice-box {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(253, 203, 110, 0.1);
    border-radius: 12px;
    border-left: 4px solid var(--warning-color);
}

.notice-box i {
    font-size: 1.5rem;
    color: var(--warning-color);
    flex-shrink: 0;
}

.notice-box ul {
    margin: 0;
    padding-left: 1.5rem;
}

.notice-box li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 表单操作 */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 2rem;
    border-top: 2px solid var(--light-bg);
}

.btn-primary {
    padding: 0.875rem 2rem;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.btn-secondary {
    padding: 0.875rem 2rem;
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ==================== 按钮样式 ==================== */
.btn-action-sm {
    padding: 0.6rem 1.25rem;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-action-sm:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

.btn-action-sm.danger:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .stake-item {
        flex-direction: column;
    }

    .stake-image {
        width: 100%;
        height: 200px;
    }

    .stake-details {
        flex-direction: column;
        gap: 1rem;
    }

    .stake-actions {
        flex-direction: row;
        width: 100%;
    }

    .stake-actions button {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .stake-nav {
        flex-direction: column;
    }

    .stake-nav-btn {
        border-bottom: none;
        border-left: 3px solid transparent;
        justify-content: flex-start;
    }

    .stake-nav-btn.active {
        border-bottom: none;
        border-left-color: var(--primary-color);
    }

    .tab-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .tab-actions {
        width: 100%;
        flex-direction: column;
    }

    .tab-actions select,
    .tab-actions button {
        width: 100%;
    }

    .pool-grid {
        grid-template-columns: 1fr;
    }

    .earnings-table {
        overflow-x: auto;
    }

    .earnings-table table {
        min-width: 600px;
    }

    .period-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions button {
        width: 100%;
    }
}
