:root {
    --bg-color: #0f1115;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --sidebar-bg: rgba(20, 20, 30, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #8247e5;
    /* Polygon Purple */
    --accent-hover: #9b66ef;
    --success-color: #27c485;
    --error-color: #ff4b4b;
    --font-family: 'Outfit', sans-serif;
}
/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
    border: 2px solid var(--bg-color);
    /* Creates padding effect */
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}
body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    font-family: var(--font-family);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}
/* Background Orbs */
.background-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: -1;
    animation: orbFloat 20s infinite alternate;
}
.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-color);
    top: 10%;
    left: 10%;
}
.orb-2 {
    width: 300px;
    height: 300px;
    background: #4facfe;
    bottom: 10%;
    right: 10%;
    animation-delay: -5s;
}
@keyframes orbFloat {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(40px, 60px);
    }
}
/* Main Container Layout */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    width: 95vw;
    max-width: 1400px;
    height: 90vh;
    max-height: 1000px;
}
/* Sidebar */
.sidebar {
    display: none;
    /* Hidden on mobile */
    width: 250px;
    background: var(--sidebar-bg);
    flex-direction: column;
    padding: 24px;
    border-right: 1px solid var(--glass-border);
}
.sidebar .logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
}
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.nav-item {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
    font-family: var(--font-family);
    width: 100%;
    text-align: left;
}
.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}
.network-status {
    margin-top: auto;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}
/* Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
/* Header */
.app-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}
.desktop-only {
    display: none;
}
/* Mobile Only Defaults */
.mobile-only {
    display: flex;
}
.mobile-only-flex {
    display: flex;
}
/* Views */
.view {
    display: none;
    flex: 1;
    padding: 24px;
    flex-direction: column;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}
.view.active {
    display: flex;
}
/* Centered Layouts (Auth, etc) */
.centered-view {
    justify-content: center;
    align-items: center;
}
.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    text-align: center;
}
.auth-card.wide {
    max-width: 600px;
}
.auth-card h1 {
    font-size: 2rem;
}
.auth-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}
/* Input Groups */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 20px 0;
}
input,
textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px;
    color: white;
    font-family: var(--font-family);
    font-size: 1rem;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    /* Fixes padding overflow */
}
input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}
/* Buttons */
.btn {
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    font-family: var(--font-family);
}
.btn-primary {
    background: var(--accent-color);
    color: white;
    /* Removed Neon Glow as requested */
    box-shadow: none;
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}
.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}
.btn-text {
    background: transparent;
    color: var(--text-secondary);
    margin-top: 8px;
}
/* Sidebar Visibility State */
.sidebar.hidden {
    display: none !important;
}
/* Gas Selector */
.gas-selector {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}
.gas-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 80px;
    font-family: var(--font-family);
}
.gas-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}
.gas-btn.active {
    border-color: var(--accent-color);
    background: rgba(130, 71, 229, 0.1);
    color: white;
}
.gas-price {
    font-size: 1.1rem;
    font-weight: 600;
}
.gas-price small {
    font-size: 0.7rem;
    font-weight: 400;
}
.loader-small {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: block;
    width: 100%;
    text-align: center;
}
/* Dashboard items */
.balance-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin-bottom: 24px;
    border: 1px solid var(--glass-border);
}
.balance-card h1 {
    font-size: 2.5rem;
    margin: 10px 0;
}
.quick-actions {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
}
.action-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: 0.2s;
}
.action-btn:hover .icon-circle {
    transform: scale(1.1);
}
/* Seed Grid */
.seed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}
.seed-word {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}
.blur-reveal .seed-word {
    filter: blur(4px);
    cursor: pointer;
    transition: 0.3s;
}
.blur-reveal .seed-word:hover {
    filter: blur(0);
}
/* Modals */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 100;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.modal {
    background: #1a1d24;
    width: 100%;
    padding: 24px;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Mobile Modal: Slide Up */
.modal-overlay.active .modal {
    transform: translateY(0);
}
.modal {
    transform: translateY(100%);
    border-radius: 24px 24px 0 0;
    align-self: flex-end;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}
/* Notifications */
#notification-area {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    pointer-events: none;
}
.toast {
    background: rgba(25, 25, 30, 0.9);
    backdrop-filter: blur(12px);
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--glass-border);
    animation: slideDown 0.3s ease;
    font-size: 0.9rem;
    pointer-events: all;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
