/* Homepage Styles */
.homepage-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, #158173 0%, #3949ab 100%);
    color: white;
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 8px 32px rgba(21, 129, 115, 0.3);
}

.welcome-content h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: 700;
}

.welcome-subtitle {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    opacity: 0.9;
}

.user-greeting {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1em;
}

.current-time {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.banner-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #ffd600;
    color: #000;
}

.btn-primary:hover {
    background: #ffed4e;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 214, 0, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #158173;
    border: 2px solid #158173;
}

.btn-outline:hover {
    background: #158173;
    color: white;
}

/* Overview Cards */
.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.1em;
    font-weight: 600;
}

.card-header svg {
    color: #158173;
}

.balance-amount {
    font-size: 2.2em;
    font-weight: 700;
    color: #158173;
    margin-bottom: 8px;
}

.balance-change {
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 16px;
}

.balance-change.positive {
    color: #10b981;
}

.balance-change.negative {
    color: #ef4444;
}

.trades-count {
    font-size: 2em;
    font-weight: 700;
    color: #3949ab;
    margin-bottom: 8px;
}

.trades-pnl {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 16px;
}

.trades-pnl.positive {
    color: #10b981;
}

.trades-pnl.negative {
    color: #ef4444;
}

.earnings-amount {
    font-size: 2em;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 8px;
}

.earnings-visits {
    font-size: 0.9em;
    color: #6b7280;
    margin-bottom: 16px;
}

.card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 8px 16px;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.performance-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.metric-label {
    color: #6b7280;
    font-size: 0.9em;
}

.metric-value {
    font-weight: 600;
    color: #158173;
}

/* Quick Actions Section */
.quick-actions-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    margin: 0;
    color: #1f2937;
    font-size: 1.8em;
    font-weight: 700;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.quick-action-item {
    background: white;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.quick-action-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: #158173;
}

.action-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #158173, #3949ab);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
}

.quick-action-item h3 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 1.1em;
    font-weight: 600;
}

.quick-action-item p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9em;
}

/* Market Overview Section */
.market-overview-section {
    margin-bottom: 40px;
}

.market-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.market-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.widget-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.1em;
    font-weight: 600;
}

.update-time {
    color: #6b7280;
    font-size: 0.8em;
}

.market-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.market-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
}

.market-item .symbol {
    font-weight: 600;
    color: #1f2937;
}

.market-item .price {
    font-weight: 600;
    color: #374151;
    text-align: right;
}

.market-item .change {
    font-size: 0.9em;
    font-weight: 600;
    text-align: right;
}

.market-item .change.positive {
    color: #10b981;
}

.market-item .change.negative {
    color: #ef4444;
}

/* Recent Activity Section */
.recent-activity-section {
    margin-bottom: 40px;
}

.activity-list {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
}

.activity-content {
    flex: 1;
}

.activity-desc {
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 4px;
}

.activity-time {
    color: #6b7280;
    font-size: 0.9em;
}

/* Trading Tools Section */
.trading-tools-section {
    margin-bottom: 40px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.tool-item {
    background: white;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.tool-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.tool-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3949ab, #667eea);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
}

.tool-item h3 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 1.1em;
    font-weight: 600;
}

.tool-item p {
    margin: 0 0 16px 0;
    color: #6b7280;
    font-size: 0.9em;
}

.tool-btn {
    background: #158173;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tool-btn:hover {
    background: #0f6b61;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .homepage-container {
        padding: 15px;
    }
    
    .welcome-banner {
        padding: 30px 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .welcome-content h1 {
        font-size: 2em;
    }
    
    .overview-cards {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .market-widgets {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .banner-actions {
        width: 100%;
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .welcome-content h1 {
        font-size: 1.8em;
    }
    
    .balance-amount {
        font-size: 1.8em;
    }
    
    .trades-count {
        font-size: 1.6em;
    }
    
    .earnings-amount {
        font-size: 1.6em;
    }
    
    .card-actions {
        justify-content: center;
    }
    
    .market-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 8px;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #158173;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
