/* Token Tool - Base Styles */

/* CSS Variables for easy theming */
:root {
    /* Colors */
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --secondary: #10b981;
    --background: #0a0a0a;
    --surface: #1a1a1a;
    --surface-light: #262626;
    --text: #ffffff;
    --text-dim: #a3a3a3;
    --border: rgba(255, 255, 255, 0.1);
    --error: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;

    /* Border radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Transitions */
    --transition: all 0.2s ease;

    /* Container */
    --container-max: 1200px;
}

/* Light mode support */
[data-theme="light"] {
    --background: #ffffff;
    --surface: #f3f4f6;
    --surface-light: #e5e7eb;
    --text: #111827;
    --text-dim: #6b7280;
    --border: rgba(0, 0, 0, 0.1);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin-bottom: var(--space-sm);
}

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

a:hover {
    color: var(--primary-light);
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Header */
.header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
    gap: var(--space-md);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    font-size: var(--font-size-xl);
    color: var(--text);
}

.logo:hover {
    color: var(--text);
    opacity: 0.8;
}

.logo-img {
    width: 32px;
    height: 32px;
}

/* Navigation */
.nav {
    display: flex;
    gap: var(--space-md);
}

.nav-link {
    color: var(--text-dim);
    /*font-weight: 500;*/
    font-size: var(--font-size-sm);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.desktop-nav {
    display: none;
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: var(--space-md);
    gap: var(--space-sm);
}

.mobile-nav.active {
    display: flex;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.menu-icon {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

.mobile-menu-toggle.active .menu-icon:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .menu-icon:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .menu-icon:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Main */
.main {
    flex: 1;
    padding: var(--space-2xl) 0;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.hero-title {
    margin-bottom: var(--space-md);
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--text);
}

.tool-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    color: var(--text);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.1);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.tool-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-sm);
}

.tool-description {
    color: var(--text-dim);
    font-size: var(--font-size-sm);
}

/* Features */
.features {
    margin-top: var(--space-2xl);
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.feature {
    text-align: center;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.feature h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-xs);
}

.feature p {
    color: var(--text-dim);
    font-size: var(--font-size-sm);
}

/* Footer */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: var(--space-lg) 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
}

.footer-link {
    color: var(--text-dim);
}

.footer-link:hover {
    color: var(--text);
}

/* Forms (for inner pages) */
.form-container {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--space-lg);
}

.label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
    color: var(--text-dim);
    font-size: var(--font-size-sm);
}

.input,
.select,
.textarea {
    width: 100%;
    padding: var(--space-sm);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: var(--font-size-base);
    font-family: inherit;
    transition: var(--transition);
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
}

.textarea {
    min-height: 100px;
    resize: vertical;
}

/* Add these to your styles.css */

/* Input group for quantity + symbol */
.input-group {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.input-suffix {
    padding: var(--space-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-dim);
    font-size: var(--font-size-sm);
    white-space: nowrap;
}

/* Radio group styling */
.radio-group {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
}

.radio-label input[type="radio"] {
    cursor: pointer;
}

/* Date/time input styling */
input[type="datetime-local"] {
    color-scheme: dark;
}

/* Token info display */
#tokenInfo {
    min-height: 1.2em;
}

#tokenInfo.success {
    color: var(--success);
}

#tokenInfo.error {
    color: var(--error);
}

/* Token type badge */
.token-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
    background: var(--primary);
    color: white;
    white-space: nowrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--radius);
    font-size: var(--font-size-base);
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--surface);
}

.btn-large {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-lg);
}

.btn-small {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-base);
}

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

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.card-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-md);
}

.chain-selector-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: var(--font-size-lg);
}

.chain-select {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-lg);
    cursor: pointer;
    transition: var(--transition);
    font-weight: normal;
}

.chain-select:hover {
    border-color: var(--primary);
}

.chain-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.text-small {
    font-size: var(--font-size-sm);
    font-weight: normal;
}

/* Alerts */
.alert {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius);
    margin-bottom: var(--space-md);
    font-size: var(--font-size-sm);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #86efac;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--surface-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Utilities */
.text-center { text-align: center; }
.text-dim { color: var(--text-dim); }
.text-small { font-size: var(--font-size-sm); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.hidden { display: none; }

/* Responsive */
@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .hero-title {
        font-size: var(--font-size-4xl);
    }
}

@media (max-width: 767px) {
    :root {
        --space-2xl: 3rem;
    }

    .header-content {
        padding: var(--space-sm) 0;
    }

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-lg);
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Token Type Selection */
.token-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.token-type-card {
    position: relative;
    cursor: pointer;
}

.token-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.token-type-content {
    padding: var(--space-md);
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.token-type-card input[type="radio"]:checked + .token-type-content {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.token-type-content h4 {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-xs);
}

/* Cost Display */
.cost-display {
    text-align: center;
    padding: var(--space-md);
    background: var(--surface-light);
    border-radius: var(--radius);
}

.cost-amount {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--primary);
    margin-bottom: var(--space-xs);
}

