/* Staking Page Styles */

/* Hero Section */
.staking-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.staking-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.staking-hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.staking-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.staking-subtitle {
    font-size: 1.25rem;
    color: #b8c5d6;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Wallet Connection */
.wallet-connection {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.wallet-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.wallet-status.connected {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

.wallet-status i {
    font-size: 1.25rem;
}

/* Dashboard */
.staking-dashboard {
    padding: 80px 0;
    background: #f8fafc;
    min-height: 100vh;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffd700, #ffed4e);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.stat-card .stat-icon i {
    font-size: 1.5rem;
    color: #1a1a2e;
}

.stat-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Staking Actions */
.staking-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.action-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -3px rgba(0, 0, 0, 0.1);
}

.action-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-card h3 i {
    color: #ffd700;
}

.action-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Input Groups */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
}

.input-wrapper input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.max-btn {
    margin-left: 0.5rem;
    padding: 0.875rem 1rem;
    background: #f3f4f6;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
}

.max-btn:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    min-width: 140px;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #1a1a2e;
    border-color: #ffd700;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffed4e, #ffd700);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -3px rgba(255, 215, 0, 0.3);
}

.btn-secondary {
    background: #6366f1;
    color: #ffffff;
    border-color: #6366f1;
}

.btn-secondary:hover:not(:disabled) {
    background: #4f46e5;
    border-color: #4f46e5;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #6366f1;
    border-color: #6366f1;
}

.btn-outline:hover:not(:disabled) {
    background: #6366f1;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-success {
    background: #22c55e;
    color: #ffffff;
    border-color: #22c55e;
}

.btn-success:hover:not(:disabled) {
    background: #16a34a;
    border-color: #16a34a;
    transform: translateY(-2px);
}

/* Rewards Info */
.rewards-info {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}

.reward-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.reward-item:not(:last-child) {
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0.5rem;
    padding-bottom: 1rem;
}

.reward-item span {
    color: #6b7280;
}

.reward-item strong {
    color: #1a1a2e;
    font-weight: 600;
}

/* Transaction History */
.transaction-history {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.transaction-history h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transaction-history h3 i {
    color: #ffd700;
}

.transaction-list {
    max-height: 400px;
    overflow-y: auto;
}

.no-transactions {
    text-align: center;
    color: #6b7280;
    padding: 2rem;
    font-style: italic;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.transaction-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.transaction-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.transaction-type {
    font-weight: 600;
    color: #1a1a2e;
}

.transaction-amount {
    color: #6b7280;
    font-size: 0.875rem;
}

.transaction-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.transaction-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

.transaction-hash {
    font-size: 0.75rem;
    color: #6366f1;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.transaction-hash:hover {
    color: #4f46e5;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-content {
    background: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-width: 300px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loadingText {
    color: #374151;
    font-weight: 500;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .staking-title {
        font-size: 2.5rem;
    }
    
    .staking-subtitle {
        font-size: 1.125rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .staking-actions {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .action-card {
        padding: 1.5rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .transaction-details {
        align-items: flex-start;
        width: 100%;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .input-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .max-btn {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .staking-hero {
        padding: 100px 0 60px;
    }
    
    .staking-title {
        font-size: 2rem;
    }
    
    .wallet-connection {
        gap: 1rem;
    }
    
    .wallet-status {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .stat-card .stat-icon {
        width: 50px;
        height: 50px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success/Error States */
.success-state {
    border-color: #22c55e !important;
    background: rgba(34, 197, 94, 0.05);
}

.error-state {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.05);
}

/* Custom Scrollbar */
.transaction-list::-webkit-scrollbar {
    width: 6px;
}

.transaction-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.transaction-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.transaction-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
