/* ==========================================================================
   CRYPTOBIT — Simple USD Trading Platform
   ========================================================================== */

:root {
    --bg-dark: #050511;
    --bg-darker: #02020a;
    --bg-card: #0f1123;
    --bg-card-hover: #151832;

    --primary: #7b2ff7;
    --secondary: #f107a3;
    --accent: #00d2ff;
    --gold: #f7931a;

    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --text-dim: #6b6b80;

    --success: #00ff88;
    --danger: #ff4d4d;
    --warning: #ffb800;

    --gradient: linear-gradient(135deg, #7b2ff7, #f107a3);
    --gradient-gold: linear-gradient(135deg, #f7931a, #ffb800);
    --gradient-green: linear-gradient(135deg, #00ff88, #00d2ff);

    --font-main: 'Inter', -apple-system, sans-serif;
    --section-padding: 100px 0;
    --container-width: 1250px;
    --border-radius: 16px;
    --border-radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; outline: none; border: none; }

::selection { background: var(--primary); color: white; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-darker); }
::-webkit-scrollbar-thumb { background: var(--gradient); border-radius: 10px; }

/* Layout */
.container {
    width: 92%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

.section { padding: var(--section-padding); position: relative; }
.section-sm { padding: 60px 0; }

.grid { display: grid; gap: 25px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-col { display: flex; flex-direction: column; }

.gap-10 { gap: 10px; } .gap-15 { gap: 15px; }
.gap-20 { gap: 20px; } .gap-30 { gap: 30px; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-green { color: var(--success); }
.text-red { color: var(--danger); }
.text-gold { color: var(--gold); }
.text-accent { color: var(--accent); }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    letter-spacing: -0.02em;
}
h1 { font-size: 3rem; }
h2 { font-size: 2.4rem; }
h3 { font-size: 1.55rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.05rem; }

p { color: var(--text-muted); margin-bottom: 15px; }

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gradient-text-gold {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.gradient-text-green {
    background: var(--gradient-green);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Header */
header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 18px 0;
    background: rgba(5, 5, 17, 0.85);
    backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}
header.scrolled { padding: 12px 0; background: rgba(5, 5, 17, 0.95); }

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    width: 100px;
    height: auto;
    
}
/* =========================================================
   FOOTER LOGO
   ========================================================= */
.logo1 {
    display: inline-block;
    width: 140px;
    height: auto;
    max-width: 100%;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.logo1 img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.logo1:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

/* If your logo is dark/black and footer is dark */
.logo1 img[alt="eagle"] {
    filter: brightness(0) invert(1);
}
.logo-icon {
    width: 32px; height: 32px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    -webkit-text-fill-color: white;
}

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 5px 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-main); }
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-buttons { display: flex; gap: 10px; align-items: center; }

.user-balance-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--success);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: white;
    background: transparent;
    cursor: pointer;
    padding: 5px 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(123, 47, 247, 0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(123, 47, 247, 0.6); }

.btn-buy {
    background: var(--gradient-green);
    color: #000;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.4);
}
.btn-buy:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 255, 136, 0.6); }

.btn-sell {
    background: linear-gradient(135deg, #ff4d4d, #f107a3);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 77, 77, 0.4);
}
.btn-sell:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255, 77, 77, 0.6); }

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--primary); }

.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 40px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* Cards */
.card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}
.card:hover { border-color: rgba(123, 47, 247, 0.3); background: var(--bg-card-hover); }

.card-icon {
    width: 55px; height: 55px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 18px;
    background: rgba(123, 47, 247, 0.15);
    color: var(--primary);
}
.card-icon.gold { background: rgba(247, 147, 26, 0.15); color: var(--gold); }
.card-icon.green { background: rgba(0, 255, 136, 0.15); color: var(--success); }
.card-icon.accent { background: rgba(0, 210, 255, 0.15); color: var(--accent); }

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    position: relative;
    background:
        radial-gradient(circle at 80% 20%, rgba(123, 47, 247, 0.15), transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(241, 7, 163, 0.1), transparent 50%);
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.05;
    margin-bottom: 25px;
}
.hero-content p { font-size: 1.1rem; margin-bottom: 30px; max-width: 550px; }
.hero-buttons { display: flex; gap: 15px; flex-wrap: wrap; margin-bottom: 40px; }

