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

body {
    font-family: 'Rajdhani', sans-serif;
    background: #0A0A0A;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
    background: #0A0A0A;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(0, 255, 136, 0.2);
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #00FF88, #8B00FF);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: 1.5rem;
    color: #0A0A0A;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.logo-text {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 900;
    color: #00FF88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Navigation */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #ffffff;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.nav-item:hover {
    background: rgba(0, 255, 136, 0.1);
    color: #00FF88;
    transform: translateX(5px);
}

.nav-item.active {
    background: linear-gradient(45deg, rgba(0, 255, 136, 0.2), rgba(139, 0, 255, 0.1));
    color: #00FF88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(45deg, #00FF88, #8B00FF);
}

.nav-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* Wallet Section */
.wallet-section {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 255, 136, 0.1);
}

.wallet-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(0, 255, 136, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 136, 0.1);
}

.wallet-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #00FF88, #8B00FF);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #0A0A0A;
}

.wallet-details h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: #00FF88;
}

.wallet-details p {
    font-size: 0.8rem;
    color: #888;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    background: radial-gradient(ellipse at center, rgba(139, 0, 255, 0.05) 0%, rgba(10, 10, 10, 1) 70%);
    min-height: 100vh;
}

/* Sections */
.app-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.app-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #00FF88, #8B00FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #888;
    font-weight: 400;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(139, 0, 255, 0.05) 100%);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.2);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(45deg, #00FF88, #8B00FF);
}

.stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: #00FF88;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.stat-label {
    font-size: 1rem;
    color: #888;
    font-weight: 500;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

/* Cards */
.card {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.8) 0%, rgba(30, 30, 30, 0.6) 100%);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.1);
}

.card-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
    background: linear-gradient(45deg, rgba(0, 255, 136, 0.05), rgba(139, 0, 255, 0.02));
}

.card-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: #00FF88;
    margin: 0;
}

/* Exchange Grid */
.exchange-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.exchange-card {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.8) 0%, rgba(30, 30, 30, 0.6) 100%);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.exchange-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.2);
}

.exchange-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: all 0.3s ease;
}

.exchange-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 255, 136, 0.2));
    transition: all 0.3s ease;
}

.exchange-logo:hover img {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 12px rgba(0, 255, 136, 0.4));
}

