/* Modern BitEx Global Styles - Updated for Mobile Visibility */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --accent: #f093fb;
    --bg-primary: #0a0e27;
    --bg-secondary: #151934;
    --bg-tertiary: #1e2439;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --border: #2d3748;
    --success: #48bb78;
    --warning: #f6ad55;
    --danger: #fc8181;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    animation: rotate 60s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background: rgba(21, 25, 52, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s;
    z-index: 1001;
}

.logo:hover {
    opacity: 0.8;
}

.logo-img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: -5px;
}

.desktop-nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.desktop-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s;
}

.desktop-nav a:hover {
    color: var(--primary);
}

.desktop-nav a:hover::after {
    width: 100%;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    position: relative;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    background: rgba(21, 25, 52, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0;
    z-index: 999;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.3s ease;
}

.mobile-nav.active {
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    border-left: 3px solid transparent;
    font-size: 1rem;
}

.mobile-nav-item:hover,
.mobile-nav-item:active {
    background: var(--bg-tertiary);
    color: var(--primary);
    border-left-color: var(--primary);
}

.mobile-nav-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.hero {
    padding: 4rem 0 2rem;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3rem 0 2rem;
    padding: 0 2rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: all 0.3s;
}

.step.active .step-number {
    background: var(--gradient);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

.step.completed .step-number {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.step.active .step-label {
    color: var(--primary);
}

.step-line {
    width: 120px;
    height: 2px;
    background: var(--border);
    margin: 0 1rem;
}

.step.active + .step-line {
    background: var(--gradient);
}

.swap-card {
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 3rem;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.step-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.step-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.coin-selection {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.swap-icon {
    display: flex;
    justify-content: center;
    margin: -0.5rem 0;
}

.swap-direction-btn {
    background: var(--gradient);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.swap-direction-btn:hover {
    transform: rotate(180deg);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    display: flex;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1.25rem;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    outline: none;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.currency-select {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    background: var(--bg-secondary);
    border-left: 2px solid var(--border);
    transition: all 0.3s;
    min-width: 140px;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.currency-select:hover {
    background: var(--bg-primary);
}

.currency-select:active {
    transform: scale(0.98);
}

.currency-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.currency-select span {
    font-weight: 700;
    font-size: 1.125rem;
    flex: 1;
    text-align: left;
}

.currency-select svg {
    flex-shrink: 0;
    transition: transform 0.3s;
}

.currency-select:active svg {
    transform: translateY(2px);
}

.input-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    padding: 0 0.25rem;
}

.exchange-info {
    background: var(--bg-tertiary);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-row span {
    color: var(--text-secondary);
}

.info-row strong {
    color: var(--text-primary);
    font-weight: 600;
}

.form-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.swap-summary {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.swap-summary h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.address-text {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    word-break: break-all;
    max-width: 200px;
    text-align: right;
}

.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.terms-check input[type="checkbox"] {
    margin-top: 0.25rem;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.terms-check label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.terms-check a {
    color: var(--primary);
    text-decoration: none;
}

.terms-check a:hover {
    text-decoration: underline;
}

.btn-primary {
    width: 100%;
    background: var(--gradient);
    color: white;
    border: none;
    padding: 1.25rem;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border);
    padding: 1.25rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--bg-primary);
    border-color: var(--primary);
}

.button-group {
    display: flex;
    gap: 1rem;
}

.button-group .btn-secondary {
    flex: 1;
}

.button-group .btn-primary {
    flex: 2;
}

.warning-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(246, 173, 85, 0.1);
    border: 1px solid var(--warning);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: var(--warning);
    font-size: 0.875rem;
}

.success-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.deposit-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.detail-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border);
}

.detail-card.highlight {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: var(--primary);
}

.detail-card label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.copy-field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.copy-field code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: var(--text-primary);
    word-break: break-all;
    font-weight: 600;
}

.copy-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.amount-display strong {
    font-size: 1.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.alert-info {
    display: flex;
    gap: 1rem;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.alert-info svg {
    flex-shrink: 0;
    color: var(--primary);
}

.alert-info strong {
    color: var(--primary);
    display: block;
    margin-bottom: 0.25rem;
}

.track-section, .faq-section {
    padding: 4rem 0;
}

.track-card {
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 3rem;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--border);
    text-align: center;
}

.track-card h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.track-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.track-form {
    display: flex;
    gap: 1rem;
}

.track-form input {
    flex: 1;
}

.track-form button {
    width: auto;
    padding: 1.25rem 2rem;
}

#trackResult {
    margin-top: 2rem;
}

.faq-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.faq-item {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.faq-item:hover {
    transform: translateY(-5px);
}

.faq-item h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.modal-overlay {
    position: absolute;
    inset: 0;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 24px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    animation: modalSlideIn 0.3s ease;
    position: relative;
    z-index: 1;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.5rem;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s;
    line-height: 1;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
}

.currency-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 1rem;
    -webkit-overflow-scrolling: touch;
}

.currency-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.currency-item:hover {
    background: var(--bg-tertiary);
}

.currency-item:active {
    background: var(--bg-primary);
    transform: scale(0.98);
}

.currency-item img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.currency-info {
    flex: 1;
}

.currency-info h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.currency-info p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    min-width: 320px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--primary);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* MOBILE RESPONSIVE STYLES */
@media (max-width: 768px) {
    .desktop-nav {
        display: none !important;
    }
    
    .hamburger-menu {
        display: flex !important;
    }
    
    .mobile-nav {
        display: block !important;
    }
    
    .logo-img {
        width: 40px;
        height: 40px;
    }
    
    .logo-text h1 {
        font-size: 1.25rem;
    }
    
    .tagline {
        font-size: 0.65rem;
    }
    
    .hero {
        padding: 2.5rem 0 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .progress-steps {
        padding: 0 0.5rem;
        margin: 2rem 0 1.5rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-label {
        font-size: 0.7rem;
    }

    .step-line {
        width: 40px;
        margin: 0 0.5rem;
    }

    .swap-card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .step-title {
        font-size: 1.5rem;
    }

    /* CRITICAL FIX: Stack input fields vertically on mobile */
    .input-wrapper {
        flex-direction: column;
    }

    .input-wrapper input {
        font-size: 1.25rem;
        padding: 1rem;
        border-bottom: 2px solid var(--border);
    }

    .currency-select {
        width: 100%;
        min-width: unset;
        padding: 1rem;
        border-left: none;
        border-top: 2px solid var(--border);
        justify-content: space-between;
    }

    .currency-select span {
        font-size: 1rem;
    }

    .currency-icon {
        width: 28px;
        height: 28px;
    }

    .exchange-info {
        padding: 1.25rem;
    }

    .info-row {
        font-size: 0.85rem;
        flex-wrap: wrap;
    }

    .modal-header {
        padding: 1.5rem;
    }

    .modal-header h3 {
        font-size: 1.25rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .currency-list {
        max-height: 350px;
    }

    .track-card {
        padding: 2rem 1.5rem;
    }

    .track-card h2 {
        font-size: 1.75rem;
    }

    .track-form {
        flex-direction: column;
    }

    .track-form button {
        width: 100%;
    }

    .faq-section h2 {
        font-size: 2rem;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group .btn-secondary,
    .button-group .btn-primary {
        flex: 1;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .toast-container {
        right: 1rem;
        left: 1rem;
        top: 1rem;
    }

    .toast {
        min-width: auto;
    }

    .copy-field code {
        font-size: 0.85rem;
    }

    .amount-display strong {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .step-label {
        display: none;
    }

    .step-line {
        width: 30px;
    }

    .swap-card {
        padding: 1.25rem;
    }

    .input-wrapper input {
        font-size: 1.125rem;
    }

    .currency-select {
        min-width: 100px;
        padding: 0.75rem;
    }
}