/* Notifications */
.notification-container {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-width: 400px;
}

.notification {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.notification-success {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.notification-error {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.notification-warning {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
}

.notification-info {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: var(--font-size-xl);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.notification-close:hover {
    color: var(--text);
}

.notification.fade-out {
    animation: slideOut 0.3s ease;
    opacity: 0;
}

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

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

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

::-webkit-scrollbar-track {
    background: var(--surface);
}

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

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

/* Responsive notifications */
@media (max-width: 767px) {
    .notification-container {
        left: var(--space-sm);
        right: var(--space-sm);
        top: var(--space-sm);
    }

    .notification {
        font-size: var(--font-size-sm);
    }
}

/* My Contracts Page Styles */
.contracts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.contract-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--surface-light);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.contract-item:hover {
    border-color: var(--primary);
    cursor: pointer;
}

.contract-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    flex: 1;
}

.contract-main {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.contract-name {
    font-weight: 500;
}

.contract-address {
    font-family: monospace;
    font-size: var(--font-size-sm);
    color: var(--text-dim);
}

.address {
    font-family: monospace;
    word-wrap: break-word;
}

.contract-details {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.contract-actions {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.contract-count {
    font-size: var(--font-size-sm);
    color: var(--text-dim);
    font-weight: normal;
}

.chain-selector-wrapper {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-base);
    font-weight: normal;
}

.chain-select {
    font-size: var(--font-size-base);
    padding: var(--space-xs) var(--space-sm);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .contract-item {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-md);
    }

    .contract-actions {
        justify-content: flex-end;
    }

    .nav-link {
        font-size: var(--font-size-base);
    }
}

/* Staking Page Styles */
.plan-item {
    padding: var(--space-md);
    background: var(--surface-light);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.plan-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

@media (max-width: 640px) {
    .plan-inputs {
        grid-template-columns: 1fr;
    }
}

.remove-plan-btn {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-sm);
}

/* Sale Page Styles */
.form-container-wide {
    max-width: 800px;
    margin: 0 auto;
}

.date-row,
.caps-row,
.limits-row,
.vesting-row,
.emergency-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
}

@media (max-width: 640px) {
    .date-row,
    .caps-row,
    .limits-row,
    .vesting-row,
    .emergency-row,
    .social-grid {
        grid-template-columns: 1fr;
    }
}

.fee-display {
    text-align: center;
    padding: 1rem;
}

.fee-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.fee-info {
    margin-bottom: 0.5rem;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 500;
    white-space: nowrap;
}

.status-success {
    background: rgba(34, 197, 94, 0.1);
    color: rgb(34, 197, 94);
}

.status-error {
    background: rgba(239, 68, 68, 0.1);
    color: rgb(239, 68, 68);
}

.status-info {
    background: rgba(59, 130, 246, 0.1);
    color: rgb(59, 130, 246);
}

.status-dim {
    background: var(--surface-light);
    color: var(--text-dim);
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--surface-light);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

/* Contract details improvements */
.contract-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.text-error {
    color: rgb(239, 68, 68);
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .contract-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .status-badge {
        margin-top: 0.25rem;
    }
}

/* Modal styles */
.modal {
    border: none;
    padding: 0;
    background: transparent;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    margin: auto; /* Centers the dialog */
    overflow: visible; /* Allow content to define overflow */
}

.modal::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: 100%; /* Full width of dialog */
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    color: var(--text); /* Ensure text color is set */
    position: relative; /* For absolute positioned children if needed */
}

.modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface); /* Ensure background */
    color: var(--text); /* Ensure text color */
}

.modal-header h2 {
    margin: 0;
    color: var(--text); /* Ensure heading color */
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-dim);
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    padding: var(--space-lg);
    overflow-y: auto;
    flex: 1;
    background: var(--surface); /* Ensure background */
    color: var(--text); /* Ensure text color */
}

#lockControls input[type="number"] {
    max-width: 150px;
}

#ownershipStatus {
    padding: var(--space-sm);
    background: var(--surface-light);
    border-radius: var(--radius);
}

/* Sale Admin Panel Enhancements */
.admin-panel .subsection {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.admin-panel .subsection:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.admin-panel .subsection h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-dim);
}

.progress {
    height: 20px;
    background: var(--surface-light);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: width 0.3s ease;
}

.status-badge.pulse {
    animation: pulse 2s infinite;
}

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

.text-lg {
    font-size: 1.25rem;
    font-weight: 600;
}

.text-mono {
    font-family: monospace;
}

