/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Security Banner */
.security-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--bg-hover);
    border-radius: 20px;
    color: var(--text-muted);
    transition: all 0.3s;
}

.security-badge.verified {
    background: rgba(20, 241, 149, 0.15);
    color: var(--success);
    border: 1px solid var(--success);
}

.security-badge.verified .badge-text::after {
    content: 'Verified';
}

.security-badge.failed {
    background: rgba(255, 184, 0, 0.15);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.security-badge.failed .badge-text::after {
    content: 'Unverified';
}

.security-badge:not(.verified):not(.failed) .badge-text::after {
    content: 'Verifying...';
}

.security-badge .badge-text {
    font-weight: 500;
    font-size: 12px;
}

.security-badge .badge-text::after {
    content: '';
}

.security-badge svg {
    flex-shrink: 0;
}

.program-info {
    color: var(--text-secondary);
}

.program-info a {
    color: var(--accent-primary);
    text-decoration: none;
    font-family: monospace;
}

.program-info a:hover {
    text-decoration: underline;
}

.security-tip {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    cursor: help;
    transition: color 0.2s;
}

.security-tip:hover {
    color: var(--accent-primary);
}

@media (max-width: 500px) {
    .security-banner {
        flex-direction: column;
        gap: 8px;
    }
    .security-tip {
        display: none;
    }
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a25;
    --bg-hover: #252535;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    --accent-primary: #9945FF;
    --accent-secondary: #14F195;
    --accent-gradient: linear-gradient(135deg, #9945FF 0%, #14F195 100%);
    --success: #14F195;
    --warning: #FFB800;
    --error: #FF4545;
    --border: #2a2a3a;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 16px;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 8px;
}

.nav-tab {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-tab.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

@media (max-width: 700px) {
    header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .nav-tabs {
        justify-content: center;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 28px;
    font-weight: 700;
}

.logo-text {
    font-size: 24px;
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(153, 69, 255, 0.4);
}

.btn-success {
    background: var(--success);
    color: #000;
}

.btn-success:hover:not(:disabled) {
    background: #12d987;
    transform: translateY(-2px);
}

.btn-large {
    width: 100%;
    padding: 16px;
    font-size: 18px;
}

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

/* Hero */
.hero {
    text-align: center;
    margin-bottom: 50px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-sub {
    font-size: 12px;
    color: var(--text-muted);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
}

.card h2 {
    font-size: 22px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

@media (max-width: 800px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

/* Deposit Card */
.deposit-info {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

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

.info-row.highlight {
    color: var(--success);
    font-weight: 600;
}

.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-group input {
    width: 100%;
    padding: 20px;
    padding-right: 60px;
    font-size: 24px;
    font-weight: 600;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--accent-primary);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.input-suffix {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-weight: 600;
}

.quick-amounts {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.quick-btn {
    flex: 1;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.payout-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(20, 241, 149, 0.1);
    border: 1px solid var(--success);
    border-radius: 12px;
    margin-bottom: 20px;
}

.payout-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--success);
}

.disclaimer {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 16px;
}

/* Queue Card */
.your-position {
    background: var(--accent-gradient);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
}

.position-label {
    font-size: 14px;
    opacity: 0.8;
}

.position-value {
    font-size: 48px;
    font-weight: 700;
}

.position-entries {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 8px;
}

.queue-list {
    max-height: 400px;
    overflow-y: auto;
}

.queue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 10px;
}

.queue-item.is-you {
    border: 2px solid var(--accent-primary);
}

.queue-position {
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 40px;
}

.queue-address {
    font-family: monospace;
    color: var(--text-secondary);
    flex: 1;
    text-align: center;
}

.queue-amount {
    font-weight: 600;
    color: var(--success);
}

.queue-empty, .activity-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Activity Card */
.activity-list {
    max-height: 500px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 10px;
}

.solscan-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-hover);
    border-radius: 8px;
    color: var(--text-muted);
    transition: all 0.2s;
    flex-shrink: 0;
}

.solscan-link:hover {
    background: var(--accent-primary);
    color: white;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.activity-icon.deposit {
    background: rgba(153, 69, 255, 0.2);
}

.activity-icon.payout {
    background: rgba(20, 241, 149, 0.2);
}

.activity-details {
    flex: 1;
}

.activity-type {
    font-weight: 600;
    margin-bottom: 4px;
}

.activity-address {
    font-size: 12px;
    color: var(--text-muted);
    font-family: monospace;
}

.activity-amount {
    text-align: right;
}

.activity-amount .amount {
    font-weight: 600;
}

.activity-amount.positive .amount {
    color: var(--success);
}

.activity-amount.negative .amount {
    color: var(--accent-primary);
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* How It Works */
.how-it-works {
    margin-bottom: 40px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 700px) {
    .steps {
        grid-template-columns: 1fr;
    }
}

.step {
    display: flex;
    gap: 16px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
    font-size: 14px;
}

footer a {
    color: var(--accent-primary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.info {
    border-left: 4px solid var(--accent-primary);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Number input arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* How It Works Page */
.how-it-works-page {
    padding: 20px 0;
}

.how-it-works-page h1 {
    font-size: 42px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin-bottom: 12px;
}

.how-it-works-page .intro {
    text-align: center;
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 50px;
}

.explanation-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 50px;
}

@media (max-width: 700px) {
    .explanation-cards {
        grid-template-columns: 1fr;
    }
}

.exp-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    transition: transform 0.2s, border-color 0.2s;
}

.exp-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
}

.exp-icon {
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

.exp-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.exp-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.exp-card strong {
    color: var(--success);
}

/* Example Box */
.example-box {
    background: var(--bg-card);
    border: 2px solid var(--success);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 50px;
    text-align: center;
}

.example-box h3 {
    color: var(--success);
    font-size: 22px;
    margin-bottom: 20px;
}

.example-content {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.example-content p {
    font-size: 18px;
    color: var(--text-secondary);
}

.example-content strong {
    color: var(--text-primary);
}

/* FAQ Section */
.faq-section {
    margin-bottom: 50px;
}

.faq-section h2 {
    font-size: 28px;
    text-align: center;
    margin-bottom: 30px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
}

.faq-item h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-item.warning {
    background: rgba(255, 184, 0, 0.1);
    border-color: var(--warning);
}

.faq-item.warning h4 {
    color: var(--warning);
}

.faq-item.warning h4::before {
    content: '⚠ ';
}

/* CTA Box */
.cta-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}

.cta-box h3 {
    font-size: 28px;
    margin-bottom: 20px;
}

.cta-box .btn {
    max-width: 300px;
}
