* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: #1e293b;
    border-right: 1px solid #334155;
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo i {
    font-size: 2rem;
    color: #f59e0b;
}

.logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8fafc;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: #334155;
    color: #f8fafc;
}

.nav-link.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.nav-link i {
    font-size: 1.2rem;
    width: 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #334155;
}

.header-left h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.5rem;
}

.header-left p {
    color: #94a3b8;
    font-size: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    color: #64748b;
}

.search-bar input {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    color: #f8fafc;
    width: 300px;
    font-size: 0.9rem;
}

.search-bar input:focus {
    outline: none;
    border-color: #f59e0b;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notifications {
    position: relative;
    cursor: pointer;
}

.notifications i {
    font-size: 1.2rem;
    color: #94a3b8;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

.user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #334155;
}

/* Portfolio Summary */
.portfolio-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: #f59e0b;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header h3 {
    font-size: 1rem;
    color: #94a3b8;
    font-weight: 500;
}

.card-header i {
    font-size: 1.5rem;
    color: #f59e0b;
}

.card-value .amount {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.5rem;
}

.card-value .change {
    font-size: 0.9rem;
    font-weight: 500;
}

.change.positive {
    color: #10b981;
}

.change.negative {
    color: #ef4444;
}

/* Market Overview */
.market-overview {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f8fafc;
}

.view-controls {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    background: #334155;
    border: none;
    color: #94a3b8;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active,
.view-btn:hover {
    background: #f59e0b;
    color: white;
}

.crypto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.crypto-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.crypto-card:hover {
    border-color: #f59e0b;
    transform: translateY(-2px);
}

.crypto-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.crypto-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.crypto-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.crypto-name h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 0.25rem;
}

.crypto-name span {
    font-size: 0.9rem;
    color: #94a3b8;
}

.crypto-price {
    text-align: right;
}

.crypto-price .price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.25rem;
}

.crypto-price .change {
    font-size: 0.9rem;
    font-weight: 500;
}

.crypto-chart {
    height: 60px;
    background: #1e293b;
    border-radius: 8px;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

/* Recent Transactions */
.recent-transactions {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 1.5rem;
}

.view-all-btn {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: #d97706;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #0f172a;
    border-radius: 12px;
    border: 1px solid #334155;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
}

.transaction-icon.buy {
    background: #10b981;
}

.transaction-icon.sell {
    background: #ef4444;
}

.transaction-details h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 0.25rem;
}

.transaction-details p {
    font-size: 0.9rem;
    color: #94a3b8;
}

.transaction-time {
    margin-left: auto;
    font-size: 0.8rem;
    color: #64748b;
}

/* Trading Interface */
.trading-interface {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 1.5rem;
}

.trading-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.trading-form {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.5rem;
}

.trading-form h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0.75rem;
    color: #f8fafc;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #f59e0b;
}

.place-order-btn {
    width: 100%;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.place-order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

.order-book {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 1.5rem;
}

.order-book h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 1.5rem;
}

.order-book-content {
    /* Placeholder for styles */
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: slideInUp 0.5s ease;
}

.notification.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.notification.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

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

.crypto-grid.list-view {
    grid-template-columns: 1fr;
}

.market-table {
    overflow-x: auto;
}

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

.market-table th, .market-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #334155;
}

.market-table th {
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.9rem;
}

.trade-btn {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.trade-btn:hover {
    background: #d97706;
}

#portfolioContent .holdings-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.holding-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    align-items: center;
    gap: 1rem;
    background: #0f172a;
    border: 1px solid #334155;
    padding: 1rem 1.5rem;
    border-radius: 12px;
}

.holding-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.holding-info .crypto-icon {
    width: 40px;
    height: 40px;
    background: #f59e0b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.holding-item span {
    color: #94a3b8;
    font-size: 0.9rem;
}

.holding-item p {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f8fafc;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 1rem 0.5rem;
    }
    
    .sidebar .logo h2,
    .sidebar .nav-link span {
        display: none;
    }
    
    .main-content {
        margin-left: 80px;
    }
    
    .trading-panel {
        grid-template-columns: 1fr;
    }

    .holding-item {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 1rem;
    }
    
    .sidebar-nav ul {
        display: flex;
        gap: 1rem;
        overflow-x: auto;
    }
    
    .nav-item {
        margin-bottom: 0;
    }
    
    .nav-link {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
        text-align: center;
        min-width: 80px;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-bar input {
        width: 200px;
    }
    
    .portfolio-summary {
        grid-template-columns: 1fr;
    }
    
    .crypto-grid {
        grid-template-columns: 1fr;
    }

    .holding-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .holding-info {
        flex-direction: column;
        text-align: center;
    }
}

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

.content-area {
    animation: fadeInUp 0.6s ease;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #334155;
    border-top: 2px solid #f59e0b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
} 