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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #F0B90B 0%, #D4AF37 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

h1 {
    font-size: 3em;
    background: linear-gradient(135deg, #F0B90B 0%, #D4AF37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.header-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(212, 175, 55, 0.4));
}

.subtitle {
    color: #666;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.btn-connect {
    background: linear-gradient(135deg, #F0B90B 0%, #D4AF37 100%);
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-connect:hover {
    transform: scale(1.05);
}

.wallet-address {
    display: inline-block;
    margin-left: 15px;
    padding: 8px 15px;
    background: #f0f0f0;
    border-radius: 20px;
    font-family: monospace;
    font-size: 0.9em;
}

.network-status {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: #4caf50;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #F0B90B 0%, #D4AF37 100%);
    color: #000;
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2.5em;
}

.stat-content h3 {
    font-size: 0.9em;
    opacity: 0.8;
    margin-bottom: 8px;
    font-weight: bold;
}

.stat-value {
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-subtext {
    font-size: 0.85em;
    opacity: 0.7;
    font-weight: 600;
}

h2 {
    color: #D4AF37;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.balances {
    margin-bottom: 40px;
}

.balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.balance-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #F0B90B;
}

.balance-card h3 {
    color: #D4AF37;
    margin-bottom: 15px;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.balance-item:last-child {
    border-bottom: none;
}

.balance-item span:last-child {
    font-weight: bold;
    font-family: monospace;
}

.actions {
    margin-bottom: 40px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.action-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    transition: border-color 0.2s;
}

.action-card:hover {
    border-color: #F0B90B;
}

.action-card.emergency {
    border-color: #ff6b6b;
}

.action-card.emergency:hover {
    border-color: #ee5a52;
}

.action-card h3 {
    color: #333;
    font-size: 1.2em;
    margin-bottom: 10px;
}

.action-card p {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.btn-action {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #F0B90B;
    color: #000;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-action:hover {
    background: #D4AF37;
}

.btn-danger {
    background: #ff6b6b;
}

.btn-danger:hover {
    background: #ee5a52;
}

.btn-action:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.contracts {
    margin-bottom: 40px;
}

.contract-list {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.contract-item {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.contract-item:last-child {
    border-bottom: none;
}

.contract-item strong {
    display: inline-block;
    width: 200px;
    color: #D4AF37;
}

.contract-item a {
    color: #B8860B;
    text-decoration: none;
    font-family: monospace;
    font-size: 0.9em;
}

.contract-item a:hover {
    text-decoration: underline;
}

.info {
    margin-bottom: 40px;
}

.flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.flow-step {
    flex: 1;
    min-width: 150px;
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 2px solid #F0B90B;
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #F0B90B 0%, #D4AF37 100%);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    margin: 0 auto 10px;
}

.flow-step p {
    font-size: 0.9em;
    color: #666;
}

.flow-arrow {
    font-size: 2em;
    color: #F0B90B;
    font-weight: bold;
}

footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    padding: 20px;
}

footer a {
    color: white;
    text-decoration: underline;
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

.automation {
    margin-bottom: 40px;
}

.automation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.automation-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    text-align: center;
    transition: transform 0.2s;
}

.automation-card:hover {
    transform: translateY(-5px);
}

.automation-card.active {
    border-color: #4caf50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(69, 160, 73, 0.1) 100%);
}

.automation-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.automation-card h3 {
    color: #333;
    font-size: 1.3em;
    margin-bottom: 10px;
}

.automation-card p {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.status-badge {
    display: inline-block;
    padding: 6px 15px;
    background: #4caf50;
    color: white;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.v2-badge {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
}

.slippage-info {
    margin-top: 10px;
    font-size: 0.85em;
    color: #4caf50;
    font-weight: bold;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .stats-grid, .balance-grid, .action-grid {
        grid-template-columns: 1fr;
    }

    .flow {
        flex-direction: column;
    }

    .flow-arrow {
        transform: rotate(90deg);
    }

    .contract-item strong {
        display: block;
        margin-bottom: 5px;
    }
}
