/* KAI CHAIN - Interactive DeFi Styles */
:root {
    /* Core KAI Brand Colors */
    --core-bg: #1a0800;
    --core-surface: rgba(255,140,0,0.03);
    --core-accent: #ff6600;
    --core-accent-2: #ff8c00;
    --core-warm: #ffb347;
    --btc-orange: #f7931a;
    --flame-red: #ff4500;
    --muted: rgba(255,165,0,0.85);
    --glass: rgba(255,140,0,0.05);
    --text-primary: #ffcc80;
    --text-secondary: #ff8f50;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    
    /* Additional UI Colors */
    --card-bg: rgba(0, 0, 0, 0.6);
    --border: rgba(255, 165, 0, 0.2);
    --hover-bg: rgba(255, 140, 0, 0.1);
    --shadow: rgba(255, 107, 53, 0.2);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--core-bg) 0%, #2d1810 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 102, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(247, 147, 26, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 140, 0, 0.05) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundFloat 20s ease-in-out infinite;
}

@keyframes backgroundFloat {
    0%, 100% { opacity: 0.3; transform: translateY(0px); }
    50% { opacity: 0.6; transform: translateY(-20px); }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 100px;
}
.token-board ul {
    list-style: none;
    padding: 0;
}

.token-board li {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.token-board img {
    width: 24px;       /* Adjust image size */
    height: 24px;
    margin-right: 12px; /* Space between image and text */
    object-fit: contain;
}
/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    margin-bottom: 30px;
    backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 15px 25px;
    border: 1px solid var(--border);
}

.back-button {
    background: linear-gradient(135deg, var(--core-accent), var(--flame-red));
    border: none;
    padding: 12px 18px;
    border-radius: 15px;
    color: white;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    background: linear-gradient(135deg, var(--core-accent), var(--btc-orange));
    padding: 10px;
    border-radius: 12px;
    font-size: 18px;
    animation: pulse 2s infinite;
}

.logo-image {
    width: 24px;
    height: 24px;
    margin-left: 8px;
    vertical-align: middle;
    border-radius: 4px;
    object-fit: contain;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.header-actions {
    display: flex;
    gap: 10px;
}

.icon-btn {
    background: var(--glass);
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 16px;
}

.icon-btn:hover {
    background: var(--hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow);
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Profile Card */
.profile-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 140, 0, 0.05) 100%);
    padding: 30px;
    border-radius: 25px;
    text-align: center;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 140, 0, 0.1), transparent);
    animation: rotate 20s linear infinite;
    z-index: -1;
}

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

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(255, 107, 53, 0.3);
}

.qr-code {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--core-accent), var(--btc-orange));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.qr-pattern {
    width: 80%;
    height: 80%;
    background: 
        linear-gradient(45deg, transparent 30%, white 30%, white 70%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, white 30%, white 70%, transparent 70%);
    background-size: 20px 20px;
    opacity: 0.9;
    border-radius: 8px;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-handle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 6px;
}

.join-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-bottom: 15px;
}

.referral-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--success), #45a049);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 10px rgba(76, 175, 80, 0.5); }
    to { box-shadow: 0 0 20px rgba(76, 175, 80, 0.8); }
}

.card-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.action-btn {
    background: linear-gradient(135deg, var(--glass), var(--hover-bg));
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: linear-gradient(135deg, var(--hover-bg), var(--core-surface));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow);
}

/* Wallet Overview */
.wallet-overview {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 140, 0, 0.03) 100%);
    padding: 30px;
    border-radius: 25px;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.wallet-overview:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(255, 107, 53, 0.2);
}

.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.wallet-title {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.token-section {
    background: var(--glass);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.token-section:hover {
    background: var(--hover-bg);
    border-color: var(--core-accent);
}

.token-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.token-amount, .balance-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.token-time, .balance-usd {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Apps Section */
.apps-section {
    display: none;
}

.apps-section.active {
    display: block;
}

.apps-header {
    text-align: center;
    margin-bottom: 40px;
}

.apps-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--text-primary), var(--core-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.apps-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.app-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 140, 0, 0.05) 100%);
    padding: 25px;
    border-radius: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 140, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.app-card:hover::before {
    left: 100%;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(255, 107, 53, 0.3);
    border-color: var(--core-accent);
}

.app-icon {
    font-size: 32px;
    margin-bottom: 15px;
    display: block;
}

.app-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.app-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.5;
}

/* Bottom Section */
.bottom-section {
    display: grid;
    gap: 15px;
}

.bottom-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 140, 0, 0.03) 100%);
    padding: 20px;
    border-radius: 20px;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.bottom-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.2);
}

/* Navigation */
.navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 15px 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 15px;
}

.nav-item:hover {
    background: var(--hover-bg);
    transform: translateY(-2px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--core-accent), var(--flame-red));
    color: white;
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-label {
    font-size: 12px;
    font-weight: 500;
}

/* Sections */
.section {
    display: none;
    opacity: 0;
    transition: all 0.5s ease;
}

.section.active {
    display: block;
    opacity: 1;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .profile-card,
    .wallet-overview {
        padding: 20px;
    }
    
    .apps-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 10px;
    }
    
    .nav-label {
        font-size: 10px;
    }
    
    .nav-icon {
        font-size: 18px;
    }
    
    .profile-name {
        font-size: 20px;
    }
    
    .qr-code {
        width: 100px;
        height: 100px;
    }
}

/* Light Theme Support */
.light-theme {
    --core-bg: #f8f9fa;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --border: rgba(0, 0, 0, 0.1);
}

.light-theme body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e2e8f0 100%);
    color: var(--text-primary);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }

/* Loading Animations */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid var(--core-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Particle Animation */
@keyframes float {
    0% { transform: translateY(0); opacity: 0.6; }
    100% { transform: translateY(-50px); opacity: 0; }
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--core-bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--core-accent), var(--btc-orange));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--btc-orange), var(--flame-red));
}