* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    hyphens: none;
    -webkit-hyphens: none;
    -moz-hyphens: none;
    -ms-hyphens: none;
    word-break: normal;
    overflow-wrap: break-word; /* Only break long unbreakable strings */
}

/* Prevent single words on their own line (orphans/widows) */
p, span, div, label, small, .overview, .form-intro, .interpretation-text, 
.summary-stat, .winner-comparison, .card, .info-card, .summary-title,
.overview-context, .tap-hint, .winner-header {
    orphans: 2;
    widows: 2;
}

/* Text elements - prevent word breaks within words */
p, .overview, .form-intro, .interpretation-text, .interpretation-details,
.summary-stat, .winner-comparison, label, small, .card {
    word-break: normal;
    overflow-wrap: break-word; /* Only for very long unbreakable strings */
    white-space: normal;
}

/* Ensure proper line balancing and prefer sentence breaks */
.overview, .form-intro, .interpretation-text {
    line-height: 1.6;
    text-wrap: balance; /* Prefer balanced line breaks (modern browsers) */
    orphans: 2;
    widows: 2;
}

/* Center overview for professional balanced look */
.overview {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Left-align form-intro for better readability */
.form-intro {
    text-align: left;
}

.form-tip {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.tip-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.input-hint .tip-icon {
    margin-right: 4px;
}

/* Prefer breaking after sentence punctuation when possible */
.overview, .form-intro, .interpretation-text, p {
    word-spacing: normal;
}

/* Add break opportunities after sentence punctuation */
.overview::after,
.form-intro::after {
    content: '';
}

/* Use CSS to prefer breaking at sentence boundaries */
.overview, .form-intro {
    /* Insert zero-width space after periods and colons for better breaks */
    text-rendering: optimizeLegibility;
}

/* Ensure last 2-3 words stay together to prevent orphans */
.overview, .form-intro {
    /* The non-breaking spaces in HTML will handle this */
}

/* Additional rules to prevent orphans in specific elements */
.overview {
    min-width: 0; /* Allow flex shrinking */
    max-width: 100%;
}

/* Ensure last few words stay together */
.overview strong:last-child,
.form-intro strong:last-child {
    white-space: nowrap;
}

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #1c2128;
    --border-color: #30363d;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --accent-primary: #58a6ff;
    --accent-secondary: #1f6feb;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success: #3fb950;
    --error: #f85149;
    --warning: #d29922;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

html {
    scroll-behavior: auto;
    overflow-anchor: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 12px; /* Mobile-first: smaller padding */
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Desktop: increase padding */
@media (min-width: 769px) {
    body {
        padding: 20px;
    }
}

/* Futuristic background gradient - Enhanced */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(88, 166, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(88, 166, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: subtleShift 15s ease-in-out infinite alternate;
}

@keyframes subtleShift {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Initial Page Load Screen */
.initial-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #1c2128 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.initial-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none !important;
}

.loader-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.loader-logo {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 40px;
}

.logo-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #58a6ff 100%);
    position: absolute;
    top: 0;
    left: 0;
    animation: logoRotate 3s linear infinite;
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.6), 0 0 80px rgba(88, 166, 255, 0.4);
}

.logo-circle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--bg-primary);
}

.logo-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--accent-primary);
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes logoPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        box-shadow: 0 0 20px rgba(88, 166, 255, 0.6);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.7;
        box-shadow: 0 0 40px rgba(88, 166, 255, 0.9), 0 0 60px rgba(102, 126, 234, 0.5);
    }
}

.loader-title {
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #58a6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    animation: titleGlow 2s ease-in-out infinite alternate;
    text-shadow: 0 0 30px rgba(88, 166, 255, 0.3);
}

@keyframes titleGlow {
    0% {
        filter: brightness(1);
    }
    100% {
        filter: brightness(1.3);
    }
}

.loader-subtitle {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 3vw, 1.2rem);
    margin-bottom: 40px;
    animation: subtitleFade 2s ease-in-out infinite alternate;
}

@keyframes subtitleFade {
    0% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}

.loader-progress {
    width: 300px;
    max-width: 80%;
    height: 4px;
    background: rgba(88, 166, 255, 0.1);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #58a6ff 100%);
    border-radius: 2px;
    width: 0%;
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.8);
    transition: width 0.3s ease;
}

@keyframes progressLoad {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

.loader-enter-button {
    margin: 40px auto 0;
    padding: 16px 48px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: enterButtonAppear 0.6s ease forwards;
    box-shadow: 
        0 8px 24px rgba(102, 126, 234, 0.5),
        0 0 20px rgba(88, 166, 255, 0.3);
    display: block;
    width: auto;
    min-width: 120px;
}

.loader-enter-button.hidden {
    display: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-enter-button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 12px 32px rgba(102, 126, 234, 0.7),
        0 0 30px rgba(88, 166, 255, 0.5);
    filter: brightness(1.1);
}

.loader-enter-button:active {
    transform: translateY(-2px) scale(1.02);
}

@keyframes enterButtonAppear {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.loader-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 3s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.8);
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 4s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 0.5s;
    animation-duration: 3.5s;
}

.particle:nth-child(3) {
    left: 30%;
    animation-delay: 1s;
    animation-duration: 4.5s;
}

.particle:nth-child(4) {
    left: 40%;
    animation-delay: 1.5s;
    animation-duration: 3s;
}

.particle:nth-child(5) {
    left: 60%;
    animation-delay: 0.3s;
    animation-duration: 4s;
}

.particle:nth-child(6) {
    left: 70%;
    animation-delay: 0.8s;
    animation-duration: 3.5s;
}

.particle:nth-child(7) {
    left: 80%;
    animation-delay: 1.2s;
    animation-duration: 4.2s;
}

.particle:nth-child(8) {
    left: 90%;
    animation-delay: 0.6s;
    animation-duration: 3.8s;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* Main content fade in */
#mainContent {
    opacity: 0;
    animation: contentFadeIn 0.8s ease-out 0.3s forwards;
}

@keyframes contentFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    max-width: 1350px;
    margin: 0 auto;
    overflow-x: hidden;
    width: 100%;
    padding-bottom: 20px;
    min-height: 100vh;
}

/* Desktop: wider container for better use of screen space */
@media (min-width: 1024px) {
    .container {
        max-width: 1350px;
        padding-left: 24px;
        padding-right: 24px;
    }
}

header {
    text-align: center;
    margin-bottom: 24px; /* Mobile-first: smaller margin */
    padding: 24px 12px; /* Mobile-first: smaller padding */
}

header h1 {
    font-size: clamp(1.75rem, 8vw, 3rem); /* Mobile-first: responsive font */
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 3vw, 1.1rem); /* Mobile-first: responsive font */
}

/* Desktop: increase header spacing */
@media (min-width: 769px) {
    header {
        margin-bottom: 40px;
        padding: 40px 20px;
    }
}

/* Info Card Styles - minimal, no box - override .card styles */
.card.info-card {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: -8px 0 24px 0 !important;
    text-align: center !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Utility classes for responsive display */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* Mobile: adjust info-card */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
    .card.info-card {
        margin: -4px 0 20px 0 !important;
    }
}

.info-card h2 {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.overview {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    font-size: 0.95rem;
    word-break: normal;
    overflow-wrap: break-word;
    orphans: 2;
    widows: 2;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Mobile: adjust overview */
@media (max-width: 768px) {
    .overview {
        font-size: 0.85rem;
        line-height: 1.6;
        margin: 0 auto;
        padding: 0;
        text-align: center;
        max-width: 100%;
    }
}

.features-list {
    list-style: none;
    padding-left: 0;
    margin: 1.5rem 0;
}

.features-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-primary);
    line-height: 1.7;
    border-left: 3px solid transparent;
    border-image: var(--accent-gradient) 1;
    margin-bottom: 0.5rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
    opacity: 0;
    animation: slideInRight 0.5s ease forwards;
}

