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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

.search-controls-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 30px;
}

.stock-search {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
    width: fit-content;
}

.search-container {
    display: flex;
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
    width: fit-content;
}

.search-container input {
    width: 200px;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    color: #333;
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.stock-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #667eea;
}

.stock-info h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.stock-info p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.controls {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex-shrink: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}

.control-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.control-group select {
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    color: #333;
    transition: all 0.3s ease;
    cursor: pointer;
}

.control-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.chart-container {
    margin-bottom: 30px;
}

.chart-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.info-card h3 {
    color: #333;
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 6px 0;
    color: #666;
    font-size: 0.9rem;
    position: relative;
    padding-left: 20px;
}

.info-card li::before {
    content: "•";
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-card h4 {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card span {
    color: #333;
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        min-width: auto;
    }
    
    .main-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .left-column {
        flex: none;
    }
    
    .right-column {
        flex: none;
        min-width: auto;
    }
    
    .news-container {
        position: static;
    }
    
    .chart-container {
        grid-template-columns: 1fr;
    }
    
    .stats-panel {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-panel {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .header p {
        font-size: 1rem;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Chart canvas styling */
#lineChart {
    max-width: 100%;
    height: auto;
}

/* Text list styling */
.text-list-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    margin-top: 30px;
}

.text-list-container h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.text-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.text-list::-webkit-scrollbar {
    width: 8px;
}

.text-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.text-list::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 4px;
}

.text-list::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

.text-entry {
    padding: 12px 16px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    border-left: 4px solid rgba(102, 126, 234, 0.8);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #333;
    transition: all 0.3s ease;
}

.text-entry:hover {
    background: rgba(102, 126, 234, 0.15);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.text-entry .date {
    font-weight: 600;
    color: #667eea;
    margin-right: 12px;
}

.text-entry .title {
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.text-entry .change {
    font-weight: 600;
    font-size: 0.9rem;
}

.text-entry .change.positive {
    color: #22c55e;
}

.text-entry .change.negative {
    color: #ef4444;
}

.text-entry .details {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}

.no-data {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* Two-column layout */
.main-content {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.left-column {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.right-column {
    flex: 1;
    min-width: 350px;
}

/* News container styling */
.news-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    margin-top: 0;
    height: 600px;
    position: sticky;
    top: 20px;
}

.news-container h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.news-list {
    height: 520px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-list::-webkit-scrollbar {
    width: 8px;
}

.news-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.news-list::-webkit-scrollbar-thumb {
    background: rgba(255, 99, 132, 0.5);
    border-radius: 4px;
}

.news-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 99, 132, 0.7);
}

.news-entry {
    padding: 12px 16px;
    background: rgba(255, 99, 132, 0.1);
    border-radius: 8px;
    border-left: 4px solid rgba(255, 99, 132, 0.8);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #333;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-entry:hover {
    background: rgba(255, 99, 132, 0.15);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(255, 99, 132, 0.2);
}

.news-date {
    font-weight: 600;
    color: #ff6384;
    margin-bottom: 4px;
    font-size: 0.54rem;
}

.news-title {
    color: #555;
    margin-bottom: 4px;
    font-size: 0.57rem;
    line-height: 1.4;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.news-title-text {
    flex: 1;
    word-wrap: break-word;
}

.news-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 99, 132, 0.1);
}

.news-item:last-child {
    border-bottom: none;
}

.news-link {
    font-size: 0.51rem;
    color: #ff6384;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 8px;
}

.news-link:hover {
    text-decoration: underline;
    color: #e91e63;
} 