.card.border-error {
    border-color: var(--error);
    border-width: 2px;
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group .input {
    flex: 1;
}

.logo-preview {
    padding: 1rem;
    background: var(--surface-light);
    border-radius: 0.5rem;
    text-align: center;
}

.logo-preview img {
    max-height: 100px;
    max-width: 200px;
    object-fit: contain;
}

.row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.col-6 {
    flex: 1;
}

@media (max-width: 768px) {
    .row {
        flex-direction: column;
    }
}

.text-bold {
    font-weight: 600;
}

/* Token Selector Modal - add to styles.css after existing modal styles (around line 1420) */
.token-selector-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.token-selector-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.token-selector-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.token-selector-header h3 {
    margin: 0;
    font-size: var(--font-size-xl);
    color: var(--text);
}

.token-selector-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-dim);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: var(--transition);
}

.token-selector-close:hover {
    background: var(--surface-light);
    color: var(--text);
}

.token-selector-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
}

.token-selector-item {
    padding: var(--space-md);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: var(--space-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.token-selector-item:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.token-info {
    flex: 1;
}

.token-name {
    font-weight: 500;
    color: var(--text);
    font-size: var(--font-size-base);
}

.token-symbol {
    font-size: var(--font-size-sm);
    color: var(--text-dim);
    margin-top: 0.25rem;
}

.token-address {
    font-family: monospace;
    font-size: var(--font-size-sm);
    color: var(--text-dim);
}

.token-selector-list .loading-spinner {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-dim);
}

.token-selector-list .no-tokens {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-dim);
}

.token-selector-list .error {
    text-align: center;
    padding: var(--space-xl);
    color: var(--error);
}

/* Additional utility classes that aren't in the main styles.css */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

/* Theme Toggle Button */
.theme-toggle {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text);
    margin-right: 1rem;
}

.theme-toggle:hover {
    background: var(--surface);
}

.wallet-section {
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: space-between;
}

/* Update icon based on theme */
[data-theme="light"] .theme-icon::before {
    content: "☀️";
}

[data-theme="dark"] .theme-icon::before {
    content: "🌙";
}

/* Mobile theme toggle */
.theme-toggle-mobile {
    background: none;
    border: none;
    text-align: left;
    width: 100%;
    cursor: pointer;
}

/* Language Switcher - integrated into wallet section */
.language-switcher {
    /* Remove fixed positioning */
    /* position: fixed;
    top: 20px;
    right: 20px; */
    /* z-index: 1000; */
}

.language-select {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    min-width: 80px;
    height: 36px; /* Match the theme toggle button height */
}

.language-select:hover {
    border-color: var(--primary);
}

.language-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Dark mode support */
.dark .language-select {
    background: var(--surface);
    color: var(--text);
}

/* Adjust wallet-section to accommodate the language switcher */
.wallet-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Optional: Make the select more compact */
.language-select option {
    padding: 0.25rem 0.5rem;
}


/* Fallback wallet connections dropdown menu */

/* Fallback Connect Button Styles */
#connect-fallback .dropdown {
    position: relative;
    display: inline-block;
}

#connect-fallback .btn {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#connect-fallback .btn:hover {
    background: var(--surface-light);
    border-color: var(--primary);
}

#connect-fallback .btn-connected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

#connect-fallback .btn-connected:hover {
    background: var(--primary-dark);
}

/* Dropdown arrow */
#connect-fallback .dropdown-toggle::after {
    content: '▼';
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

/* Dropdown menu */
#connect-fallback .dropdown-menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    min-width: 200px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    overflow: hidden;
}

/* Dropdown items */
#connect-fallback .dropdown-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.875rem;
}

#connect-fallback .dropdown-item:hover {
    background: var(--surface);
}

#connect-fallback .dropdown-item:not(:last-child) {
    border-bottom: 1px solid var(--border);
}


/* Click outside to close */
#connect-fallback .dropdown-menu.show {
    display: block !important;
}

.dropdown-item-info {
    padding: 0.75rem 1rem;
    text-align: center;
}

.dropdown-item-info small {
    color: var(--text-dim);
    font-size: 0.75rem;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0.25rem 0;
}

.dropdown-item-danger {
    color: var(--warning, #dc3545);
}

.dropdown-item-danger:hover {
    background: var(--warning, #dc3545);
    color: white;
}

/* Referral Page Specific Styles */
.earnings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.earnings-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.earnings-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chain-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chain-icon img {
    width: 24px;
    height: 24px;
}

.chain-icon-fallback {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary);
}

.earnings-info {
    flex: 1;
}

.chain-name {
    font-size: 0.875rem;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
}

.earnings-amount {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'SF Mono', Monaco, monospace;
}

.earnings-amount.has-earnings {
    color: var(--success);
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-dim);
    font-size: 1.1rem;
}

.info-box {
    background: var(--surface-light);
    border-left: 3px solid var(--primary);
    padding: 1rem;
    margin-top: 1rem;
    border-radius: var(--radius);
}

.info-box ul {
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
}

.info-box li {
    margin-bottom: 0.5rem;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.remove-link-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
}