/* TradingPro Main CSS File */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

/* Reset and Base Styles */
a, abbr, acronym, address, applet, article, aside, audio, b, big, blockquote, body, canvas, caption, center, cite, code, dd, del, details, dfn, div, dl, dt, em, embed, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, html, i, iframe, img, ins, kbd, label, legend, li, mark, menu, nav, object, ol, output, p, pre, q, ruby, s, samp, section, small, span, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, time, tr, tt, u, ul, var, video {
    border: 0;
    font: inherit;
    font-size: 100%;
    margin: 0;
    padding: 0;
    vertical-align: baseline;
}

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
    display: block;
}

body {
    line-height: 1;
}

ol, ul {
    list-style: none;
}

blockquote, q {
    quotes: none;
}

a:focus, a:hover {
    text-decoration: none;
}

html {
    overflow-x: hidden;
}

body, html {
    width: 100%;
}

/* Material Icons */
.material-icons-outlined {
    font-family: 'Material Symbols Outlined' !important;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24 !important;
}

.material-icons {
    word-wrap: normal;
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    direction: ltr;
    display: inline-block;
    font-family: 'Material Symbols Rounded';
    font-size: 24px;
    font-style: normal;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    font-weight: 400;
    letter-spacing: normal;
    line-height: 1;
    text-transform: none;
    white-space: nowrap;
}

/* Trading Specific Styles */
.trading-widget {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.trading-widget h3 {
    color: #1976d2;
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 2px solid #1976d2;
    padding-bottom: 0.5rem;
}

/* Chart Styles */
.chart-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #757575;
    font-size: 1.1rem;
}

/* Trading Controls */
.trading-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.control-group {
    flex: 1;
    min-width: 200px;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #424242;
}

.control-group select,
.control-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.control-group select:focus,
.control-group input:focus {
    outline: none;
    border-color: #1976d2;
}

/* Market Data Styles */
.market-data {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.market-item {
    background: linear-gradient(135deg, #f5f5f5, #ffffff);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #1976d2;
    transition: transform 0.3s;
}

.market-item:hover {
    transform: translateY(-2px);
}

.market-item .symbol {
    font-weight: 700;
    font-size: 1.1rem;
    color: #212121;
}

.market-item .price {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.market-item .change {
    font-size: 0.9rem;
    font-weight: 500;
}

.market-item .change.positive {
    color: #4caf50;
}

.market-item .change.negative {
    color: #f44336;
}

/* Portfolio Styles */
.portfolio-summary {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.portfolio-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.portfolio-stat {
    text-align: center;
}

.portfolio-stat .label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.portfolio-stat .value {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 768px) {
    .trading-controls {
        flex-direction: column;
    }
    
    .control-group {
        min-width: auto;
    }
    
    .market-data {
        grid-template-columns: 1fr;
    }
    
    .portfolio-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .trading-widget {
        padding: 1rem;
    }
    
    .portfolio-summary {
        padding: 1.5rem;
    }
    
    .portfolio-stats {
        grid-template-columns: 1fr;
    }
}

/* Animation Utilities */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

.slide-up {
    animation: slideUp 0.4s ease-out;
}

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

/* Loading States */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1976d2;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

.hidden { display: none; }
.visible { display: block; }

.flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }