* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #8B4513 0%, #D2691E 30%, #A0522D 70%, #654321 100%);
    min-height: 100vh;
    position: relative;
    color: #FFF8DC;
}

/* Mining grid background */
.mining-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background-image: 
        linear-gradient(rgba(139, 69, 19, 0.8) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 69, 19, 0.8) 1px, transparent 1px);
    background-size: 25px 25px;
    z-index: 1;
}

/* Scattered mining elements */
.mining-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.mining-element {
    position: absolute;
    font-size: 1.2rem;
    opacity: 0.3;
    animation: sparkle 3s infinite ease-in-out;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
}

/* Navigation */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(101, 67, 33, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #DAA520;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-link {
    color: #F5DEB3;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #FFD700;
}

.nav-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.wallet-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.connect-btn {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #654321;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.4);
}

.wallet-connected {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid #22c55e;
    color: #22c55e;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

/* Header Section */
.header-section {
    text-align: center;
    margin-bottom: 3rem;
}

.logo-container {
    margin-bottom: 1rem;
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #FFD700;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    animation: float 3s ease-in-out infinite;
}

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

.main-title {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #FFF8DC;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
    -webkit-text-stroke: 1px #8B4513;
}

.subtitle {
    font-size: 1.2rem;
    color: #F5DEB3;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: rgba(101, 67, 33, 0.8);
    backdrop-filter: blur(5px);
    border: 2px solid #DAA520;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FFD700, #DAA520, #B8860B, #FFD700);
    border-radius: 15px;
    z-index: -1;
    opacity: 0.7;
    animation: golden-glow 2s infinite;
}

@keyframes golden-glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #FFD700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #F5DEB3;
    font-weight: 600;
}

/* Staking Section */
.staking-section {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.staking-card {
    background: rgba(101, 67, 33, 0.9);
    backdrop-filter: blur(5px);
    border: 2px solid #DAA520;
    border-radius: 20px;
    padding: 2rem;
    position: relative;
}

.staking-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FFD700, #DAA520, #B8860B, #FFD700);
    border-radius: 20px;
    z-index: -1;
    animation: golden-glow 3s infinite;
}

.card-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: #FFD700;
    margin-bottom: 1rem;
    text-align: center;
}

.card-description {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #F5DEB3;
}

/* User Status */
.user-status {
    margin-bottom: 2rem;
}

.status-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(139, 69, 19, 0.5);
    border-radius: 10px;
    border: 1px solid #DAA520;
}

.status-staking {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid #22c55e;
    color: #22c55e;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
}

.status-not-staking {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #fca5a5;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
}

/* Balance Info */
.balance-info {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(139, 69, 19, 0.3);
    border-radius: 10px;
    border: 1px solid #DAA520;
}

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

.balance-label {
    color: #F5DEB3;
    font-weight: 600;
}

.balance-value {
    color: #FFD700;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.approve-btn {
    background: linear-gradient(45deg, #4A90E2, #357ABD);
    color: white;
    border: 2px solid #357ABD;
}

.approve-btn:hover {
    background: linear-gradient(45deg, #357ABD, #2E6DA4);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(74, 144, 226, 0.4);
}

.stake-btn {
    background: linear-gradient(45deg, #22c55e, #16a34a);
    color: white;
    border: 2px solid #16a34a;
}

.stake-btn:hover {
    background: linear-gradient(45deg, #16a34a, #15803d);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(34, 197, 94, 0.4);
}

.withdraw-btn {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    color: white;
    border: 2px solid #dc2626;
}

.withdraw-btn:hover {
    background: linear-gradient(45deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.4);
}

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

/* Transaction Status */
.tx-status {
    margin-top: 1rem;
}

.tx-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid #3b82f6;
    border-radius: 10px;
    color: #93c5fd;
}

.tx-success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid #22c55e;
    color: #22c55e;
}

.tx-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #fca5a5;
}

/* Loading Spinner */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-card {
    background: rgba(139, 69, 19, 0.6);
    border: 2px solid #DAA520;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-3px);
}

.info-card h3 {
    color: #FFD700;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.info-card p {
    color: #F5DEB3;
    line-height: 1.6;
}

/* Contract Info */
.contract-info {
    background: rgba(101, 67, 33, 0.8);
    border: 2px solid #DAA520;
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
}

.contract-info h3 {
    color: #FFD700;
    margin-bottom: 1rem;
    text-align: center;
    font-family: 'Fredoka One', cursive;
}

.contract-details {
    display: grid;
    gap: 1rem;
}

.contract-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(139, 69, 19, 0.3);
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.contract-label {
    color: #F5DEB3;
    font-weight: 600;
}

.contract-address {
    color: #FFD700;
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .container {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }

    .staking-card {
        padding: 1.5rem;
    }

    .balance-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .action-buttons {
        gap: 0.8rem;
    }

    .action-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contract-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .card-title {
        font-size: 1.5rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }
} 