.features-list li:nth-child(1) { animation-delay: 0.1s; }
.features-list li:nth-child(2) { animation-delay: 0.2s; }
.features-list li:nth-child(3) { animation-delay: 0.3s; }
.features-list li:nth-child(4) { animation-delay: 0.4s; }
.features-list li:nth-child(5) { animation-delay: 0.5s; }

.features-list li:hover {
    background: rgba(102, 126, 234, 0.15);
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

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

.features-list li strong {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tip {
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.3);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

.tip strong {
    color: var(--accent-primary);
}

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 1px rgba(88, 166, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    position: relative;
}

.card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(88, 166, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border-color: rgba(88, 166, 255, 0.3);
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(88, 166, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::after {
    opacity: 1;
}

.card:nth-child(1) {
    animation-delay: 0.1s;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

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

.card:nth-child(4) {
    animation-delay: 0.4s;
}

.card:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    50% {
        opacity: 0.7;
        transform: translateY(10px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--text-primary);
    opacity: 0;
    animation: slideInDown 0.8s ease-out 0.2s forwards;
}

@keyframes slideInDown {
    0% {
        opacity: 0;
        transform: translateY(-40px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.form-intro {
    background: rgba(88, 166, 255, 0.06);
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 10px;
    padding: 14px 18px;
    margin: 0 0 20px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    word-break: normal;
    overflow-wrap: break-word;
    orphans: 2;
    widows: 2;
    text-align: left;
}

/* Mobile: adjust form-intro */
@media (max-width: 768px) {
    .form-intro {
        padding: 12px 14px;
        margin: 0 0 16px 0;
        font-size: 0.85rem;
        line-height: 1.5;
        border-radius: 8px;
    }
}

.form-intro strong {
    color: var(--accent-primary);
    font-weight: 600;
}

.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.token-input-group {
    margin-bottom: 24px;
    animation: slideIn 0.3s ease;
}

/* Flowy input group styling */
.flowy-input-group {
    position: relative;
}

.asset-display-wrapper {
    display: flex;
    align-items: stretch;
    gap: 16px;
    padding: 10px 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.04), rgba(102, 126, 234, 0.02));
    border: 1px solid rgba(88, 166, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: auto;
    backdrop-filter: blur(10px);
}

.asset-left-section {
    flex: 0 0 50%;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-right: 8px;
}

.asset-chart-section {
    flex: 0 0 50%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 8px;
}

/* Hide charts on input page for both mobile and desktop */
#mainContent .asset-chart-section {
    display: none !important;
}

/* Show charts on results pages for both mobile and desktop */
#resultsContainer .asset-chart-section,
#resultsContainer .winner .asset-chart-section,
#resultsContainer .winner-chart-section,
#resultsContainer .summary-card .asset-chart-section,
#resultsContainer .summary-chart-section,
#resultsContainer .asset-interpretation-card .asset-chart-section {
    display: flex !important;
}

.asset-display-wrapper:hover {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.08), rgba(102, 126, 234, 0.04));
    border-color: rgba(88, 166, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.1);
}

.asset-logo-container {
    width: 48px;
    min-width: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    flex-shrink: 0;
}

.asset-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(28, 33, 40, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    object-fit: cover;
}

.asset-ticker-below {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1;
    margin-top: 2px;
}

.asset-logo img {
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.asset-input-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.flowy-wrapper {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.flowy-wrapper .flowy-input {
    background: rgba(88, 166, 255, 0.05) !important;
    border: 1px solid rgba(88, 166, 255, 0.15) !important;
}

.flowy-input {
    background: rgba(88, 166, 255, 0.05) !important;
    border: 1px solid rgba(88, 166, 255, 0.15) !important;
    padding: 10px 14px !important;
    font-size: 1.05rem !important;
    color: var(--text-primary) !important;
    border-radius: 10px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-weight: 500 !important;
}

.flowy-input:focus {
    background: rgba(88, 166, 255, 0.1) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2) !important;
    transform: scale(1.01);
}

.flowy-input::placeholder {
    color: var(--text-tertiary) !important;
    opacity: 0.6 !important;
}

.asset-info-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    animation: fadeInUp 0.3s ease;
    width: 100%;
}

.asset-info-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.asset-ticker {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.asset-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.2px;
}

.asset-price {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

.asset-price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin-left: 8px;
    flex-shrink: 0;
    align-self: center;
}

.asset-price-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-tertiary);
    letter-spacing: 0.1px;
    text-transform: uppercase;
}

.asset-price-chart {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.2px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
}

.asset-chart-container {
    flex: 1;
    height: 50px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.asset-chart-container .chart-labels {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.chart-labels {
    position: relative;
    font-size: 0.65rem;
    pointer-events: none;
    z-index: 10;
}

.chart-label-high,
.chart-label-low {
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 3px;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.chart-label-high {
    color: rgba(63, 185, 80, 1);
}

.chart-label-low {
    color: rgba(248, 81, 73, 1);
}

.asset-chart {
    width: 100% !important;
    height: 50px !important;
    min-height: 50px;
}

/* Mobile: adjust layout for smaller screens */
@media (max-width: 768px) {
    .asset-display-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 6px 12px;
        min-height: auto;
    }
    
    .asset-left-section {
        flex: 1;
        width: 100%;
        padding-right: 0;
        gap: 10px;
    }
    
    /* Chart title mobile - make smaller so chart can be bigger */
    .chart-title-mobile {
        font-size: 0.7rem !important;
        font-weight: 500;
        color: var(--text-tertiary);
        margin-bottom: 4px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .asset-logo-container {
        width: 40px !important;
        min-width: 40px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 4px !important;
    }
    
    .asset-logo {
        width: 40px !important;
        height: 40px !important;
    }
    
    .asset-ticker-below {
        font-size: 0.65rem;
        margin-top: 2px;
    }
    
    .asset-input-container {
        max-width: 100%;
        gap: 4px;
    }
    
    .flowy-input {
        padding: 8px 10px !important;
        font-size: 0.95rem !important;
    }
    
    .asset-info-display {
        flex-wrap: wrap;
        gap: 6px;
        padding: 4px 0;
    }
    
    .asset-info-left {
        gap: 5px;
        flex-basis: 100%;
        margin-bottom: 2px;
    }
    
    .asset-ticker {
        font-size: 0.85rem;
    }
    
    .asset-name {
        font-size: 0.8rem;
    }
    
    .asset-marketcap {
        font-size: 0.65rem;
    }
    
    .asset-chart-container {
        flex: 1;
        height: 40px;
        min-height: 40px;
        min-width: 120px;
    }
    
    .asset-chart {
        height: 32px !important;
        min-height: 32px;
    }
    
    .asset-price-wrapper {
        margin-left: 4px;
        gap: 1px;
    }
    
    .asset-price-label {
        font-size: 0.55rem;
    }
    
    .asset-price-chart {
        font-size: 0.65rem;
        padding: 1px 4px;
    }
    
    .chart-labels {
        font-size: 0.55rem;
    }
    
    .chart-label-high,
    .chart-label-low {
        padding: 1px 2px;
        font-size: 0.55rem;
    }
}

.input-hint {
    margin-top: 8px;
    padding-left: 68px;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.7;
}

/* Optional input group (Digital Asset 3) - subtle animation only */
.token-input-group-optional {
    position: relative;
    animation: slideIn 0.3s ease;
}

.token-input-wrapper-optional {
    position: relative;
}

.token-input-optional {
    border: 1px solid var(--border-color) !important;
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    transition: all 0.3s ease;
    animation: subtleInputPulse 3s ease-in-out infinite;
}

.token-input-optional::placeholder {
    font-size: 0.75em;
    white-space: nowrap;
    overflow: visible;
}

/* xStock caution icon */
.xstock-caution-icon {
    position: absolute;
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 100;
    background: rgba(251, 191, 36, 0.25);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    animation: cautionPulse 2s ease-in-out infinite;
    box-shadow: 0 2px 6px rgba(251, 191, 36, 0.3);
}

.xstock-caution-icon:hover {
    background: rgba(251, 191, 36, 0.4);
    transform: scale(1.1);
}

@keyframes cautionPulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

.asset-input-container {
    position: relative;
}

@keyframes subtleInputPulse {
    0%, 100% {
        border-color: var(--border-color);
    }
    50% {
        border-color: rgba(88, 166, 255, 0.4);
    }
}

.token-input-optional:focus {
    border-color: var(--accent-primary) !important;
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2) !important;
    animation: none; /* Stop pulse on focus */
}

/* Random crypto button */
.optional-asset-actions {
    margin-top: 12px;
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-random-crypto {
    padding: 6px 10px;
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.15), rgba(102, 126, 234, 0.15));
    border: 2px solid rgba(88, 166, 255, 0.4);
    border-radius: 6px;
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    -webkit-tap-highlight-color: rgba(88, 166, 255, 0.3);
}

.btn-random-crypto:hover {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.25), rgba(102, 126, 234, 0.25));
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.3);
}