.exchange-name {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.exchange-status {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, #00FF88, #8B00FF);
    color: #0A0A0A;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(0, 255, 136, 0.6);
}

.btn-secondary {
    background: rgba(0, 255, 136, 0.1);
    color: #00FF88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.btn-secondary:hover {
    background: rgba(0, 255, 136, 0.2);
    transform: translateY(-2px);
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Forms */
.exchange-form {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 255, 136, 0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #00FF88;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #00FF88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.form-input::placeholder {
    color: #666;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Leaderboard */
.leaderboard-container {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.8) 0%, rgba(30, 30, 30, 0.6) 100%);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 16px;
    overflow: hidden;
}

.leaderboard-header {
    padding: 2rem;
    background: linear-gradient(45deg, rgba(0, 255, 136, 0.05), rgba(139, 0, 255, 0.02));
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.leaderboard-filters {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 8px;
    color: #00FF88;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(45deg, #00FF88, #8B00FF);
    color: #0A0A0A;
    border-color: transparent;
}

.leaderboard-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #00FF88;
}

.stat-text {
    font-size: 0.9rem;
    color: #888;
}

.leaderboard-table {
    overflow-x: auto;
}

.table-header {
    display: grid;
    grid-template-columns: 80px 1fr 120px 100px 120px;
    gap: 1rem;
    padding: 1rem 2rem;
    background: rgba(0, 255, 136, 0.05);
    font-weight: 600;
    color: #00FF88;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-body {
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-entry {
    display: grid;
    grid-template-columns: 80px 1fr 120px 100px 120px;
    gap: 1rem;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
    transition: all 0.3s ease;
}

.leaderboard-entry:hover {
    background: rgba(0, 255, 136, 0.05);
}

.rank {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    color: #00FF88;
}

.trader {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trader-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(45deg, #00FF88, #8B00FF);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: #0A0A0A;
}

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

.points {
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    color: #00FF88;
}

.trades {
    color: #888;
}

.rewards {
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    color: #FFD700;
}

/* Your Position */
.your-position {
    padding: 2rem;
    border-top: 1px solid rgba(0, 255, 136, 0.1);
    background: linear-gradient(45deg, rgba(0, 255, 136, 0.05), rgba(139, 0, 255, 0.02));
}

.position-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
}

.position-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.position-rank {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #00FF88;
}

.position-text {
    font-weight: 600;
    color: #ffffff;
}

.position-stats {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
}

.position-points {
    color: #00FF88;
    font-weight: 600;
}

.position-rewards {
    color: #FFD700;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(30, 30, 30, 0.9) 100%);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 16px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 255, 136, 0.2);
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-family: 'Orbitron', monospace;
    color: #00FF88;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #00FF88;
    background: rgba(0, 255, 136, 0.1);
}

.modal-body {
    padding: 2rem;
}

/* Wallet Options */
.wallet-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wallet-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.wallet-option:hover {
    background: rgba(0, 255, 136, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.2);
}

.wallet-icon {
    font-size: 2rem;
    width: 50px;
    text-align: center;
}

.wallet-info {
    flex: 1;
}

.wallet-name {
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    color: #00FF88;
    margin-bottom: 0.25rem;
}

.wallet-desc {
    font-size: 0.9rem;
    color: #888;
}

/* Notifications */
.notification-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid;
    backdrop-filter: blur(10px);
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.notification.success {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    color: #00FF88;
}

.notification.error {
    background: rgba(255, 0, 0, 0.1);
    border-color: rgba(255, 0, 0, 0.3);
    color: #ff4444;
}

.notification.info {
    background: rgba(0, 136, 255, 0.1);
    border-color: rgba(0, 136, 255, 0.3);
    color: #4488ff;
}

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

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #888;
}

.empty-state p {
    margin-bottom: 0.5rem;
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    animation: fadeIn 0.3s ease-out;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 255, 136, 0.2);
    border-top: 4px solid #00FF88;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.loading-overlay p {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    margin: 0;
    animation: pulse 2s ease-in-out infinite;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Button Loading States */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
    cursor: not-allowed;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn.loading:disabled {
    opacity: 0.7;
    transform: none;
}

/* Enhanced Button Animations */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
    transition: transform 0.1s;
}

/* Achievement Popup */
.achievement-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 350px;
    color: white;
}

.achievement-popup.show {
    transform: translateX(0);
    opacity: 1;
}

.achievement-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.achievement-icon {
    font-size: 2.5rem;
    animation: bounce 0.6s ease-in-out;
}