/* --- RESPONSIVE BREAKPOINTS --- */
/* Mobile (Default above is for Mobile-ish, refining here) */
@media (max-width: 767px) {
    .glass-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    .sidebar {
        display: none;
    }
    .mobile-only {
        display: flex;
    }
    .desktop-only {
        display: none;
    }
}
/* Desktop */
@media (min-width: 768px) {
    .glass-container {
        width: 100vw;
        height: 100vh;
        max-width: none;
        max-height: none;
        border-radius: 0;
        flex-direction: row;
    }
    /* Make ticket form smaller on desktop */
    #view-ticket .auth-card {
        max-width: 500px;
        margin: 0 auto;
    }
    .sidebar {
        display: flex;
    }
    .app-header.mobile-only {
        display: none;
    }
    .dashboard-header.desktop-only {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
        border-bottom: 1px solid var(--glass-border);
        padding-bottom: 12px;
    }
    .user-pill {
        background: rgba(255, 255, 255, 0.1);
        padding: 8px 16px;
        border-radius: 20px;
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        font-size: 0.9rem;
    }
    .mobile-only {
        display: none;
    }
    .mobile-only-flex {
        display: none;
    }
    /* Actions usually in sidebar or header */
    /* Center Modals on Desktop */
    .modal-overlay {
        align-items: center;
        justify-content: center;
    }
    .modal.center-modal {
        width: 400px;
        border-radius: 24px;
        align-self: center;
        transform: scale(0.9);
        opacity: 0;
    }
    .modal-overlay.active .modal.center-modal {
        transform: scale(1);
        opacity: 1;
    }
    /* Adjust Notifications */
    #notification-area {
        top: 20px;
        right: 20px;
        left: auto;
        transform: none;
        align-items: flex-end;
        padding-right: 20px;
    }
}
/* Currency Selector Button */
/* Center the Swap View specifically */
#view-dashboard {
    justify-content: center;
    align-items: center;
    height: 100%;
}
.swap-container {
    width: 100%;
    max-width: 600px;
    /* Increased from default implicit small width */
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.currency-selector-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    /* Bigger buttons */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: 0.2s;
    font-family: var(--font-family);
    font-size: 0.95rem;
    min-width: 120px;
}
.currency-selector-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}
.crypto-logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}
.currency-name {
    flex: 1;
    font-weight: 600;
}
/* Swap Direction Button */
.swap-direction-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(130, 71, 229, 0.15);
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.swap-direction-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: rotate(180deg);
}
.swap-direction-btn:active {
    transform: rotate(180deg) scale(0.95);
}
/* Currency Picker Modal */
.currency-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
/* Custom Scrollbar for Currency List */
.currency-list::-webkit-scrollbar {
    width: 8px;
}
.currency-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}
.currency-list::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}
.currency-list::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}
.currency-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
}
.currency-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}
.currency-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}
.currency-info {
    flex: 1;
}
.currency-info .currency-ticker {
    font-weight: 600;
    font-size: 1rem;
}
.currency-info .currency-fullname {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.currency-network {
    font-size: 0.75rem;
    padding: 3px 8px;
    background: rgba(130, 71, 229, 0.2);
    border-radius: 6px;
    color: var(--accent-color);
}
/* FAQ Styles */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}
/* Custom Scrollbar for FAQ */
.faq-container::-webkit-scrollbar {
    width: 8px;
}
.faq-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}
.faq-container::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}
.faq-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}
.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}
.faq-item h4 {
    margin: 0;
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
    user-select: none;
}
.faq-item h4:hover {
    background: rgba(255, 255, 255, 0.05);
}
.faq-item h4 i {
    transition: transform 0.3s;
    font-size: 1.2rem;
}
.faq-item.active h4 i {
    transform: rotate(180deg);
}
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 20px;
}
.faq-item.active .faq-content {
    padding: 0 20px 20px 20px;
}
.faq-content p {
    margin: 10px 0;
    color: var(--text-secondary);
    line-height: 1.6;
}
.faq-content ul,
.faq-content ol {
    margin: 10px 0;
    padding-left: 25px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.faq-content li {
    margin: 6px 0;
}
/* Exchange Status Page */
.exchange-status-container {
    max-width: 700px;
    margin: 0 auto;
}
.status-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}
.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}
.status-badge.confirming {
    background: rgba(255, 167, 38, 0.2);
    color: #ffa726;
}
.status-badge.exchanging {
    background: rgba(66, 165, 245, 0.2);
    color: #42a5f5;
}
.status-badge.sending {
    background: rgba(156, 39, 176, 0.2);
    color: #9c27b0;
}
.status-badge.completed {
    background: rgba(39, 196, 133, 0.2);
    color: #27c485;
}
.status-badge.failed {
    background: rgba(255, 75, 75, 0.2);
    color: #ff4b4b;
}
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    border-radius: 10px;
    transition: width 0.5s ease;
}
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.info-row:last-child {
    border-bottom: none;
}
.info-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.info-value {
    color: white;
    font-weight: 500;
    word-break: break-all;
    text-align: right;
    max-width: 60%;
}
.tx-link {
    color: var(--accent-color);
    text-decoration: none;
    transition: 0.2s;
}
.tx-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}
.qr-placeholder {
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    font-size: 3rem;
    color: var(--text-secondary);
}
/* -------------------------------------------------------------------------- */
/* LIVE SUPPORT WIDGET */
/* -------------------------------------------------------------------------- */
.support-widget-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color), #7c3aed);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(130, 71, 229, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}
.support-widget-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(130, 71, 229, 0.6);
}
.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    border-radius: 50%;
    font-size: 0.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    border: 2px solid #1a1d24;
}
.support-chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: #1a1d24;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    /* animation handled by JS toggling class usually, but css transition works too */
}
.support-chat-window.hidden {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}
.chat-header {
    padding: 16px;
    background: rgba(130, 71, 229, 0.1);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
}
.chat-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}
.chat-msg.system {
    align-self: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    text-align: center;
    margin: 10px 0;
}
.chat-msg.user {
    align-self: flex-end;
    background: var(--accent-color);
    color: white;
    border-bottom-right-radius: 2px;
}
.chat-msg.agent {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-bottom-left-radius: 2px;
}
.chat-input-area {
    padding: 12px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 8px;
    background: #1a1d24;
}
.chat-input-area input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    padding: 10px 14px;
    border-radius: 20px;
    color: white;
    font-family: inherit;
    outline: none;
}
.chat-input-area button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}
.chat-input-area button:hover {
    background: var(--accent-hover);
}
@media (max-width: 768px) {
    .support-chat-window {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    .support-widget-btn {
        bottom: 20px;
        right: 20px;
    }
}