.apy-chart {
    margin-bottom: 2rem;
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    padding: 1rem;
}

.dark-mode .apy-chart {
    background-color: #1a1a1a;
    border: 1px solid #333333;
}

.chart-section, .positions-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
    border-left: 4px solid #000000;
}

.dark-mode .section-title {
    color: #ffffff;
    border-left: 4px solid #ffffff;
}

/* Modern chart styling with Chart.js */
.chart-container {
    position: relative;
    height: 300px; /* Increased height for a more spacious look */
}

/* Sticky header with white background in light mode and black in dark mode */
.header {
    position: sticky;
    top: 0;
    padding: 1.5rem 0;
    z-index: 10;
    display: flex;
    justify-content: space-between; /* space between logo and contact */
    align-items: center;
    transition: background-color 0.3s ease;
}

/* Contact link styling (terminal-style) */
.contact-link {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #b7b7b7; /* light gray, adjust as desired */
    text-decoration: none;
    margin-right: 1rem;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #ffffff;
}

.header.scrolled {
    background-color: #ffffff; /* white for light mode */
    box-shadow: none;
}

.dark-mode .header.scrolled {
    background-color: #000000; /* black for dark mode */
    box-shadow: none;
}

/* Enhanced header logo styling (smaller, top left, nicer) */
.header-logo {
    height: 60px; /* Slightly smaller than 80px for a tiny bit smaller look */
    width: auto; /* Maintain aspect ratio */
    margin: 0 1rem; /* Add margin for spacing from the left */
    transition: opacity 0.3s ease, filter 0.3s ease; /* Smooth transition for dark/light mode */
}

.dark-mode .header-logo {
    filter: brightness(0) invert(1); /* Invert colors in dark mode for black-and-white */
}

/* Enhanced statistics section styling (under intro, cleaner, shadcn-inspired) */
.stats-section {
    padding: 1rem 0; /* Reduced padding for a cleaner look */
    margin-bottom: 2rem; /* Add space below stats */
    display: flex;
    justify-content: space-around; /* Space out stats evenly */
    align-items: center;
    flex-wrap: wrap;
    row-gap: 0.5rem;
}

.stat {
    font-size: 0.875rem; /* Smaller font for cleaner look */
    font-weight: 500; /* Medium weight for readability */
    color: #000000;
    margin: 0 0.5rem; /* Reduced margin for tighter spacing */
    padding: 0.25rem 0.5rem; /* Minimal padding, removing button-like appearance */
    white-space: nowrap; /* prevents ugly line breaks inside a stat */
    transition: all 0.3s ease; /* Smooth transition for dark/light mode */
}

.dark-mode .stat {
    color: #ffffff;
}

/* Base styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 1.5rem;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    background-color: #000000;
    color: #ffffff;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
}

.intro {
    text-align: center;
    padding: 1.5rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e5e5e5; /* Keep this separation line */
}

.dark-mode .intro {
    border-bottom: 1px solid #333333;
}

.intro p {
    font-size: 1rem;
    color: #666666;
    max-width: 720px;
    margin: 0 auto;
    font-weight: 400;
}

.dark-mode .intro p {
    color: #b3b3b3;
}

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

.card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 260px;
    animation: fadeIn 0.5s ease-out;
}

.dark-mode .card {
    background-color: #1a1a1a;
    border: 1px solid #333333;
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.05);
}

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

.dark-mode .card:hover {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

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

.card-content {
    flex-grow: 1;
}

.coin-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 0.5rem;
}

.dark-mode .coin-name {
    color: #ffffff;
}

.platform {
    font-size: 1rem;
    color: #666666;
    margin-bottom: 1rem;
}

.dark-mode .platform {
    color: #b3b3b3;
}

.stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.apy {
    font-size: 1.25rem;
    font-weight: 500;
    color: #000000;
}

.dark-mode .apy {
    color: #ffffff;
}

.blockchain {
    font-size: 0.875rem;
    color: #666666;
    background-color: #f5f5f5;
    padding: 0.375rem 0.875rem;
    border-radius: 1.5rem;
    font-weight: 500;
}

.dark-mode .blockchain {
    color: #b3b3b3;
    background-color: #2d2d2d;
}

.strategy-note {
    font-size: 0.875rem;
    color: #666666;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.dark-mode .strategy-note {
    color: #b3b3b3;
}

.visit-btn {
    display: inline-flex;
    padding: 0.625rem 1.25rem;
    background-color: #000000;
    color: #ffffff;
    text-decoration: none;
    border: 1px solid #000000;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.visit-btn:hover {
    background-color: #ffffff;
    color: #000000;
    border-color: #000000;
}

.dark-mode .visit-btn {
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.dark-mode .visit-btn:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
}

.footer {
    text-align: center;
    color: #666666;
    font-size: 0.875rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e5e5;
}

.dark-mode .footer {
    color: #b3b3b3;
    border-top: 1px solid #333333;
}

/* Positions header for top picks */
.positions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}   