.achievement-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.achievement-info h4 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.achievement-info p {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.achievement-reward {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* API Mode Indicator */
.api-mode-indicator {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.api-mode-indicator.demo {
    background: var(--warning-color);
    color: white;
}

.api-mode-indicator.real {
    background: var(--success-color);
    color: white;
}

.api-mode-indicator:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Enhanced Exchange Card Animations */
.exchange-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.exchange-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.exchange-card.connected {
    border: 2px solid var(--success-color);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.exchange-card.connecting {
    border: 2px solid var(--warning-color);
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

/* Form Animations */
.exchange-form {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top;
    overflow: hidden;
}

.exchange-form[style*="display: none"] {
    max-height: 0;
    opacity: 0;
    transform: scaleY(0);
}

.exchange-form[style*="display: block"] {
    max-height: 500px;
    opacity: 1;
    transform: scaleY(1);
}

/* Input Focus Animations */
.form-input {
    transition: all 0.3s ease;
    position: relative;
}

.form-input:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.2);
}

/* Status Indicator Animations */
.exchange-status {
    transition: all 0.3s ease;
    position: relative;
}

.exchange-status::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--error-color);
    transition: all 0.3s ease;
}

.exchange-card.connected .exchange-status::before {
    background: var(--success-color);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.exchange-card.connecting .exchange-status::before {
    background: var(--warning-color);
    animation: pulse 1.5s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-left: 250px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .exchange-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .token-logo {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1rem;
        border-radius: 0;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
        text-align: center;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .exchange-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .exchange-card {
        padding: 1.5rem;
        text-align: center;
    }
    
    .exchange-logo {
        width: 50px;
        height: 50px;
        margin: 0 auto 1rem;
    }
    
    .token-logo {
        width: 36px;
        height: 36px;
    }
    
    .form-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 15px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 1rem;
        min-height: 44px; /* Better touch targets */
    }
    
    .loading-overlay p {
        font-size: 1rem;
        padding: 0 2rem;
    }
    
    .api-mode-indicator {
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 1rem;
        display: inline-block;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .exchange-card {
        padding: 1rem;
    }
    
    .exchange-logo {
        width: 40px;
        height: 40px;
    }
    
    .token-logo {
        width: 32px;
        height: 32px;
    }
    
    .form-input {
        padding: 10px 12px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* Additional mobile optimizations for very small screens */
@media (max-width: 360px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        order: 2;
        border-right: none;
        border-top: 1px solid rgba(0, 255, 136, 0.2);
    }
    
    .nav-menu {
        flex-direction: row;
        overflow-x: auto;
        gap: 0.25rem;
    }
    
    .nav-item {
        flex-direction: column;
        padding: 0.75rem 0.5rem;
        min-width: 80px;
        text-align: center;
        font-size: 0.8rem;
    }
    
    .nav-icon {
        margin-bottom: 0.25rem;
    }
    
    .wallet-section {
        display: none;
    }
    
    .main-content {
        order: 1;
        padding: 0.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .exchange-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1rem;
    }
    
    .exchange-card {
        padding: 1rem;
    }
    
    .exchange-logo {
        width: 40px;
        height: 40px;
    }
    
    .exchange-name {
        font-size: 1rem;
    }
    
    .notification-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .notification {
        min-width: auto;
    }
}

/* Contest Styles */
.contests-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contest-card {
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.contest-card:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.2);
}

.contest-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.contest-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: #00FF88;
    margin-bottom: 0.5rem;
}

.contest-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.contest-status.active {
    background: rgba(0, 255, 136, 0.2);
    color: #00FF88;
}

.contest-status.upcoming {
    background: rgba(255, 193, 7, 0.2);
    color: #FFC107;
}

.contest-status.ended {
    background: rgba(108, 117, 125, 0.2);
    color: #6C757D;
}

.contest-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.contest-info-item {
    text-align: center;
}

.contest-info-label {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.25rem;
}

.contest-info-value {
    font-weight: 600;
    color: #ffffff;
}

.contest-description {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.contest-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.contest-participants {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 255, 136, 0.1);
}

.participant-avatars {
    display: flex;
    gap: -0.5rem;
}

.participant-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00FF88, #8B00FF);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #0A0A0A;
    border: 2px solid #0A0A0A;
    margin-left: -0.5rem;
}

.participant-avatar:first-child {
    margin-left: 0;
}

.participant-count {
    font-size: 0.8rem;
    color: #888;
    margin-left: 0.5rem;
}

/* Form Row for Contest Creation */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.checkbox-label:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
}

.checkbox-label input[type="checkbox"] {
    accent-color: #00FF88;
}

/* Contest Timer */
.contest-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    color: #00FF88;
}

.timer-icon {
    font-size: 1rem;
}

/* Contest Leaderboard */
.contest-leaderboard {
    margin-top: 1rem;
}

.contest-leaderboard-header {
    display: grid;
    grid-template-columns: 40px 1fr 80px 80px;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    color: #00FF88;
    margin-bottom: 0.5rem;
}

.contest-leaderboard-row {
    display: grid;
    grid-template-columns: 40px 1fr 80px 80px;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin-bottom: 0.25rem;
    align-items: center;
}

.contest-rank {
    font-weight: 600;
    text-align: center;
}

.contest-rank.first {
    color: #FFD700;
}

.contest-rank.second {
    color: #C0C0C0;
}

.contest-rank.third {
    color: #CD7F32;
}

.contest-trader {
    font-weight: 500;
}

.contest-score {
    text-align: right;
    font-weight: 600;
}

.contest-prize {
    text-align: right;
    color: #00FF88;
    font-weight: 600;
}

/* Mobile Responsiveness for Contests */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .checkbox-group {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contest-info {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contest-actions {
        justify-content: center;
    }
    
    .contest-leaderboard-header,
    .contest-leaderboard-row {
        grid-template-columns: 30px 1fr 60px 60px;
        gap: 0.5rem;
        padding: 0.5rem;
        font-size: 0.7rem;
    }
}