/* General Styles */
:root {
    --primary-color: #0066cc;
    --secondary-color: #5a6268;
    --hero-gradient-start: #667eea;
    --hero-gradient-end: #764ba2;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

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

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

/* Remove arrows from nav tabs */
.nav-tabs .nav-link::after {
    content: none !important;
}

.nav-tabs .nav-link {
    position: relative;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect fill="rgba(255,255,255,0.05)" width="50" height="50"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

/* Topic Cards */
.topic-card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.topic-card .card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.topic-card .btn-primary {
    background-color: var(--primary-color);
    border: none;
    padding: 8px 24px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.topic-card .btn-primary:hover {
    background-color: #0052a3;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-navbar {
    background: linear-gradient(135deg, #8e2de2 0%, #4a00e0 100%) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Index page navbar - initially hidden */
.navbar-index-hidden {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    transform: translateY(-100%);
    opacity: 0;
}

.navbar-index-visible {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    transform: translateY(0);
    opacity: 1;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.3s ease;
}

.navbar-brand:hover {
    opacity: 0.9;
}

.brand-icon {
    font-size: 1.5rem;
}

.brand-text {
    color: white;
}

.page-title-badge {
    margin-left: 0.75rem;
    padding: 0.25rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    animation: fadeInSlide 0.3s ease;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-link {
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ffffff !important;
}

.nav-link.active {
    font-weight: 600;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Topic Page Styles */
.page-header {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.content-section {
    margin-bottom: 40px;
}

.content-section h2 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color);
}

.content-section h3 {
    color: #34495e;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 15px;
}

.content-section ul {
    list-style: none;
    padding-left: 0;
}

.content-section ul li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.content-section ul li::before {
    content: "●";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.8em;
}

/* Musical notes for music page */
.music-page .content-section ul li::before {
    content: "♪";
    font-size: 1em;
}

/* Remove bullets for books lists */
.books-list li::before {
    content: none !important;
}

.books-list li {
    padding-left: 0 !important;
}

/* Style for Bootstrap icons */
.bi-book, .bi-graph-up, .bi-bank {
    color: var(--primary-color);
    margin-right: 8px;
}

/* Remove bullets for investment and portfolio lists */
.investment-list li::before,
.portfolio-list li::before {
    content: none !important;
}

.investment-list li,
.portfolio-list li {
    padding-left: 0 !important;
}

/* Remove bullets for topics lists */
.topics-list li::before {
    content: none !important;
}

.topics-list li {
    padding-left: 0 !important;
}

.content-section ul.list-unstyled li {
    padding-left: 0;
}

.content-section ul.list-unstyled li::before {
    content: none;
}

/* Collapsible Section Styling */
.content-section h2 a {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.content-section h2 a:hover {
    background-color: rgba(139, 92, 246, 0.08);
}

.content-section h2 a .collapse-icon {
    font-style: normal;
    transition: transform 0.3s ease;
    font-size: 0.8em;
    opacity: 0.6;
    margin-right: 0.5rem;
    display: inline-block;
    width: 1rem;
}

.content-section h2 a[aria-expanded="false"] .collapse-icon {
    transform: rotate(-90deg);
}

.content-section h2 a[aria-expanded="true"] .collapse-icon {
    transform: rotate(0deg);
}

/* YouTube Play Button Styling */
.yt-play {
    display: inline-block;
    background-color: #FF0000;
    color: white;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    transition: all 0.2s ease;
    line-height: 1;
}

.yt-play:hover {
    background-color: #CC0000;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Bootstrap Tab Styling - Modern Design */
.nav-tabs {
    border-bottom: none;
    margin-bottom: 0 !important;
    gap: 0.5rem;
}

.nav-tabs li::before {
    content: none !important;
}

.nav-tabs .nav-item {
    padding-left: 0 !important;
    margin-bottom: 0;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 0.75rem 0.75rem 0 0;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s ease;
    background: linear-gradient(180deg, #e0e0e0 0%, #d0d0d0 100%);
    margin-right: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.nav-tabs .nav-link:hover {
    background: linear-gradient(180deg, #d0d0d0 0%, #c0c0c0 100%);
    color: #212529;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    font-weight: 700;
    transform: translateY(0);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid var(--primary-color);
}

.tab-content {
    padding: 2rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 0 0.75rem 0.75rem 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.resource-card {
    padding-left: 20px;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .navbar-nav {
        background-color: #343a40;
        padding: 15px;
        border-radius: 8px;
        margin-top: 10px;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    z-index: 1000;
}

.back-to-top.show {
    display: block;
}

/* Stock Market Widget Styles */
#stock-data-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.stock-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stock-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stock-symbol {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.stock-name {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 0.75rem;
}

.stock-price {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.stock-change {
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    display: inline-block;
}

.stock-change.positive {
    color: #27ae60;
    background: #d4edda;
}

.stock-change.negative {
    color: #e74c3c;
    background: #f8d7da;
}

.stock-ytd {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-top: 0.5rem;
}

.stock-ytd.positive {
    color: #27ae60;
    background: #d4edda;
}

.stock-ytd.negative {
    color: #e74c3c;
    background: #f8d7da;
}

.stock-pe {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-weight: 500;
    margin-top: 0.5rem;
}

.stock-timestamp {
    grid-column: 1 / -1;
    text-align: center;
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-style: italic;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    font-style: italic;
}

.error {
    text-align: center;
    padding: 2rem;
    color: #e74c3c;
}

.refresh-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #8e2de2 0%, #4a00e0 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.refresh-button:hover {
    transform: translateY(-1px);
}

.refresh-button:active {
    transform: translateY(0);
}

/* Stock Chart Styles */
.chart-container {
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e1e8ed;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chart-container canvas {
    max-height: 400px;
}

/* Economic Statistics Styles */
#economic-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.econ-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.econ-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.econ-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e1e8ed;
}

.econ-flag {
    font-size: 2rem;
}

.econ-country {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
}

.econ-stat {
    margin-bottom: 1rem;
}

.econ-stat:last-child {
    margin-bottom: 0;
}

.econ-label {
    font-size: 0.8rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.econ-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.econ-value.positive {
    color: #27ae60;
}

.econ-value.neutral {
    color: #f39c12;
}

.econ-value.negative {
    color: #e74c3c;
}

.econ-change {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.econ-change.positive {
    color: #27ae60;
    background: #d4edda;
}

.econ-change.neutral {
    color: #f39c12;
    background: #fff3cd;
}

.econ-change.negative {
    color: #e74c3c;
    background: #f8d7da;
}

.econ-timestamp {
    grid-column: 1 / -1;
    text-align: center;
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-style: italic;
}