.btn-random-crypto:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(88, 166, 255, 0.2);
}

.random-icon {
    font-size: 0.9rem;
    animation: spin 8s linear infinite;
    display: inline-block;
    opacity: 0.8;
    flex-shrink: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Random stock button */
.btn-random-stock {
    padding: 6px 10px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(59, 130, 246, 0.15));
    border: 2px solid rgba(34, 197, 94, 0.4);
    border-radius: 6px;
    color: #22c55e;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
    white-space: nowrap;
    -webkit-tap-highlight-color: rgba(34, 197, 94, 0.3);
}

.btn-random-stock:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(59, 130, 246, 0.25));
    border-color: #22c55e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-random-stock:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.2);
}

.info-icon-stock {
    font-size: 0.75rem;
    color: rgba(34, 197, 94, 0.7);
    cursor: help;
    margin-left: auto;
    padding: 2px 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.info-icon-stock:hover {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
    transform: scale(1.1);
}

.optional-hint {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-align: center;
    font-style: italic;
}

/* Mobile adjustments for optional input */
@media (max-width: 768px) {
    .token-input-group-optional {
        margin-bottom: 16px;
    }
    
    .optional-asset-actions {
        flex-direction: row;
        gap: 6px;
        justify-content: center;
        align-items: center;
    }
    
    .btn-random-crypto {
        padding: 8px 10px;
        font-size: 0.75rem;
        min-height: 40px; /* Better touch target */
    }
    
    .btn-random-stock {
        padding: 8px 10px;
        font-size: 0.75rem;
        min-height: 40px; /* Better touch target */
    }
    
    .info-icon-stock {
        width: 18px;
        height: 18px;
        font-size: 0.8rem;
    }
    
    .optional-hint {
        font-size: 0.75rem;
    }
}

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

.token-input-wrapper {
    display: flex;
    gap: 0;
    align-items: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0;
    transition: all 0.3s ease;
    position: relative;
}

.token-input-wrapper:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.token-input-wrapper input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    color: var(--text-primary) !important;
    padding: 12px 14px !important;
    padding-right: 40px !important; /* Make room for the x button */
    box-shadow: none !important;
    transform: none !important;
}

.token-input-wrapper input:focus {
    outline: none;
    box-shadow: none !important;
    transform: none !important;
}

.btn-remove-token {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-tertiary);
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
    margin-right: 8px;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
    -webkit-tap-highlight-color: rgba(248, 81, 73, 0.3);
}

.btn-remove-token:hover {
    background: rgba(248, 81, 73, 0.15);
    color: var(--error);
    opacity: 1;
}

.btn-remove-token.hidden {
    display: none;
}

.btn-add-token {
    width: auto;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 8px auto 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    opacity: 0.7;
}

.btn-add-token:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.4);
    color: var(--text-secondary);
    opacity: 1;
    transform: translateY(-1px);
}

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

.btn-add-token span {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1;
    position: relative;
    z-index: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.8rem;
    word-break: normal;
    overflow-wrap: break-word;
    orphans: 2;
    widows: 2;
    line-height: 1.4;
}

input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary) !important;
}

/* Gray out default values to show they're editable */
.token-input.default-value {
    color: var(--text-tertiary);
    font-style: italic;
}

input[type="text"],
input[type="password"],
select {
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="text"]:hover,
input[type="password"]:hover,
select:hover {
    border-color: rgba(88, 166, 255, 0.4);
    background: rgba(28, 33, 40, 0.7);
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2), 0 4px 12px rgba(88, 166, 255, 0.15);
    transform: translateY(-2px) scale(1.01);
    background: var(--bg-secondary);
}

input[type="text"],
select {
    transition: all 0.2s ease;
}

input[type="text"]:hover,
select:hover {
    border-color: rgba(88, 166, 255, 0.5);
}

input::placeholder {
    color: var(--text-secondary);
}

small {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    word-break: normal;
    overflow-wrap: break-word;
    orphans: 2;
    widows: 2;
    line-height: 1.5;
}

.timeframe-note {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.08), rgba(255, 165, 0, 0.03));
    border-left: 3px solid #ffa500;
    padding: 8px 12px;
    border-radius: 6px;
    color: #ffb732;
    margin-top: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.optional-label {
    color: var(--text-secondary);
    font-weight: normal;
    font-size: 0.85rem;
}

