/* Binance App Layout */
.binance-container {
    max-width: 1400px; /* Increased max-width for the overall container */
    margin: 0 auto;
    padding: var(--space-2xl);
}

.binance-header {
    text-align: center;
    padding: var(--space-4xl) 0;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.binance-title {
    font-size: var(--text-5xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-lg);
}

.binance-subtitle {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-2xl) auto;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 900px) 1fr; /* Max width for chart column, 1fr for token list */
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
    justify-content: center; /* Center the grid within the container */
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr; /* Adjust for smaller desktops */
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Chart Container */
.chart-container {
    background: var(--bg-card);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    height: 500px; /* Fixed height for the chart container */
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 900px; /* Explicit max-width for the container */
    margin: 0 auto; /* Center the container within its grid column */
}

.chart-container canvas {
    width: 100% !important; /* Force canvas to fill its parent */
    height: 100% !important; /* Force canvas to fill its parent */
    max-width: 100%;
    max-height: 100%;
}

/* Token List */
.token-list {
    background: var(--bg-card);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.subsection-title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-lg);
}

.token-cards {
    display: grid;
    gap: var(--space-md);
}

.token-card {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
}

.token-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.token-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
}

.token-header h3 {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    margin: 0;
}

.price-change {
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
}

.positive {
    color: var(--success-color);
}

.negative {
    color: var(--error-color);
}

.token-price {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
}

/* Token Details */
.token-details {
    grid-column: 1 / -1;
    background: var(--bg-card);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    margin-top: var(--space-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.token-details.active {
    opacity: 1;
    height: auto;
    padding: var(--space-xl);
    margin-top: var(--space-lg);
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.details-header h3 {
    font-size: var(--text-lg);
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: var(--text-xl);
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--text-primary);
}

.token-chart-container {
    height: 200px;
    margin-bottom: var(--space-lg);
}

.token-info {
    display: grid;
    gap: var(--space-sm);
}

.info-row {
    display: flex;
    justify-content: space-between;
}

.info-label {
    color: var(--text-muted);
}

.info-value {
    font-weight: var(--font-medium);
}