@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #ff3b30;
    --primary-glow: rgba(255, 59, 48, 0.15);
    --primary-dark: #d63027;
    --success: #02c076;
    --danger: #f84960;
    --warning: #f0b90b;
    --bg-body: #ffffff;
    --bg-card: #ffffff;
    --text-main: #1e2329;
    --text-muted: #707a8a;
    --border: #eff2f5;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --glass: rgba(255, 255, 255, 0.8);
    --secondary: #ff3b30;
}

[data-theme="dark"] {
    --bg-body: #ffffff;
    --bg-card: #f8fafc;
    --text-main: #1e2329;
    --text-muted: #707a8a;
    --border: #eff2f5;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --glass: rgba(255, 255, 255, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s, color 0.3s;
}


.header {
    height: 72px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: fixed;
    top: 0 !important;
    left: 0;
    right: 0;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

body.dashboard-active .header {
    display: flex;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}


.main-container {
    max-width: 1100px;
    margin: 120px auto 40px;
    padding: 0 40px;
}


.p-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.balance-banner {
    background: linear-gradient(135deg, #ff3b30 0%, #ff7a00 100%);
    color: white;
    padding: 40px;
    border-radius: var(--radius);
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.market-table {
    width: 100%;
    border-collapse: collapse;
}

.market-table th {
    background: #fafafa;
    padding: 12px 24px;
    text-align: left;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.market-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    transition: background 0.2s ease;
}

.market-table tr:hover td {
    background: #f8fafc;
}

.coin-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.coin-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}


.btn-premium {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-premium:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-buy {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

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


.input-premium {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    background: #fff;
    transition: all 0.3s ease;
    color: var(--text-main);
    outline: none;
}

.input-premium:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}


.glass {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}


.alert {
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    animation: slideIn 0.4s ease;
}

.alert-success { background: #e6fffb; border: 1px solid #b7eb8f; color: #52c41a; }
.alert-danger { background: #fff1f0; border: 1px solid #ffa39e; color: #f5222d; }

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

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

@keyframes slideFromRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.animate-entrance {
    animation: fadeInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }


.menu-btn {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    gap: 5px;
    border-radius: 8px;
    transition: background 0.2s;
}

.menu-btn:hover {
    background: var(--primary-soft);
}

.menu-btn span {
    width: 20px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
}

.side-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: white;
    z-index: 2000;
    box-shadow: -10px 0 30px rgba(0,0,0,0.05);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 40px 24px;
}

.side-menu.active {
    right: 0;
}

.overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.2);
    display: none;
    z-index: 1500;
}

.overlay.active { display: block; }
