/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

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

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    display: flex;
    align-items: center;
    min-height: 100vh;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.5;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

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

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.chart-preview {
    width: 200px;
    height: 200px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.chart-preview i {
    font-size: 4rem;
    opacity: 0.8;
}

/* Sections */
.section {
    padding: 80px 0;
}

.bg-light {
    background-color: #f8f9fa;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.block-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

/* Overview Grid */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.overview-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.overview-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.card-icon i {
    font-size: 1.5rem;
    color: white;
}

.overview-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.overview-card p {
    color: #6c757d;
    line-height: 1.6;
}

/* Analysis Blocks */
.analysis-block {
    margin-bottom: 4rem;
}

.chart-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.analysis-chart {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.chart-item {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.chart-description {
    margin-top: 1.5rem;
    color: #6c757d;
    line-height: 1.7;
    font-size: 1rem;
}

/* Interactive Charts */
.interactive-chart-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    margin: 2rem 0;
}

/* TSM Focus Section */
.tsm-overview {
    margin-bottom: 3rem;
}

.company-header {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.company-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #6c757d;
    margin-top: 1rem;
}

.key-metrics {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.metric-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Reasons Grid */
.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.reason-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.reason-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.reason-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.reason-icon i {
    color: white;
    font-size: 1.2rem;
}

.reason-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.reason-card p {
    color: #6c757d;
    line-height: 1.6;
}

/* LSTM Section */
.lstm-intro {
    margin-bottom: 3rem;
}

.lstm-explanation {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.lstm-text p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: #6c757d;
}

.architecture-diagram {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.gate span {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gate p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Model Details */
.model-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.spec-list {
    list-style: none;
    margin-top: 1rem;
}

.spec-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
    color: #6c757d;
}

.spec-list li:last-child {
    border-bottom: none;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.metric-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.metric-name {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Insights Grid */
.insights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.insight-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.insight-card.positive {
    border-left: 5px solid #28a745;
}

.insight-card.negative {
    border-left: 5px solid #dc3545;
}

.insight-card h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.insight-card ul {
    list-style: none;
}

.insight-card li {
    padding: 0.5rem 0;
    color: #6c757d;
    position: relative;
    padding-left: 1.5rem;
}

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

/* Conclusion Section */
.conclusion-summary {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.summary-text {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #6c757d;
    margin-top: 1rem;
}

.findings-section {
    margin-bottom: 3rem;
}

.findings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.finding-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.finding-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.finding-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.finding-icon i {
    color: white;
    font-size: 1.2rem;
}

.finding-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.finding-item p {
    color: #6c757d;
    line-height: 1.6;
}

.market-context {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.market-context p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: #6c757d;
}

.risk-assessment {
    margin-bottom: 3rem;
}

.risk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.risk-category {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-left: 5px solid #ffc107;
}

.risk-category h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.risk-category p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #6c757d;
}

.recommendation {
    margin-bottom: 3rem;
}

.recommendation-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

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

.recommendation-rating {
    font-size: 2rem;
    font-weight: 700;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 10px;
}

.confidence-level {
    font-size: 1.1rem;
    opacity: 0.9;
}

.recommendation-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.recommendation-details .label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.recommendation-details .value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.recommendation-rationale {
    line-height: 1.7;
    opacity: 0.95;
}

.final-thoughts {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.final-thoughts p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: #6c757d;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #ecf0f1;
}

.footer-section p {
    line-height: 1.6;
    opacity: 0.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    padding: 0.3rem 0;
    opacity: 0.8;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .company-header {
        grid-template-columns: 1fr;
    }
    
    .lstm-explanation {
        grid-template-columns: 1fr;
    }
    
    .model-details {
        grid-template-columns: 1fr;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-grid {
        grid-template-columns: 1fr;
    }
    
    .recommendation-details {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

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

.analysis-block {
    animation: fadeInUp 0.6s ease-out;
}

/* Hover Effects */
.overview-card:hover .card-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.reason-card:hover .reason-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.finding-item:hover .finding-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}


/* Table Styling */
.table-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 2rem 0;
    overflow-x: auto;
}

.metrics-table, .evaluation-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    margin: 0;
}

.metrics-table th, .evaluation-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0.8rem;
    text-align: center;
    font-weight: 600;
    border: none;
    font-size: 0.9rem;
}

.metrics-table th:first-child, .evaluation-table th:first-child {
    border-top-left-radius: 10px;
}

.metrics-table th:last-child, .evaluation-table th:last-child {
    border-top-right-radius: 10px;
}

.metrics-table td, .evaluation-table td {
    padding: 1rem 0.8rem;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    color: #6c757d;
    font-weight: 500;
}

.ticker-cell {
    font-weight: 700 !important;
    color: #2c3e50 !important;
    background: #f8f9fa;
}

.tsm-row {
    background: rgba(102, 126, 234, 0.05);
}

.tsm-row .ticker-cell {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
}

.rating-cell {
    font-weight: 700 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 20px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.rating-cell.buy {
    background: #28a745;
    color: white !important;
}

.rating-cell.neutral {
    background: #ffc107;
    color: #212529 !important;
}

.buy-rating {
    border-left: 4px solid #28a745;
}

.neutral-rating {
    border-left: 4px solid #ffc107;
}

.metrics-table tr:hover, .evaluation-table tr:hover {
    background: rgba(102, 126, 234, 0.08);
    transition: background-color 0.3s ease;
}

.metrics-table tr:last-child td, .evaluation-table tr:last-child td {
    border-bottom: none;
}

/* Responsive Table Design */
@media (max-width: 768px) {
    .table-container {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .metrics-table, .evaluation-table {
        font-size: 0.8rem;
    }
    
    .metrics-table th, .evaluation-table th,
    .metrics-table td, .evaluation-table td {
        padding: 0.6rem 0.4rem;
    }
    
    .rating-cell {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem !important;
    }
}

/* Table Animation */
@keyframes tableSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.table-container {
    animation: tableSlideIn 0.6s ease-out;
}

/* Table Header Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.metrics-table th, .evaluation-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