.api-key-status {
    display: block;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.api-key-status.configured {
    background: rgba(63, 185, 80, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.api-key-status.not-configured {
    background: rgba(248, 81, 73, 0.1);
    color: var(--error);
    border: 1px solid var(--error);
}

.btn-primary {
    width: 100%;
    padding: 16px 24px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
    position: relative;
    overflow: hidden;
    animation: gentleSwell 3s ease-in-out infinite;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover:not(:disabled)::after {
    width: 300px;
    height: 300px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 16px 48px rgba(102, 126, 234, 0.7),
        0 0 40px rgba(88, 166, 255, 0.5),
        0 8px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    filter: brightness(1.1);
}

@keyframes gentleSwell {
    0%, 100% {
        transform: scale(1) translateY(0);
        box-shadow: 
            0 8px 24px rgba(102, 126, 234, 0.5),
            0 0 20px rgba(88, 166, 255, 0.3);
    }
    50% {
        transform: scale(1.01) translateY(-2px);
        box-shadow: 
            0 12px 32px rgba(102, 126, 234, 0.6),
            0 0 30px rgba(88, 166, 255, 0.4);
    }
}

/* Desktop: Reduce analyze button glow */
@media (min-width: 769px) {
    .btn-primary {
        animation: gentleSwellDesktop 3s ease-in-out infinite;
    }
    
    @keyframes gentleSwellDesktop {
        0%, 100% {
            transform: scale(1) translateY(0);
            box-shadow: 
                0 4px 12px rgba(102, 126, 234, 0.3),
                0 0 10px rgba(88, 166, 255, 0.2);
        }
        50% {
            transform: scale(1.005) translateY(-1px);
            box-shadow: 
                0 6px 16px rgba(102, 126, 234, 0.35),
                0 0 15px rgba(88, 166, 255, 0.25);
        }
    }
    
    .btn-primary:hover:not(:disabled) {
        transform: translateY(-2px) scale(1.01);
        box-shadow: 
            0 8px 24px rgba(102, 126, 234, 0.4),
            0 0 20px rgba(88, 166, 255, 0.3),
            0 4px 12px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
        filter: brightness(1.05);
    }
    
    .btn-primary.in-view {
        animation: analyzeButtonGlowDesktop 2s ease-in-out infinite;
        box-shadow: 
            0 8px 24px rgba(102, 126, 234, 0.5),
            0 0 25px rgba(88, 166, 255, 0.35),
            0 0 40px rgba(88, 166, 255, 0.2),
            0 4px 12px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
        filter: brightness(1.08);
        transform: translateY(-1px) scale(1.01);
    }
    
    @keyframes analyzeButtonGlowDesktop {
        0%, 100% {
            box-shadow: 
                0 8px 24px rgba(102, 126, 234, 0.5),
                0 0 25px rgba(88, 166, 255, 0.35),
                0 0 40px rgba(88, 166, 255, 0.2),
                0 4px 12px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
        }
        50% {
            box-shadow: 
                0 10px 30px rgba(102, 126, 234, 0.6),
                0 0 35px rgba(88, 166, 255, 0.45),
                0 0 50px rgba(88, 166, 255, 0.3),
                0 6px 16px rgba(0, 0, 0, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
        }
    }
    
    .btn-primary:active:not(:disabled) {
        animation: analyzeClickDesktop 0.6s ease;
    }
    
    @keyframes analyzeClickDesktop {
        0% {
            transform: scale(1);
        }
        30% {
            transform: scale(0.97);
        }
        50% {
            transform: scale(1.02);
            box-shadow: 
                0 12px 36px rgba(102, 126, 234, 0.5),
                0 0 30px rgba(88, 166, 255, 0.4),
                0 0 50px rgba(88, 166, 255, 0.25);
        }
        100% {
            transform: scale(1);
        }
    }
}

.btn-primary:active:not(:disabled) {
    animation: analyzeClick 0.6s ease;
}

@keyframes analyzeClick {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(0.95);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 
            0 20px 60px rgba(102, 126, 234, 0.8),
            0 0 50px rgba(88, 166, 255, 0.6),
            0 0 100px rgba(88, 166, 255, 0.3);
    }
    100% {
        transform: scale(1);
    }
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Analyze button glow when in view */
.btn-primary.in-view {
    animation: analyzeButtonGlow 2s ease-in-out infinite;
    box-shadow: 
        0 16px 48px rgba(102, 126, 234, 0.8),
        0 0 50px rgba(88, 166, 255, 0.6),
        0 0 80px rgba(88, 166, 255, 0.4),
        0 8px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    filter: brightness(1.15);
    transform: translateY(-2px) scale(1.02);
}

@keyframes analyzeButtonGlow {
    0%, 100% {
        box-shadow: 
            0 16px 48px rgba(102, 126, 234, 0.8),
            0 0 50px rgba(88, 166, 255, 0.6),
            0 0 80px rgba(88, 166, 255, 0.4),
            0 8px 24px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 20px 60px rgba(102, 126, 234, 1),
            0 0 70px rgba(88, 166, 255, 0.8),
            0 0 100px rgba(88, 166, 255, 0.6),
            0 12px 32px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

/* Button Loading State */
.btn-loading {
    width: 100%;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.15), rgba(88, 166, 255, 0.05));
    border: 2px solid var(--accent-primary);
    border-radius: 12px;
    margin-top: 12px;
    animation: pulseGlow 2s ease-in-out infinite;
}

.btn-loading-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.btn-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(88, 166, 255, 0.3);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-loading-text {
    text-align: left;
    flex: 1;
}

.loading-message {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.loading-details {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(88, 166, 255, 0.4),
            0 0 40px rgba(102, 126, 234, 0.3),
            inset 0 0 20px rgba(88, 166, 255, 0.1);
        border-color: rgba(88, 166, 255, 0.6);
    }
    50% {
        box-shadow: 
            0 0 40px rgba(88, 166, 255, 0.7),
            0 0 60px rgba(102, 126, 234, 0.5),
            inset 0 0 30px rgba(88, 166, 255, 0.2);
        border-color: rgba(88, 166, 255, 0.9);
    }
}

.loading {
    text-align: center;
    padding: 40px;
}

/* General hidden utility class */
.hidden {
    display: none !important;
}

.loading.hidden {
    display: none;
}

.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results {
    animation: fadeIn 0.5s ease;
}

.results.hidden {
    display: none;
}

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

.risk-free-rate {
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: 8px;
    margin-top: 32px;
    margin-bottom: 0;
    text-align: center;
    border: 1px solid var(--border-color);
    opacity: 0;
    animation: fadeIn 0.8s ease 0.6s forwards;
}

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

.risk-free-rate .label {
    color: var(--text-secondary);
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.risk-free-rate .value {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Tooltip styles */
.rate-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.rate-tooltip:hover {
    opacity: 1;
}

.tooltip-text {
    visibility: hidden;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
    width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
    font-weight: 400;
}

/* Small info icons in labels */
.info-icon-small {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: help;
    opacity: 0.7;
    transition: opacity 0.2s ease, color 0.2s ease;
    vertical-align: middle;
    line-height: 1;
}

.info-icon-small:hover {
    opacity: 1;
    color: var(--accent-primary);
}

/* Simple tooltip for small info icons */
.info-icon-small[data-tooltip] {
    position: relative;
}

.info-icon-small[data-tooltip]:hover::after,
.info-icon-small[data-tooltip]:active::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    line-height: 1.4;
    white-space: nowrap;
    max-width: 250px;
    white-space: normal;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    z-index: 1000;
    pointer-events: none;
}

.info-icon-small[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--bg-secondary);
    z-index: 1000;
    pointer-events: none;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--bg-secondary);
}

.rate-tooltip:hover .tooltip-text,
.tooltip-text.visible {
    visibility: visible;
    opacity: 1;
}

.rate-tooltip {
    cursor: pointer;
}

.rate-tooltip:active {
    transform: scale(0.95);
}

.comparison {
    display: grid;
    gap: 24px;
    margin-bottom: 24px;
}

.comparison.single {
    grid-template-columns: 1fr;
}

.comparison.multiple {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Info Icons and Metric Tooltips */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(88, 166, 255, 0.15);
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    margin-left: 6px;
    transition: all 0.2s ease;
    vertical-align: middle;
    flex-shrink: 0;
}

.info-icon:hover {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.15);
}

.info-icon:active {
    transform: scale(0.95);
}

.metric-tooltip-popup {
    position: fixed;
    background: var(--bg-secondary);
    border: 2px solid var(--accent-primary);
    border-radius: 12px;
    padding: 16px;
    max-width: 350px;
    min-width: 280px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    animation: tooltipFadeIn 0.2s ease-out;
    overflow: visible;
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.tooltip-header strong {
    color: var(--accent-primary);
    font-size: 1rem;
}

.tooltip-close {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-tertiary);
    transition: color 0.2s ease;
    line-height: 1;
    padding: 0 4px;
}

.tooltip-close:hover {
    color: var(--text-primary);
}

.tooltip-content {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow: visible;
    max-width: 350px;
    display: block;
}

.tooltip-content code {
    display: block;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 4px;
    margin: 8px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.3;
    white-space: pre-wrap;
    overflow-x: hidden !important;
    overflow-y: visible;
}

.tooltip-content pre {
    display: block;
    margin: 8px 0;
    padding: 0;
    background: transparent;
    border: none;
    overflow: visible;
}

.tooltip-content pre code {
    display: block;
    background: rgba(0, 0, 0, 0.1);
    padding: 6px 8px;
    border-radius: 6px;
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.3;
    white-space: pre-wrap;
    overflow-x: hidden !important;
    overflow-y: visible;
    word-wrap: break-word;
}

.tooltip-content a {
    color: #22c55e;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.tooltip-content a:hover {
    color: #16a34a;
}

.tooltip-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

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

/* Desktop: Show all assets side by side when space allows */
@media (min-width: 1400px) {
    .comparison.multiple {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Larger desktop: Further optimize for 5 columns */
@media (min-width: 1800px) {
    .comparison.multiple {
        grid-template-columns: repeat(5, 1fr);
    }
}

.token-result {
    background: var(--bg-tertiary);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    position: relative;
    opacity: 0;
    animation: slideInFromSide 0.6s ease forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.token-result:nth-child(odd) {
    animation-delay: 0.1s;
}

.token-result:nth-child(even) {
    animation-delay: 0.2s;
}

.token-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(88, 166, 255, 0.15);
}

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

.token-result h3 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 1.3rem;
    text-transform: capitalize;
    color: var(--text-primary);
}

.timeframe-context {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-style: italic;
}

.overview-context {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
    padding: 12px 20px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    word-break: normal;
    overflow-wrap: break-word;
    orphans: 2;
    widows: 2;
    border-left: 3px solid var(--accent-primary);
}

.stat-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.stat-sublabel {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-style: italic;
    margin-top: 2px;
    opacity: 0.8;
}

.stat-highlight {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.08), rgba(88, 166, 255, 0.03));
    border-left: 3px solid var(--accent-primary);
    padding: 12px;
    border-radius: 8px;
}

.vs-divider {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-align: center;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comparison.multiple:has(.vs-divider) {
    grid-template-columns: 1fr auto 1fr;
}

/* Summary Section Styles */
.summary-section {
    margin: 24px 0;
}

.summary-title {
    font-size: 1.4rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

/* Desktop: Show all assets side by side when space allows */
@media (min-width: 1400px) {
    .summary-cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Larger desktop: Further optimize for 5 columns */
@media (min-width: 1800px) {
    .summary-cards {
        grid-template-columns: repeat(5, 1fr);
    }
}

.summary-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s ease, border-color 0.2s, box-shadow 0.3s ease;
    opacity: 0;
    animation: scaleIn 0.5s ease forwards;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(88, 166, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(88, 166, 255, 0.08), transparent);
    transition: left 0.5s ease;
}

.summary-card:hover::before {
    left: 100%;
}

.summary-card:nth-child(1) {
    animation-delay: 0.1s;
}

.summary-card:nth-child(2) {
    animation-delay: 0.2s;
}

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

.summary-card:nth-child(4) {
    animation-delay: 0.4s;
}

.summary-card:nth-child(5) {
    animation-delay: 0.5s;
}

.summary-card:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: var(--primary);
    box-shadow: 
        0 12px 32px rgba(88, 166, 255, 0.25),
        0 0 20px rgba(88, 166, 255, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(88, 166, 255, 0.1);
}

.summary-card.clickable {
    cursor: pointer;
    position: relative;
    -webkit-tap-highlight-color: rgba(88, 166, 255, 0.2);
}

.summary-card.clickable:active {
    transform: translateY(-2px) scale(0.98);
}

.card-tooltip {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(88, 166, 255, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.summary-card.clickable:hover .card-tooltip {
    opacity: 1;
}

.tap-hint {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    font-style: italic;
    margin: -8px 0 16px 0;
    animation: gentlePulse 2s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.summary-card.excellent {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(63, 185, 80, 0.08), rgba(63, 185, 80, 0.02));
}

.summary-card.good {
    border-color: #4a9eff;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.08), rgba(74, 158, 255, 0.02));
}

.summary-card.poor {
    border-color: var(--error);
    background: linear-gradient(135deg, rgba(248, 81, 73, 0.08), rgba(248, 81, 73, 0.02));
}

.summary-card h4 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.current-price-summary {
    text-align: center;
    padding: 10px 0;
    margin-bottom: 8px;
    border-bottom: 2px solid var(--accent-primary);
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.08), rgba(102, 126, 234, 0.05));
    border-radius: 6px;
    margin: 0 -8px 8px -8px;
    padding: 10px 8px;
}

.current-price-summary .price-label {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.current-price-summary .price-value {
    color: var(--accent-primary);
    font-size: 1.3rem;
    font-weight: 700;
    display: block;
}

.price-range-summary {
    text-align: center;
    padding: 8px 0;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.price-range-summary .range-label {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.price-range-summary .range-value {
    color: var(--accent-primary);
    font-size: 0.95rem;
    font-weight: 600;
}

.summary-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-stat:last-child {
    border-bottom: none;
}

.summary-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.summary-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Detailed Section Styles */
.detailed-section {
    margin: 32px 0;
}

.detailed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.detailed-header h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin: 0;
}

.toggle-details-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-details-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.detailed-content {
    max-height: 10000px;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 1;
}

.detailed-content.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Metrics Table Styles */
.metrics-table-wrapper {
    margin: 20px 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.table-context {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.metrics-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    border-radius: 12px;
    background: var(--bg-tertiary);
    padding: 16px;
    position: relative;
}

.metrics-table .metric-name {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.metrics-table .metric-name-text {
    flex: 1;
}

.metrics-table .table-info-icon {
    width: 16px;
    height: 16px;
    font-size: 0.7rem;
    flex-shrink: 0;
    cursor: pointer;
}

/* Scroll hint shadow for mobile */
.metrics-table::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to left, rgba(20, 22, 32, 0.8), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    .metrics-table::after {
        opacity: 1; /* Show scroll hint on mobile */
    }
}

.metrics-table table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary);
}

.metrics-table th {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.15), rgba(88, 166, 255, 0.05));
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--accent-primary);
    color: var(--text-primary);
}

.metrics-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

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

.metrics-table tbody tr:hover {
    background: rgba(88, 166, 255, 0.05);
}

.metrics-table .metric-name {
    font-weight: 600;
    color: var(--text-secondary);
}

.metrics-table .metric-value {
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
}

/* Asset Interpretation Cards */
.interpretations-section {
    margin-top: 32px;
}

.asset-interpretation-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: scaleIn 0.5s ease-out forwards;
}

.asset-interpretation-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 16px rgba(88, 166, 255, 0.15);
}