/* Trading Widget */
.trade-widget {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 30px;
    border: 1px solid rgba(123, 47, 247, 0.3);
    box-shadow: 0 30px 80px rgba(123, 47, 247, 0.25);
}

.trade-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.btc-live-price { font-size: 1.7rem; font-weight: 700; margin-bottom: 3px; }

.trade-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50px;
    padding: 5px;
    margin-bottom: 22px;
}

.trade-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: var(--transition);
    background: transparent;
}
.trade-tab.active.buy { background: var(--gradient-green); color: #000; }
.trade-tab.active.sell { background: linear-gradient(135deg, #ff4d4d, #f107a3); color: white; }

.trade-input-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-sm);
    padding: 14px 18px;
    margin-bottom: 14px;
}
.trade-input-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 5px;
}
.trade-input-group input {
    background: transparent;
    color: white;
    font-size: 1.15rem;
    font-weight: 600;
    width: 100%;
}
.trade-input-group input::placeholder { color: var(--text-dim); }

.trade-summary {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.trade-summary strong { color: var(--text-main); }

/* Market Table */
.market-table-wrapper {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
}

.market-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 750px;
}
.market-table thead { background: rgba(255, 255, 255, 0.02); }
.market-table th {
    padding: 18px 20px;
    text-align: left;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.market-table td {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.95rem;
}
.market-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.market-table tbody tr:last-child td { border-bottom: none; }

.coin-info { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.coin-icon {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}
.coin-icon.btc { background: #f7931a; }
.coin-icon.eth { background: #627eea; }
.coin-icon.sol { background: linear-gradient(135deg, #9945ff, #14f195); }
.coin-icon.ada { background: #0033ad; }
.coin-icon.bnb { background: #f3ba2f; color: #000; }
.coin-icon.xrp { background: #23292f; }

.coin-symbol { color: var(--text-dim); font-size: 0.8rem; font-weight: 400; }

.change-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}
.change-badge.up { background: rgba(0, 255, 136, 0.1); color: var(--success); }
.change-badge.down { background: rgba(255, 77, 77, 0.1); color: var(--danger); }

.action-buttons { display: flex; gap: 8px; }

/* Wallet cards */
.wallet-card {
    background: linear-gradient(135deg, rgba(123, 47, 247, 0.15), rgba(241, 7, 163, 0.08));
    border: 1px solid rgba(123, 47, 247, 0.3);
    border-radius: var(--border-radius);
    padding: 30px;
}
.wallet-card.gold {
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.15), rgba(255, 184, 0, 0.05));
    border-color: rgba(247, 147, 26, 0.3);
}
.wallet-card.green {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 210, 255, 0.05));
    border-color: rgba(0, 255, 136, 0.3);
}
.wallet-card h5 {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.wallet-card .balance { font-size: 2.1rem; font-weight: 700; margin-bottom: 8px; }
.wallet-card .balance-usd { font-size: 0.95rem; color: var(--text-muted); }

/* Order Form */
.order-form {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
}

.order-type-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 22px;
    gap: 30px;
}
.order-type-tab {
    padding: 12px 0;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    background: transparent;
}
.order-type-tab.active {
    color: var(--text-main);
    border-bottom-color: var(--primary);
}

/* Transactions */
.tx-list { display: flex; flex-direction: column; gap: 12px; }

.tx-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.tx-item:hover { border-color: rgba(123, 47, 247, 0.3); }

.tx-left { display: flex; align-items: center; gap: 15px; }
.tx-type-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.tx-type-icon.buy { background: rgba(0, 255, 136, 0.15); color: var(--success); }
.tx-type-icon.sell { background: rgba(255, 77, 77, 0.15); color: var(--danger); }

.tx-detail { font-size: 0.85rem; color: var(--text-dim); }
.tx-amount { font-weight: 700; font-size: 1rem; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}
.form-control::placeholder { color: var(--text-dim); }
.form-control:focus {
    border-color: var(--primary);
    background: rgba(123, 47, 247, 0.05);
}
textarea.form-control { resize: vertical; min-height: 120px; }

/* Page Header */
.page-header {
    padding: 160px 0 60px;
    text-align: center;
    background: radial-gradient(circle at 50% 0%, rgba(123, 47, 247, 0.15), transparent 60%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.page-header h1 { font-size: 2.8rem; margin-bottom: 15px; }
.page-header p { font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.breadcrumb a:hover { color: var(--primary); }

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.section-title h2 { font-size: 2.5rem; margin-bottom: 15px; }

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(123, 47, 247, 0.15);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

/* Stats */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 40px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 60px;
}
.stat-item {
    text-align: center;
    padding: 15px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.stat-item:last-child { border-right: none; }
.stat-item h3 {
    font-size: 2rem;
    margin-bottom: 5px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-item p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success { background: rgba(0, 255, 136, 0.1); border: 1px solid rgba(0, 255, 136, 0.3); color: var(--success); }
.alert-error { background: rgba(255, 77, 77, 0.1); border: 1px solid rgba(255, 77, 77, 0.3); color: var(--danger); }
.alert-info { background: rgba(0, 210, 255, 0.1); border: 1px solid rgba(0, 210, 255, 0.3); color: var(--accent); }

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 35px;
    max-width: 460px;
    width: 100%;
    border: 1px solid rgba(123, 47, 247, 0.3);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.modal-close {
    background: transparent;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
}

/* Footer */
footer {
    background: var(--bg-darker);
    padding: 70px 0 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 50px;
}
.footer-col h4 { color: white; margin-bottom: 20px; font-size: 1.05rem; }
.footer-col p { font-size: 0.95rem; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: var(--text-muted); font-size: 0.95rem; }
.footer-col ul li a:hover { color: var(--primary); padding-left: 5px; }

.social-links { display: flex; gap: 12px; margin-top: 20px; }
.social-links a {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}
.social-links a:hover { background: var(--gradient); color: white; transform: translateY(-3px); }

.footer-bottom {
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.footer-bottom p { color: var(--text-dim); font-size: 0.9rem; margin: 0; }
.footer-bottom-links { display: flex; gap: 25px; }
.footer-bottom-links a { color: var(--text-dim); font-size: 0.9rem; }
.footer-bottom-links a:hover { color: var(--primary); }

/* Responsive */
@media (max-width: 1024px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .hero-content h1 { font-size: 2.7rem; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root { --section-padding: 70px 0; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }
    h3 { font-size: 1.3rem; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%; left: 0;
        width: 100%;
        flex-direction: column;
        background: var(--bg-card);
        padding: 25px;
        border-top: 1px solid rgba(255,255,255,0.05);
        gap: 15px;
        align-items: flex-start;
    }
    .nav-links.active { display: flex; }
    .mobile-menu-btn { display: block; }

    .hero { padding-top: 120px; text-align: center; }
    .hero-content h1 { font-size: 2.1rem; }
    .hero-content p { margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }

    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .stats-bar { grid-template-columns: 1fr 1fr; padding: 25px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .trade-widget { padding: 22px; }
}

@media (max-width: 480px) {
    .container { width: 94%; }
    h1 { font-size: 1.7rem; }
    .hero-content h1 { font-size: 1.8rem; }
    .stats-bar { grid-template-columns: 1fr; }
    .btn { padding: 11px 22px; font-size: 0.9rem; }
}