/* Font Import Removed */

:root {
    --bg-dark: #0a0e1a;
    --card-bg: #131a2b;
    --accent-blue: #3d52d9;
    --accent-green: #00ffad;
    --text-white: #ffffff;
    --text-muted: #8e96a8;
    --border-color: rgba(255, 255, 255, 0.08);
    --tip-bg: rgba(0, 255, 173, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.4;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-dark);
    position: sticky;
    top: 0;
    z-index: 3000;
    border-bottom: 1px solid var(--border-color);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px; /* Comfortable space between button and menu */
}

.tp-logo-box {
    width: 32px;
    height: 32px;
    background: #1a2235;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tp-logo-box img { width: 20px; }
.logo-text h1 { font-size: 15px; font-weight: 700; }
.logo-text p { font-size: 10px; color: var(--text-muted); }

.btn-header-connect {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.menu-icon { font-size: 20px; color: var(--text-muted); cursor: pointer; }

/* Main Container */
.main-container {
    padding: 16px;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-alert {
    background: rgba(61, 82, 217, 0.1);
    border: 1px solid rgba(61, 82, 217, 0.2);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 12px;
}

.icon-shield { font-size: 20px; color: var(--accent-blue); }
.hero-alert h2 { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.hero-alert p { font-size: 11px; color: var(--text-muted); line-height: 1.5; }

/* Stats */
.stats-section { display: flex; flex-direction: column; gap: 16px; text-align: center; }
.stat-item .label { font-size: 12px; color: var(--text-muted); }
.stat-item .value { font-size: 32px; font-weight: 800; margin-top: 4px; }
.stat-item .value.green { color: var(--accent-green); }

/* Asset Card */
.asset-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
}

.section-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; }

.loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: var(--text-muted);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Asset Balance Display */
.asset-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.asset-row:last-child {
    border-bottom: none;
}

.asset-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.asset-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.asset-name {
    font-size: 14px;
    font-weight: 600;
}

.asset-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-white);
}

/* Address Box */
.address-box {
    background: #0f1423;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    cursor: pointer;
}

/* Yield Card */
.yield-card {
    background: linear-gradient(180deg, rgba(61, 82, 217, 0.15) 0%, rgba(61, 82, 217, 0.05) 100%);
    border: 1px solid rgba(61, 82, 217, 0.2);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.yield-card .rate { font-size: 44px; font-weight: 800; color: var(--accent-green); }
.yield-card .rate-sub { font-size: 13px; margin-bottom: 20px; }
.pushpins { text-align: left; display: flex; flex-direction: column; gap: 10px; font-size: 11px; color: var(--text-white); }

/* Progress */
.progress-section { margin: 10px 0; }
.progress-info { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 8px; }
.blue-text { color: var(--accent-blue); font-weight: 700; }
.progress-bar { height: 8px; background: #1a2235; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent-blue); }

/* Buttons */
.btn-primary {
    width: 100%;
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(61, 82, 217, 0.4);
}

.tips-box {
    background: var(--tip-bg);
    border: 1px solid rgba(0, 255, 173, 0.1);
    border-radius: 12px;
    padding: 16px;
    font-size: 12px;
    color: var(--accent-green);
    display: flex;
    gap: 10px;
}

/* Tiers Table */
.tiers-table { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; }
.table-header { background: rgba(61, 82, 217, 0.1); display: flex; justify-content: space-between; padding: 12px 16px; font-size: 12px; color: var(--accent-blue); font-weight: 700; }
.tier-row { display: flex; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border-color); font-size: 13px; }
.tier-row .yield { color: var(--accent-green); font-weight: 700; }

.records-container { background: var(--card-bg); border-radius: 16px; padding: 10px 0; }

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    padding: 24px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-title { text-align: center; font-size: 18px; margin-bottom: 20px; }
.rule-group { margin-bottom: 20px; }
.rule-title { color: var(--accent-blue); font-size: 15px; margin-bottom: 10px; }
.rule-group ul { list-style: none; padding-left: 10px; }
.rule-group li { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; position: relative; padding-left: 14px; }
.rule-group li::before { content: '•'; position: absolute; left: 0; color: var(--text-muted); }
.safety-blue-box { background: rgba(61, 82, 217, 0.1); border-left: 4px solid var(--accent-blue); padding: 16px; border-radius: 4px; font-size: 12px; margin-top: 20px; }
.modal-close-btn { width: 100%; background: var(--accent-blue); color: white; border: none; padding: 12px; border-radius: 10px; margin-top: 20px; font-weight: 700; }

/* Modals & Popups */

/* Menu Dropdown */
.menu-dropdown {
    position: fixed;
    top: -100%; /* Start off-screen */
    left: 0;
    width: 100%;
    background: rgba(15, 20, 35, 0.98);
    backdrop-filter: blur(10px);
    z-index: 2000;
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.menu-dropdown.active { top: 60px; } /* Drop down below header */

.menu-dropdown-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 500px;
    margin: 0 auto;
}

.menu-item {
    background: #1a2235;
    padding: 18px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
}

.menu-item:active { background: var(--accent-blue); }

.lang-switcher {
    display: flex;
    background: #111827;
    padding: 4px;
    border-radius: 12px;
    margin-top: 10px;
}

.lang-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.lang-btn.active {
    background: #374151;
    color: white;
}

/* DEEP LINK MODAL STYLES (MATCHING IMAGES) */
.deep-link-content {
    background: #1c222e;
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
}

.close-top-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}

.dl-title {
    color: #4a90ff;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.dl-subtitle {
    font-size: 13px;
    color: #8e96a8;
    margin-bottom: 30px;
}

.tp-selection-card {
    background: #252c3a;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 30px;
}

.tp-icon-wrapper {
    width: 64px;
    height: 64px;
    background: white;
    border-radius: 16px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tp-icon-wrapper img { width: 40px; }
.tp-selection-card h4 { font-size: 18px; margin-bottom: 6px; }
.tp-selection-card p { font-size: 12px; color: #8e96a8; }

.btn-dl-primary {
    width: 100%;
    background: linear-gradient(90deg, #1d4db5, #2b3b91);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    cursor: pointer;
}

.dl-security-hint {
    font-size: 11px;
    color: #8e96a8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* NOT DETECTED MODAL STYLES */
.not-detected-content {
    background: #1c222e;
    width: 85%;
    max-width: 320px;
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
}

.nd-icon { font-size: 40px; margin-bottom: 20px; }
.nd-text { font-size: 16px; font-weight: 700; line-height: 1.5; margin-bottom: 24px; }
.nd-btn {
    background: linear-gradient(90deg, #3d7eff, #3d52d9);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
