/* ============================================
   ANCHOR CAPITAL - CHRISTMAS GIFT PICKS 2025
   ============================================ */

/* ============================================
   FONT FACES
   ============================================ */
@font-face {
    font-family: 'Lato';
    src: url('assets/fonts/Lato-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

/* ============================================
   CSS CUSTOM PROPERTIES (Brand Colors)
   ============================================ */
:root {
    --anchor-blue: #1e496d;
    --deep-water: #0c2e4b;
    --harbour: #e5e8ea;
    --sand: #d7c6a4;
    --shore: #c3af91;
    --coral: #e9624b;
    --sunset: #f58555;
    --white: #ffffff;
    --black: #000000;
    --card-bg: #05070e;
    --card-bg-gradient: radial-gradient(ellipse at top right, rgba(30, 73, 109, 0.15) 0%, transparent 50%);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--harbour);
    background: linear-gradient(180deg, #030508 0%, var(--deep-water) 50%, #030508 100%);
    min-height: 100vh;
}

/* ============================================
   LAYOUT
   ============================================ */
.intro-content,
.section-header,
.cards-grid,
.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(3, 5, 8, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(30, 73, 109, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    padding-bottom: 16px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 45px;
    width: auto;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.badge {
    background: var(--anchor-blue);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 6px 14px;
    border-radius: 20px;
    text-transform: uppercase;
}

.date {
    color: var(--sand);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ============================================
   INTRO SECTION
   ============================================ */
.intro-section {
    padding-top: 140px;
    padding-bottom: 60px;
    text-align: center;
}

.intro-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    letter-spacing: 6px;
    color: var(--white);
    margin-bottom: 24px;
    text-transform: uppercase;
}

.intro-content p {
    font-size: 1.125rem;
    color: var(--sand);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ============================================
   ANIMATION SECTION (scroll-controlled PNG sequence)
   ============================================ */
.animation-section {
    height: 300vh;
    position: relative;
}

.animation-container {
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    background: transparent;
}

#gift-canvas {
    max-width: 90%;
    max-height: 50vh;
    width: auto;
    height: auto;
    object-fit: contain;
    background: transparent;
}

/* ============================================
   EMERGING LOGOS (burst from gift animation)
   ============================================ */
.emerging-logos {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 0px;
    pointer-events: none;
    z-index: 10;
    transition: top 0.8s cubic-bezier(0.34, 1.02, 0.64, 1), 
                gap 0.8s cubic-bezier(0.34, 1.02, 0.64, 1);
}

/* After burst, move logos to final position below gift */
.emerging-logos.settled {
    top: 78%;
    gap: 100px;
}

/* Enable clicks only after animation is complete */
.emerging-logos.clickable {
    pointer-events: auto;
}

.emerging-logos.clickable .emerging-card {
    pointer-events: auto;
}

.emerging-card {
    opacity: 0;
    transform: scale(0.2);
    pointer-events: none;
    transition: transform 0.3s ease;
    visibility: hidden;
}

.emerging-card.burst {
    visibility: visible;
    animation: burstOut 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.emerging-card:nth-child(1).burst {
    animation-delay: 0s;
}

.emerging-card:nth-child(2).burst {
    animation-delay: 0.15s;
}

.emerging-card:nth-child(3).burst {
    animation-delay: 0.3s;
}

@keyframes burstOut {
    0% {
        opacity: 0;
        transform: scale(0.2);
    }
    30% {
        opacity: 0.8;
        transform: scale(1.15);
    }
    50% {
        opacity: 1;
        transform: scale(1.25);
    }
    75% {
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.emerging-card.floating .card-logo {
    animation: gentleFloat 3s ease-in-out infinite;
}

.emerging-card:nth-child(1).floating .card-logo {
    animation-delay: 0s;
}

.emerging-card:nth-child(2).floating .card-logo {
    animation-delay: 0.5s;
}

.emerging-card:nth-child(3).floating .card-logo {
    animation-delay: 1s;
}

@keyframes gentleFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

/* Hover effects for emerged cards - only when clickable */
.emerging-logos.clickable .emerging-card:hover {
    transform: scale(1.08);
    cursor: pointer;
}

.emerging-logos.clickable .emerging-card:hover .card-logo {
    animation-play-state: paused;
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Responsive adjustments for emerging logos */
@media (max-width: 1000px) {
    .emerging-logos {
        gap: 0px;
    }
    
    .emerging-logos.settled {
        gap: 60px;
    }
    
    .emerging-card .card-logo-wrapper {
        width: 100px;
        height: 100px;
    }
    
    .emerging-card .card-label {
        font-size: 12px;
        max-width: 160px;
    }
}

@media (max-width: 700px) {
    .emerging-logos {
        flex-direction: column !important;
        gap: 0px !important;
        top: 50%;
        align-items: center;
    }
    
    .emerging-logos.settled {
        top: 58% !important;
        gap: 12px !important;
    }
    
    .emerging-card {
        flex-shrink: 0;
    }
    
    .emerging-card .card-logo-wrapper {
        width: 65px !important;
        height: 65px !important;
    }
    
    .emerging-card .card-logo {
        max-width: 45px !important;
        max-height: 45px !important;
    }
    
    .emerging-card .card-label {
        font-size: 10px !important;
        max-width: 220px;
        line-height: 1.3;
        text-align: center;
    }
    
    .animation-section {
        height: 250vh;
    }
    
    #gift-canvas {
        max-height: 35vh;
    }
}

/* iPhone and small mobile devices */
@media (max-width: 480px) {
    .emerging-logos {
        flex-direction: column !important;
        gap: 0px !important;
        top: 50%;
        width: 90%;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .emerging-logos.settled {
        top: 55% !important;
        gap: 10px !important;
    }
    
    .emerging-card {
        width: 100%;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin-bottom: 0;
    }
    
    .emerging-card .card-logo-wrapper {
        width: 55px !important;
        height: 55px !important;
        margin-bottom: 4px;
    }
    
    .emerging-card .card-logo {
        max-width: 40px !important;
        max-height: 40px !important;
    }
    
    .emerging-card .card-label {
        font-size: 9px !important;
        max-width: 260px;
        text-align: center;
        line-height: 1.3;
        margin-top: 4px;
    }
    
    .intro-content h1 {
        font-size: 1.6rem;
        letter-spacing: 2px;
    }
    
    .intro-content p {
        font-size: 0.85rem;
        padding: 0 16px;
        line-height: 1.5;
    }
    
    .animation-section {
        height: 220vh;
    }
    
    #gift-canvas {
        max-height: 30vh;
    }
    
    .animation-container {
        top: 60px;
        height: calc(100vh - 60px);
    }
}

.loading-indicator {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--sand);
    font-size: 14px;
    letter-spacing: 1px;
}

.loading-indicator.hidden {
    display: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(215, 198, 164, 0.2);
    border-top-color: var(--sand);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============================================
   BATTLE CARDS SECTION (now just the header)
   ============================================ */
.battle-cards-section {
    padding: 60px 24px 100px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.battle-cards-section.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.section-header h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--white);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.section-header p {
    font-size: 1rem;
    color: var(--sand);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.cards-grid.three-cards {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1200px) {
    .cards-grid.three-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .cards-grid.three-cards .stock-card:last-child {
        grid-column: 1 / -1;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 1024px) {
    .cards-grid,
    .cards-grid.three-cards {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .cards-grid.three-cards .stock-card:last-child {
        max-width: none;
    }
}

/* ============================================
   STOCK CARDS
   ============================================ */
.stock-card {
    background: var(--card-bg);
    background-image: var(--card-bg-gradient);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 8px 24px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(30, 73, 109, 0.15);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stock-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.5),
        0 12px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(30, 73, 109, 0.3);
}

/* ============================================
   MINIMAL CARDS
   ============================================ */
.stock-card.minimal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    min-height: 280px;
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
    transition: transform 0.3s ease;
}

.stock-card.minimal:hover {
    transform: translateY(-12px) scale(1.02);
    background: transparent;
    border: none;
    box-shadow: none;
}

.stock-card.minimal:hover .card-logo {
    animation-play-state: paused;
    transform: scale(1.1);
}

.card-logo-wrapper {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.card-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 16px;
    box-sizing: border-box;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-logo-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--anchor-blue) 0%, var(--deep-water) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 900;
    color: var(--white);
    letter-spacing: 2px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card-label {
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.5px;
    color: var(--sand);
    text-transform: none;
    opacity: 0.9;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.card-logo.floating {
    animation: float 3s ease-in-out infinite;
}

.stock-card.minimal:nth-child(1) .card-logo.floating {
    animation-delay: 0s;
}

.stock-card.minimal:nth-child(2) .card-logo.floating {
    animation-delay: 0.5s;
}

.stock-card.minimal:nth-child(3) .card-logo.floating {
    animation-delay: 1s;
}

/* Responsive adjustments for minimal cards */
@media (max-width: 1200px) {
    .cards-grid.minimal-cards .stock-card:last-child {
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .stock-card.minimal {
        padding: 40px 24px;
        min-height: 240px;
    }
    
    .card-logo-wrapper {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }
    
    .card-label {
        font-size: 12px;
    }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 28px 28px 20px;
    border-bottom: 1px solid rgba(30, 73, 109, 0.2);
}

.company-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.company-name {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--white);
    text-transform: uppercase;
}

.ticker-info {
    font-size: 13px;
    color: var(--sand);
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.company-tag {
    background: rgba(30, 73, 109, 0.5);
    border: 1px solid rgba(30, 73, 109, 0.7);
    color: var(--harbour);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 16px;
    text-transform: uppercase;
    white-space: nowrap;
}

.card-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

@media (max-width: 768px) {
    .card-content {
        grid-template-columns: 1fr;
    }
}

.panel-left {
    background: var(--anchor-blue);
    padding: 28px;
}

.panel-left h4 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--white);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.panel-left h4 .highlight {
    color: var(--coral);
}

.panel-left p {
    font-size: 14px;
    line-height: 1.75;
    color: var(--harbour);
    margin-bottom: 16px;
    text-align: justify;
}

.panel-left p:last-child {
    margin-bottom: 0;
}

.panel-right {
    background: rgba(12, 46, 75, 0.3);
    border-left: 1px solid var(--sand);
    padding: 28px;
}

@media (max-width: 768px) {
    .panel-right {
        border-left: none;
        border-top: 1px solid var(--sand);
    }
}

.panel-right h4 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--white);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.reasons-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.reasons-list li {
    font-size: 14px;
    line-height: 1.7;
    color: var(--harbour);
    padding-left: 20px;
    position: relative;
}

.reasons-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--coral);
    font-weight: 700;
}

.reason-label {
    color: var(--coral);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.card-footer {
    padding: 20px 28px;
    border-top: 1px solid rgba(30, 73, 109, 0.2);
    background: rgba(0, 0, 0, 0.2);
}

.card-footer span {
    font-size: 13px;
    color: var(--sand);
    font-style: italic;
    opacity: 0.9;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    text-align: center;
    padding: 40px 24px;
    border-top: 1px solid rgba(30, 73, 109, 0.2);
    background: rgba(0, 0, 0, 0.3);
}

.site-footer p {
    font-size: 13px;
    color: var(--sand);
    letter-spacing: 1px;
    opacity: 0.7;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 640px) {
    .header-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .header-right {
        justify-content: center;
    }

    .logo {
        height: 36px;
    }

    .intro-section {
        padding-top: 160px;
    }

    .card-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .company-name {
        font-size: 1.25rem;
    }

    .panel-left,
    .panel-right {
        padding: 20px;
    }

}


/* ============================================
   MODAL OVERLAY
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 5, 8, 0.95);
    z-index: 2000;
    overflow-y: auto;
    padding: 40px 60px;
}

.modal-overlay.active {
    display: block;
}

.modal-content {
    width: 100%;
    max-width: 960px;
    margin: 40px auto;
    background: var(--white);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

@media (max-width: 1100px) {
    .modal-overlay {
        padding: 40px 40px;
    }
}

@media (max-width: 900px) {
    .modal-overlay {
        padding: 32px 28px;
    }
}

@media (max-width: 768px) {
    .modal-overlay {
        padding: 24px 20px;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--anchor-blue);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: var(--deep-water);
}

.modal-body {
    padding: 0;
}

/* ============================================
   EXPANDED CARD STYLES
   ============================================ */
.expanded-card {
    color: var(--deep-water);
}

.expanded-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 28px 32px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.expanded-company-main {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.expanded-logo {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    flex-shrink: 0;
    object-fit: contain;
    background: #f5f5f5;
    padding: 6px;
    box-sizing: border-box;
}

.expanded-company-info h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--deep-water);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.expanded-ticker {
    color: #666;
    font-weight: 400;
    font-size: 1rem;
}

.expanded-tags {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.expanded-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--anchor-blue);
}

.expanded-tag::before {
    content: '⬤';
    font-size: 6px;
    color: var(--anchor-blue);
}

.expanded-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.expanded-update {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
}

.expanded-description {
    padding: 16px 32px;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #e0e0e0;
    line-height: 1.6;
}

/* ============================================
   MAIN TWO-COLUMN GRID LAYOUT
   ============================================ */
.expanded-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

@media (max-width: 1000px) {
    .expanded-main-grid {
        grid-template-columns: 1fr;
    }
}

/* Left Column - Text Panels */
.expanded-left-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-right: 12px;
}

.expanded-why-interesting {
    background: var(--anchor-blue);
    padding: 24px;
    color: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.expanded-why-interesting h3 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-transform: uppercase;
    border-bottom: 3px solid var(--coral);
    padding-bottom: 10px;
    display: inline-block;
}

.expanded-why-interesting h3 .highlight {
    color: var(--coral);
}

.expanded-why-interesting p {
    font-size: 14px;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 16px;
    text-align: justify;
}

.expanded-why-interesting p:last-child {
    margin-bottom: 0;
}

.expanded-why-like {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.expanded-why-like h3 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: var(--deep-water);
    border-bottom: 3px solid var(--coral);
    padding-bottom: 10px;
    display: inline-block;
}

.expanded-reasons-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.expanded-reasons-list li {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    padding-left: 20px;
    position: relative;
}

.expanded-reasons-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--coral);
    font-weight: 700;
}

.expanded-reason-label {
    color: var(--coral);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Right Column - Price, Chart, Metrics, Quality */
.expanded-right-column {
    background: #f8f9fa;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1000px) {
    .expanded-right-column {
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }
}

/* Price Section */
.expanded-price-section {
    padding: 24px 28px 16px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.price-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.chart-ticker {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chart-timeframes {
    display: flex;
    gap: 2px;
    background: #e9ecef;
    border-radius: 6px;
    padding: 3px;
    flex-wrap: wrap;
}

.timeframe-btn {
    padding: 6px 10px;
    font-size: 11px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.timeframe-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--deep-water);
}

.timeframe-btn.active {
    background: var(--anchor-blue);
    color: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.price-display {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}

.chart-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--deep-water);
}

.chart-change {
    color: #22c55e;
    font-size: 16px;
    font-weight: 600;
}

.chart-change.negative {
    color: var(--coral);
}

.price-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #888;
}

.chart-as-of {
    color: #888;
}

.chart-market-cap {
    color: #666;
}

/* Stock Chart Container */
.stock-chart-container {
    margin: 0 24px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.stock-chart-svg {
    width: 100%;
    height: auto;
}

/* Metrics Grid */
.metrics-grid-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 0 24px;
    border-bottom: 1px solid #eee;
}

.metrics-grid-row:last-of-type {
    border-bottom: none;
    margin-bottom: 8px;
}

.metric-item {
    text-align: left;
    padding: 14px 12px;
    background: transparent;
    border-right: 1px solid #eee;
}

.metric-item:last-child {
    border-right: none;
}

.metric-label {
    font-size: 10px;
    color: var(--coral);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 700;
}

.metric-value-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.metric-main {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--deep-water);
}

.metric-arrow {
    font-size: 11px;
    color: #666;
}

.metric-arrow.negative {
    color: var(--coral);
}

/* Quality Scores Section */
.quality-section {
    padding: 20px 24px;
    background: #fff;
    border-top: 1px solid #eee;
}

.quality-section h3 {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 16px;
    text-transform: uppercase;
    color: var(--deep-water);
}

.quality-scores {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quality-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quality-label {
    width: 85px;
    font-size: 12px;
    color: #555;
    flex-shrink: 0;
}

.quality-bar-container {
    flex: 1;
    height: 18px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.quality-bar {
    height: 100%;
    background: var(--anchor-blue);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.quality-score {
    width: 24px;
    font-size: 14px;
    font-weight: 700;
    color: var(--deep-water);
    text-align: right;
}

/* ============================================
   BOTTOM CHARTS - THREE COLUMN
   ============================================ */
.expanded-bottom-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid #e0e0e0;
}

@media (max-width: 900px) {
    .expanded-bottom-charts {
        grid-template-columns: 1fr;
    }
}

.revenue-chart-section {
    padding: 24px;
    border-right: 1px solid #e0e0e0;
    background: #fff;
}

@media (max-width: 900px) {
    .revenue-chart-section {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
}

.revenue-chart-section h3 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 16px;
    text-transform: uppercase;
    color: var(--deep-water);
}

.revenue-chart-container {
    background: #fff;
    border-radius: 8px;
}

.revenue-chart-svg {
    width: 100%;
    height: auto;
}

/* Pie Charts Section */
.pie-charts-section {
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    background: #fff;
}

@media (max-width: 600px) {
    .pie-charts-section {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.pie-chart-wrapper {
    text-align: center;
}

.pie-chart-wrapper h4 {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 12px;
    text-transform: uppercase;
    color: var(--deep-water);
}

.pie-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.pie-chart-svg {
    width: 100px;
    height: 100px;
    display: block;
}

.pie-legend {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.legend-text {
    font-size: 11px;
    color: #555;
    white-space: nowrap;
}

/* NeuroGrid Link */
.neurogrid-link {
    display: block;
    padding: 20px 32px;
    background: var(--deep-water);
    color: var(--white);
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: background 0.2s ease;
}

.neurogrid-link:hover {
    background: var(--anchor-blue);
}

/* ============================================
   MODAL RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
    .modal-overlay {
        padding: 16px 20px;
    }
    
    .modal-content {
        border-radius: 12px;
    }
    
    .expanded-header {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }
    
    .expanded-company-main {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .expanded-description {
        padding: 16px 20px;
    }
    
    .expanded-why-interesting,
    .expanded-why-like {
        padding: 20px;
    }
    
    .expanded-price-section {
        padding: 20px;
    }
    
    .price-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .chart-timeframes {
        width: 100%;
        justify-content: flex-start;
    }
    
    .stock-chart-container {
        margin: 0 16px 16px;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 16px 16px;
    }
    
    .quality-section {
        padding: 16px;
    }
    
    .revenue-chart-section,
    .pie-charts-section {
        padding: 20px;
    }
    
    .neurogrid-link {
        padding: 16px 20px;
    }
}
