:root {
    --bg-dark: #050505;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent: #10b981;
    --accent-glow: rgba(16, 185, 129, 0.3);
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Dynamic Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(80px);
}

.blob {
    position: absolute;
    width: 40vw;
    height: 40vw;
    border-radius: 50%;
    opacity: 0.15;
    animation: move 20s infinite alternate;
}

.blob-1 {
    background: #4f46e5;
    top: -10%;
    left: -10%;
}

.blob-2 {
    background: #10b981;
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

.blob-3 {
    background: #7c3aed;
    top: 40%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes move {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.1); }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo span {
    background: linear-gradient(135deg, #10b981, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status-badge {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.green {
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5% 5rem;
}

/* Hero Section */
.portfolio-hero {
    margin-bottom: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.hero-content h1 {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.portfolio-value {
    font-size: 4.5rem;
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1;
}

.portfolio-change {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--accent);
}

.hero-stats {
    display: flex;
    gap: 3rem;
    text-align: right;
}

.stat-item .label {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.stat-item .value {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Grid & Cards */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

.bot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.bot-card {
    padding: 2.5rem;
    transition: all 0.4s ease;
}

.bot-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.bot-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.bot-icon {
    width: 48px;
    height: 48px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bot-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
}

.bot-card .description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.bot-status {
    display: flex;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.bot-status .label { color: var(--text-muted); font-size: 0.85rem; }
.bot-status .value { font-weight: 600; font-size: 0.85rem; }

/* Table Section */
.trades-container {
    padding: 2.5rem;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.refresh-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: #059669;
    box-shadow: 0 0 20px var(--accent-glow);
}

.scroll-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.95rem;
}

tr:last-child td { border-bottom: none; }

.side-buy { color: var(--accent); font-weight: 600; }
.side-sell { color: var(--danger); font-weight: 600; }

.status-tag {
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.tag-filled { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.tag-pending { background: rgba(255, 255, 255, 0.1); color: #fff; }

footer {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .portfolio-hero { flex-direction: column; align-items: flex-start; gap: 2rem; }
    .hero-stats { text-align: left; }
    .portfolio-value { font-size: 3.5rem; }
}