.asset-interpretation-card.highlighted {
    animation: highlightPulse 2s ease-in-out;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(88, 166, 255, 0.3);
}

@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(88, 166, 255, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(88, 166, 255, 0.3);
    }
    100% {
        box-shadow: 0 0 0 4px rgba(88, 166, 255, 0.3);
    }
}

.asset-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.10), rgba(88, 166, 255, 0.03));
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.asset-card-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.expand-asset-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.expand-asset-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: scale(1.05);
}

.expand-icon {
    transition: transform 0.3s ease;
}

.asset-card-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.asset-card-content:not(.collapsed) {
    max-height: 10000px;
    padding: 20px;
}

.interpretation-intro {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 20px;
    text-align: center;
}

.winner {
    padding: 24px;
    background: linear-gradient(135deg, rgba(63, 185, 80, 0.1), rgba(63, 185, 80, 0.05));
    border-radius: 12px;
    border: 2px solid var(--success);
    margin-bottom: 24px;
    opacity: 0;
    animation: pulseIn 0.8s ease forwards;
    box-shadow: 
        0 8px 24px rgba(63, 185, 80, 0.2),
        0 0 40px rgba(63, 185, 80, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(63, 185, 80, 0.2);
    position: relative;
}

.winner.higher {
    border-color: var(--success);
}

@keyframes pulseIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.winner.lower {
    border-color: var(--error);
}

.winner-header {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 16px;
    text-align: center;
}

.winner-price-range {
    text-align: center;
    padding: 12px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.08), rgba(88, 166, 255, 0.03));
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.winner-price-range .price-range-line-1,
.winner-price-range .price-range-line-2,
.winner-price-range .price-range-line-3,
.winner-price-range .price-range-line-current {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.price-range-line-current {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
    text-align: center;
}

.price-range-line-current .price-label {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.price-range-line-current .price-value-large {
    display: block;
    color: var(--accent-primary);
    font-size: 1.8rem;
    font-weight: 700;
}

.winner-price-range .price-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

.winner-price-range .price-value {
    color: var(--accent-primary);
    font-size: 1.1rem;
    font-weight: 700;
}

.winner-price-range .price-context {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-style: italic;
}

.winner-metrics {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.winner-metric-row {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
}

.winner-metric-row:first-child {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.winner-metric-row:last-child {
    padding-top: 12px;
}

.winner-metric-row .metric-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.winner-metric-row .metric-value {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem;
}

.winner-comparison {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 12px;
}

.winner-context {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    line-height: 1.5;
}

.metric-sublabel {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-tertiary);
    font-style: italic;
    margin-left: 4px;
}

.error {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid var(--error);
    border-radius: 8px;
    padding: 16px;
    color: var(--error);
    margin-top: 24px;
}

.error.hidden {
    display: none;
}

.info-card {
    margin-bottom: 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--accent-primary);
}

.info-content h3 {
    color: var(--accent-primary);
    font-size: 1.2rem;
    margin-top: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

.info-content h3:first-child {
    margin-top: 0;
}

.info-content p {
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.info-content ul {
    margin-left: 20px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.info-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.info-content li strong {
    color: var(--accent-primary);
}

.info-content .note {
    background: rgba(88, 166, 255, 0.1);
    border-left: 3px solid var(--accent-primary);
    padding: 12px 16px;
    margin-top: 20px;
    border-radius: 4px;
    font-size: 0.95rem;
}

.info-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.interpretation {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.interpretation-content {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

.interpretation-header {
    color: var(--accent-primary);
    font-size: 0.95rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.interpretation-text {
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.interpretation-text.excellent {
    color: var(--success);
}

.interpretation-text.good {
    color: var(--success);
}

.interpretation-text.moderate {
    color: var(--warning);
}

.interpretation-text.poor {
    color: var(--error);
}

.interpretation-text.very-poor {
    color: var(--error);
}

.context-note {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.08), rgba(88, 166, 255, 0.03));
    border-left: 3px solid var(--accent-primary);
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.context-note strong {
    color: var(--accent-primary);
    display: block;
    margin-bottom: 6px;
}

.interpretation-details {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.interpretation-details p {
    margin-bottom: 8px;
    line-height: 1.6;
}

.interpretation-details strong {
    color: var(--text-primary);
    font-weight: 600;
}

.interpretation-details code {
    display: block;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 4px;
    margin: 8px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.3;
    white-space: pre-wrap;
    overflow-x: hidden !important;
    overflow-y: visible;
    word-wrap: break-word;
}

.interpretation-details pre {
    display: block;
    margin: 8px 0;
    padding: 0;
    background: transparent;
    border: none;
    overflow: visible;
}

.interpretation-details pre code {
    display: block;
    background: rgba(0, 0, 0, 0.1);
    padding: 6px 8px;
    border-radius: 6px;
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.3;
    white-space: pre-wrap;
    overflow-x: hidden !important;
    overflow-y: visible;
    word-wrap: break-word;
}

.interpretation-details ul {
    margin: 8px 0;
    padding-left: 20px;
}

.interpretation-separator {
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

.sortino-interpretation {
    margin-top: 20px;
}

.correlation-interpretation {
    margin-top: 20px;
}

@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    /* Improve text readability and prevent awkward breaks */
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: none;
        -webkit-hyphens: none;
        -moz-hyphens: none;
        word-break: normal;
    }

    header h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .card {
        padding: 20px 16px;
        margin-bottom: 16px;
        border-radius: 12px;
    }

    header .subtitle {
        font-size: 0.95rem;
        line-height: 1.4;
    }

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

    .info-card h2 {
        font-size: 1.3rem;
    }

    .overview {
        font-size: 0.95rem;
    }

    .features-list li {
        font-size: 0.9rem;
        padding-left: 28px;
    }

    .tip {
        font-size: 0.9rem;
        padding: 10px;
    }

    .form-intro {
        font-size: 0.85rem;
        padding: 14px 16px;
        margin: 0 0 20px 0;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .btn-add-token {
        padding: 6px 12px;
        font-size: 0.8rem;
        opacity: 0.6;
    }

    .comparison {
        grid-template-columns: 1fr;
    }

    .vs-divider {
        padding: 10px;
        margin: 10px 0;
        font-size: 1rem;
    }

    .token-result h3 {
        font-size: 1.3rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .stat-item {
        padding: 10px;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .stat-value {
        font-size: 1rem;
    }

    .stat-sublabel {
        font-size: 0.7rem;
    }

    .stat-highlight {
        padding: 10px;
    }

    /* Interpretation sections for mobile */
    .interpretation-content {
        padding: 14px;
        margin: 12px 0;
    }

    .interpretation-header {
        font-size: 0.95rem;
        margin-bottom: 10px;
        line-height: 1.3;
    }

    .interpretation-text {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 12px;
    }

    .interpretation-details {
        padding: 10px;
        margin-top: 10px;
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .interpretation-details p {
        margin: 10px 0;
        line-height: 1.5;
    }

    /* Better mobile tooltips */
    .metric-tooltip-popup {
        max-width: calc(100vw - 24px);
        min-width: calc(100vw - 48px);
        left: 12px !important;
        right: 12px;
        font-size: 0.9rem;
    }

    .tooltip-content {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .tooltip-header {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .tooltip-close {
        font-size: 1.5rem;
        min-width: 24px;
        min-height: 24px;
    }


    /* Winner comparison mobile optimization */
    .winner {
        padding: 16px;
    }

    .winner-header {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .winner {
        padding: 18px;
    }

    .winner-header {
        font-size: 1.05rem;
        line-height: 1.4;
        margin-bottom: 14px;
    }

    .winner-price-range {
        font-size: 0.9rem;
        margin: 12px 0;
        line-height: 1.4;
    }

    .winner-metrics {
        padding: 14px;
    }

    .winner-metric-row {
        grid-template-columns: auto 1fr;
        gap: 10px 12px;
        padding: 6px 0;
    }

    .winner-metric-row .metric-label {
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .winner-metric-row .metric-value {
        font-size: 0.95rem;
        text-align: right;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
    }

    /* Improve info icon touch targets on mobile */
    .info-icon {
        width: 22px;
        height: 22px;
        font-size: 0.8rem;
        min-width: 22px;
        flex-shrink: 0;
    }

    .winner-comparison {
        font-size: 0.9rem;
        padding-top: 10px;
    }

    /* Mobile tap interactions */
    .tap-hint {
        font-size: 0.85rem;
        margin: -4px 0 12px 0;
    }

    .card-tooltip {
        display: none; /* Hide tooltip on mobile, tap hint is sufficient */
    }

    .summary-card.clickable:active {
        transform: translateY(-1px) scale(0.96);
    }

    /* Button optimizations - better touch targets */
    .btn-primary {
        padding: 16px 20px;
        font-size: 1.05rem;
        min-height: 52px;
    }

    input, select, textarea {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
        min-height: 44px;
        padding: 12px 14px;
    }

    label {
        font-size: 0.9rem;
        margin-bottom: 6px;
        line-height: 1.3;
    }

    /* Risk-free rate mobile optimization */
    .risk-free-rate {
        padding: 14px;
        margin: 20px 0;
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .risk-free-rate .value {
        font-size: 1.05rem;
    }

    .risk-free-rate .explanation {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-top: 8px;
    }

    /* Metrics Table Mobile Optimization */
    .metrics-table-wrapper {
        margin: 16px 0; /* Don't extend to edges to prevent cutoff */
        padding: 0 12px;
    }

    .table-context {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    .metrics-table {
        border-radius: 8px;
        padding: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        background: var(--bg-tertiary);
    }

    .metrics-table table {
        width: 100%;
        font-size: 0.75rem;
        margin-left: 0; /* Ensure no negative margin */
    }

    .metrics-table th,
    .metrics-table td {
        padding: 8px 6px;
        white-space: nowrap;
        font-size: 0.75rem;
    }

    .metrics-table th:first-child,
    .metrics-table td:first-child {
        position: sticky;
        left: 8px; /* Account for padding */
        background: var(--bg-tertiary);
        z-index: 10;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
        max-width: 100px;
        min-width: 90px;
        padding-right: 8px;
        padding-left: 8px; /* Add left padding so text isn't cut off */
    }

    .metrics-table th:first-child {
        background: linear-gradient(135deg, rgba(88, 166, 255, 0.15), rgba(88, 166, 255, 0.05));
        z-index: 11;
    }

    .metrics-table .metric-name {
        font-size: 0.7rem;
        font-weight: 600;
        line-height: 1.2;
        word-wrap: break-word;
        white-space: normal;
        max-width: 90px;
    }

    .metrics-table .metric-value {
        font-size: 0.75rem;
        min-width: 70px;
    }

    .metrics-table th:not(:first-child) {
        min-width: 70px;
        max-width: 85px;
        font-size: 0.75rem;
    }

    /* Add scroll instruction */
    .metrics-table-wrapper::before {
        content: '← Swipe to see all assets →';
        display: block;
        text-align: center;
        color: var(--text-tertiary);
        font-size: 0.75rem;
        font-style: italic;
        margin-bottom: 8px;
        animation: gentlePulse 2s ease-in-out infinite;
    }

    .btn-remove-token {
        width: 24px;
        height: 24px;
        font-size: 16px;
        right: 6px;
    }

    /* Reduce spacing on mobile */
    .form-group {
        margin-bottom: 16px;
    }

    .current-price-summary {
        margin: 0 -6px 8px -6px;
        padding: 8px 6px;
    }
    
    .current-price-summary .price-value {
        font-size: 1.1rem;
    }
    
    .price-range-summary {
        font-size: 0.85rem;
        margin-bottom: 10px;
        line-height: 1.4;
    }

    label {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }

    input[type="text"],
    select {
        font-size: 0.95rem;
        padding: 10px;
    }

    /* Summary cards mobile */
    .summary-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .summary-card {
        padding: 16px;
    }

    .summary-card h4 {
        font-size: 1.1rem;
        margin-bottom: 10px;
        line-height: 1.3;
    }

    .price-range-summary {
        font-size: 0.85rem;
        margin-bottom: 10px;
        line-height: 1.4;
    }

    .summary-stat {
        padding: 8px 0;
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 8px;
    }

    .summary-label {
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .summary-value {
        font-size: 1rem;
        text-align: right;
        font-weight: 600;
    }

    .summary-label {
        font-size: 0.85rem;
    }

    .summary-value {
        font-size: 1rem;
    }

    /* Detailed section mobile */
    .detailed-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .detailed-header h3 {
        font-size: 1.2rem;
    }

    .toggle-details-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }

    /* Tooltip mobile adjustments */
    .tooltip-text {
        width: 240px;
        font-size: 0.8rem;
        padding: 10px 12px;
        left: auto;
        right: 0;
        transform: none;
    }

    .tooltip-text::after {
        left: auto;
        right: 20px;
        transform: none;
    }

    /* Hide excessive details on very small screens */
    @media (max-width: 480px) {
        .interpretation-details {
            font-size: 0.8rem;
        }

        .features-list {
            font-size: 0.85rem;
        }

        header h1 {
            font-size: 1.5rem;
        }

        .winner-metric-row {
            gap: 6px 8px;
        }

        .summary-title {
            font-size: 1.2rem;
        }

        .summary-card h4 {
            font-size: 1rem;
        }
    }
}

/* Additional Interactive Animations */

/* Enhanced button press effect */
.btn-primary:active,
.btn-add-token:active {
    animation: buttonPress 0.2s ease;
}

@keyframes buttonPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Remove button enhanced animations */
.btn-remove-token::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(248, 81, 73, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
    z-index: 0;
}

.btn-remove-token:hover::before {
    width: 50px;
    height: 50px;
}

.btn-remove-token {
    position: relative;
}

.btn-remove-token:active {
    transform: translateY(-50%) scale(0.9);
}

/* Select dropdown animations */
select {
    cursor: pointer;
}

select:active {
    transform: scale(0.98);
}

/* Stat items pulse on hover */
.stat-item:hover {
    animation: gentlePulse 1s ease infinite;
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* Winner header shimmer effect */
.winner-header {
    position: relative;
    overflow: hidden;
}

.winner-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Loading spinner enhancement */
.spinner {
    animation: spin 1s linear infinite, pulse 2s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Form intro breathing effect */
.form-intro {
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { box-shadow: 0 0 0 0 rgba(88, 166, 255, 0.2); }
    50% { box-shadow: 0 0 0 4px rgba(88, 166, 255, 0.1); }
}

/* Tooltip enhanced appearance */
.tooltip-text {
    animation: tooltipAppear 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tooltip-text.visible {
    animation: tooltipAppear 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes tooltipAppear {
    from {
        opacity: 0;
        transform: translateY(-10px) translateX(-50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(-50%) scale(1);
    }
}

/* Token input wrapper hover glow */
.token-input-wrapper {
    transition: all 0.3s ease;
}

.token-input-wrapper:hover {
    filter: drop-shadow(0 0 8px rgba(88, 166, 255, 0.15));
}

/* Interpretation content slide in */
.interpretation-content {
    animation: slideInContent 0.4s ease forwards;
    opacity: 0;
}

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

/* Enhanced toggle button interaction */
.toggle-details-btn:active {
    transform: scale(0.96);
}

.toggle-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

/* Timeframe select bounce on change */
select:focus {
    animation: selectBounce 0.4s ease;
}

@keyframes selectBounce {
    0%, 100% { transform: translateY(-2px) scale(1.01); }
    50% { transform: translateY(-3px) scale(1.02); }
}

/* Improved text wrapping to prevent awkward line breaks */
body, .card, .overview, .interpretation-text, .interpretation-details, 
.summary-card, .winner, .form-intro, .tip, .table-context {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: none;
    -webkit-hyphens: none;
    -moz-hyphens: none;
    text-rendering: optimizeLegibility;
}

/* Prevent orphaned words - better line breaks (minimum 2 words per line) */
p, .overview, .interpretation-text, .interpretation-details p,
.summary-stat, .winner-comparison, .form-intro {
    orphans: 2;
    widows: 2;
}

/* Responsive text sizing for better wrapping */
@media (max-width: 768px) {
    .overview, .interpretation-text, .interpretation-details {
        font-size: clamp(0.85rem, 2.5vw, 0.95rem);
        line-height: 1.6;
    }
    
    .form-intro {
        font-size: clamp(0.8rem, 2.5vw, 0.85rem);
        line-height: 1.5;
    }
    
    .winner-header, .summary-title {
        font-size: clamp(1rem, 3vw, 1.2rem);
        line-height: 1.4;
    }
    
    /* Mobile tooltip adjustments */
    .info-icon-small[data-tooltip]:hover::after,
    .info-icon-small[data-tooltip]:active::after {
        max-width: 200px;
        font-size: 0.75rem;
        padding: 6px 10px;
        white-space: normal;
        word-wrap: break-word;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .overview, .interpretation-text {
        font-size: clamp(0.9rem, 1.2vw, 1rem);
    }
}

/* Site Footer with Disclosure */
.site-footer {
    margin-top: 60px;
    padding: 0;
    border-top: 1px solid var(--border-color);
    text-align: left;
    position: relative;
    z-index: 1;
    background: var(--bg-primary);
}

/* Footer Sections (Disclaimer and About) */
.footer-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 20px 16px;
    border-bottom: 1px solid var(--border-color);
}

.footer-section:first-child {
    padding-top: 24px;
}

.footer-section:last-of-type {
    border-bottom: none;
}

.footer-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-align: left;
}

.footer-text {
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-tertiary);
    margin: 0;
    font-style: italic;
    text-align: left;
    orphans: 2;
    widows: 2;
}

.footer-contact {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 32px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.footer-contact-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
}

.footer-contact-link {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact-link:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute; /* Default, can be overridden to fixed on mobile */
    background: var(--bg-secondary);
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    margin-top: 4px;
    animation: fadeInUp 0.2s ease-out;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Mobile: ensure dropdown is above other content */
@media (max-width: 768px) {
    .autocomplete-dropdown {
        z-index: 10000; /* Very high z-index for mobile */
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5); /* Stronger shadow on mobile */
    }
}

.autocomplete-item {
    padding: 14px 16px;
    min-height: 44px; /* Mobile-first: minimum touch target */
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: rgba(88, 166, 255, 0.2); /* Mobile tap highlight */
    touch-action: manipulation; /* Improve touch responsiveness */
}

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

.autocomplete-item:hover {
    background: var(--bg-tertiary);
}

/* Loading state for autocomplete */
.autocomplete-loading {
    border-color: rgba(88, 166, 255, 0.5);
    animation: pulseGlow 1.5s ease-in-out infinite;
}

.autocomplete-loading-item {
    cursor: default;
    pointer-events: none;
    background: transparent;
}

.autocomplete-loading-item:hover {
    background: transparent;
}

/* Spinner for loading indicator */
.autocomplete-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(88, 166, 255, 0.2);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.autocomplete-header {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.autocomplete-item strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.autocomplete-symbol {
    color: var(--accent-primary);
    font-weight: 600;
    margin-left: 8px;
    font-size: 0.9rem;
}

.autocomplete-details {
    display: flex;
    gap: 16px;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.autocomplete-price {
    color: var(--text-primary);
    font-weight: 600;
}

.autocomplete-marketcap {
    color: var(--text-secondary);
}

.autocomplete-id {
    color: var(--text-tertiary);
    font-size: 0.7rem;
    display: block;
    margin-top: 4px;
}

.token-input-wrapper {
    position: relative;
}

@media (max-width: 768px) {
    .site-footer {
        margin-top: 40px;
    }
    
    .footer-section {
        padding: 20px 14px 12px;
    }
    
    .footer-section-title {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }
    
    .footer-text {
        font-size: 0.7rem;
        line-height: 1.5;
        text-align: left;
        padding: 0;
    }
    
    .footer-contact {
        padding: 12px 14px 24px;
    }
    
    .footer-contact-text {
        font-size: 0.7rem;
    }
    
    /* Enter button mobile styles */
    .loader-enter-button {
        padding: 14px 40px;
        font-size: 1.1rem;
        margin: 32px auto 0;
        display: block;
        width: auto;
        min-width: 120px;
    }
    
    /* Floating scroll-up button */
    .scroll-up-button {
        position: fixed;
        right: 20px;
        bottom: 80px;
        width: 60px;
        height: 60px;
        background: var(--accent-gradient);
        border: none;
        border-radius: 50%;
        color: white;
        font-size: 20px;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 
            0 8px 24px rgba(102, 126, 234, 0.5),
            0 0 20px rgba(88, 166, 255, 0.3),
            0 4px 12px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        transition: all 0.3s ease;
        opacity: 0;
        transform: translateY(20px) scale(0.8);
        line-height: 1.2;
    }
    
    /* Desktop: ensure button stays on right side with proper spacing */
    @media (min-width: 769px) {
        .scroll-up-button {
            right: 24px;
            bottom: 24px;
        }
    }
    
    .scroll-up-button.visible {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    
    .scroll-up-button.fade-out {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    
    .scroll-up-button:hover {
        transform: translateY(-4px) scale(1.05);
        box-shadow: 
            0 12px 32px rgba(102, 126, 234, 0.7),
            0 0 30px rgba(88, 166, 255, 0.5),
            0 6px 16px rgba(0, 0, 0, 0.4);
        filter: brightness(1.1);
    }
    
    .scroll-up-button:active {
        transform: translateY(-2px) scale(0.98);
    }
    
    .scroll-up-button span {
        font-size: 9px;
        font-weight: 500;
        text-align: center;
        line-height: 1.1;
    }
    
    @media (max-width: 768px) {
        .scroll-up-button {
            right: 16px;
            bottom: 70px;
            width: 56px;
            height: 56px;
            font-size: 18px;
        }
        
        .scroll-up-button span {
            font-size: 8px;
        }
    }
    
    /* Scroll prompt animation */
    .scroll-prompt {
        position: fixed;
        z-index: 9999;
        pointer-events: auto;
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.4s ease;
        right: 10px;
        bottom: 20px;
        top: auto;
        transform: translateY(0) translateX(-10px);
        max-width: 200px;
        cursor: pointer;
    }
    
    .scroll-prompt.visible {
        opacity: 1;
        transform: translateY(0) translateX(0);
        animation: scrollPromptBounce 2s ease-in-out infinite;
    }
    
    .scroll-prompt-content {
        background: var(--accent-gradient);
        background-opacity: 1;
        opacity: 1;
        color: white;
        padding: 12px 20px;
        box-shadow: 0 8px 24px rgba(102, 126, 234, 0.6), 0 0 20px rgba(88, 166, 255, 0.4);
        border-radius: 12px;
        box-shadow: 
            0 8px 24px rgba(102, 126, 234, 0.5),
            0 0 20px rgba(88, 166, 255, 0.3),
            0 4px 12px rgba(0, 0, 0, 0.3);
        display: flex;
        align-items: center;
        gap: 12px;
        font-weight: 600;
        font-size: 0.95rem;
        line-height: 1.4;
        transition: all 0.3s ease;
    }
    
    .scroll-prompt:hover .scroll-prompt-content {
        transform: scale(1.05);
        box-shadow: 
            0 12px 32px rgba(102, 126, 234, 0.7),
            0 0 30px rgba(88, 166, 255, 0.5),
            0 6px 16px rgba(0, 0, 0, 0.4);
    }
    
    .scroll-prompt:active .scroll-prompt-content {
        transform: scale(0.98);
    }
    
    .scroll-prompt-icon {
        font-size: 24px;
        animation: scrollPromptArrow 1.5s ease-in-out infinite;
    }
    
    .scroll-prompt-text {
        text-align: left;
    }
    
    @keyframes scrollPromptBounce {
        0%, 100% {
            transform: translateY(-50%) translateX(0);
        }
        50% {
            transform: translateY(-50%) translateX(-8px);
        }
    }
    
    @keyframes scrollPromptArrow {
        0%, 100% {
            transform: translateY(0);
        }
        50% {
            transform: translateY(6px);
        }
    }
    
    @media (max-width: 768px) {
        .scroll-prompt-content {
            padding: 10px 16px;
            font-size: 0.85rem;
        }
        
        .scroll-prompt-icon {
            font-size: 20px;
        }
    }
    
    /* Ensure footer is visible on mobile - prevent any hiding */
    .site-footer,
    .footer-section {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .autocomplete-dropdown {
        max-height: 300px;
        font-size: 0.85rem;
    }

    .autocomplete-item {
        padding: 14px 16px; /* Mobile-first: maintain good touch target */
        min-height: 48px; /* Slightly larger on mobile for easier tapping */
    }

    .autocomplete-header {
        flex-wrap: wrap;
    }

    .autocomplete-item strong {
        font-size: 0.9rem;
    }

    .autocomplete-symbol {
        font-size: 0.85rem;
    }

    .autocomplete-details {
        flex-direction: column;
        gap: 4px;
        font-size: 0.8rem;
    }

    .autocomplete-id {
        font-size: 0.65rem;
    }
}

