/* Modern CSS for Bitcoin Price Tracker */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Floating Bitcoin particles */
.bitcoin-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    color: #ffd700;
    font-size: 1.5rem;
    animation: float 15s ease-in-out infinite;
    opacity: 0.3;
    pointer-events: none;
}

@keyframes float {
    0% { 
        transform: translate(0, 0) rotate(0deg); 
        opacity: 0.3;
    }
    25% { 
        transform: translate(50px, -30px) rotate(90deg); 
        opacity: 0.6;
    }
    50% { 
        transform: translate(100px, 20px) rotate(180deg); 
        opacity: 0.3;
    }
    75% { 
        transform: translate(30px, -50px) rotate(270deg); 
        opacity: 0.6;
    }
    100% { 
        transform: translate(0, 0) rotate(360deg); 
        opacity: 0.3;
    }
}

.container {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 90%;
    width: 600px;
    position: relative;
    z-index: 2;
    animation: slideIn 0.8s ease-out;
}

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

.header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.bitcoin-logo {
    font-size: 3rem;
    animation: spin 4s linear infinite;
}

@keyframes spin {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(90deg, #ffd700, #ff8c00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

h2 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: #ffd700;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #ffd700, #ff8c00);
    border-radius: 1px;
}

.price-container {
    margin: 1.5rem 0;
    position: relative;
}

.price {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    background: linear-gradient(90deg, #00c9ff, #92fe9d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: all 0.3s ease;
    position: relative;
}

.price::before {
    content: '₿';
    position: absolute;
    left: -2rem;
    top: 0;
    font-size: 2rem;
    color: #ffd700;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.price.loading {
    opacity: 0.7;
}

.currency {
    font-size: 1.5rem;
    color: #aaa;
    font-weight: 500;
}

.change-container {
    margin: 1rem 0;
}

.change {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    display: inline-block;
    position: relative;
    transition: all 0.3s ease;
}

.change::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
}

.change.positive {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.3);
}

.change.positive::before {
    border-bottom: 8px solid #2ecc71;
}

.change.negative {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.3);
}

.change.negative::before {
    border-top: 8px solid #e74c3c;
}

.stats-container {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 1rem;
    flex: 1;
    min-width: 150px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

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

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

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #00c9ff;
}

.comparisons-container {
    margin: 2rem 0;
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.comparisons-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    transition: left 0.8s ease;
}

.comparisons-container:hover::before {
    left: 100%;
}

.comparison {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    border: 1px solid transparent;
}

.comparison:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 215, 0, 0.3);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.comparison:active {
    transform: translateX(5px) scale(0.98);
}

.item {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
}

.item .emoji {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.comparison:hover .item .emoji {
    transform: scale(1.2) rotate(5deg);
}

.value {
    font-weight: 700;
    color: #00c9ff;
    background: linear-gradient(135deg, rgba(0, 201, 255, 0.15), rgba(146, 254, 157, 0.15));
    padding: 0.5rem 1rem;
    border-radius: 25px;
    border: 2px solid rgba(0, 201, 255, 0.4);
    box-shadow: 0 2px 8px rgba(0, 201, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.comparison:hover .value::before {
    left: 100%;
}

.comparison:hover .value {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 201, 255, 0.5);
    border-color: rgba(0, 201, 255, 0.6);
}

/* Progress bar for visual representation */
.comparison-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #00c9ff, #92fe9d);
    border-radius: 0 0 12px 12px;
    transition: width 0.8s ease;
    opacity: 0;
}

.comparison:hover .comparison-progress {
    opacity: 1;
}

.fun-facts {
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 140, 0, 0.1));
    border-radius: 20px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    animation: glow 3s ease-in-out infinite alternate;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fun-facts:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.6);
}

.fun-facts::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    transition: left 0.8s ease;
}

.fun-facts:hover::before {
    left: 100%;
}

@keyframes glow {
    from { box-shadow: 0 0 15px rgba(255, 215, 0, 0.4); }
    to { box-shadow: 0 0 25px rgba(255, 215, 0, 0.7); }
}

.fun-fact {
    font-size: 1.1rem;
    color: #ffd700;
    margin: 1rem 0;
    opacity: 1;
    font-weight: 500;
    line-height: 1.6;
    text-align: center;
    transition: all 0.5s ease;
    position: relative;
    z-index: 2;
}

.fun-fact::before {
    content: '💡';
    position: absolute;
    left: -2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    opacity: 0.7;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: translateY(-50%) scale(1) rotate(0deg); }
    50% { transform: translateY(-50%) scale(1.2) rotate(180deg); }
}

.last-updated {
    margin-top: 2rem;
    color: #aaa;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.last-updated::before {
    content: '🕐';
    font-size: 1rem;
}

/* Enhanced animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.price.updated {
    animation: pulse 0.5s ease;
}

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

.stat-card, .comparison {
    animation: slideUp 0.6s ease-out;
}

/* Loading animation */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
        width: 100%;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .price {
        font-size: 3rem;
    }
    
    .price::before {
        font-size: 1.5rem;
        left: -1.5rem;
    }
    
    .stats-container {
        flex-direction: column;
    }
    
    .stat-card {
        width: 100%;
    }
    
    .bitcoin-logo {
        font-size: 2rem;
    }
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.nav-tab {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-tab:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateY(-2px);
}

.nav-tab.active {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    border-color: #ffd700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

/* Page Management */
.page {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.page.active {
    display: block;
}

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

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

.crypto-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.crypto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.3);
}

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

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

.crypto-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.crypto-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
}

.crypto-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00c9ff;
    margin-bottom: 0.5rem;
}

.crypto-change {
    font-size: 1rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    display: inline-block;
}

.crypto-change.positive {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.crypto-change.negative {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #00c9ff;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #aaa;
}

/* Facts Grid */
.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.fact-category {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.fact-category:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.3);
}

.fact-category h3 {
    color: #ffd700;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.deep-fact {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    border-left: 3px solid #00c9ff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.deep-fact:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

/* Timeline */
.timeline {
    position: relative;
    margin: 2rem 0;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #ffd700, #00c9ff);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    background: #ffd700;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.timeline-date {
    position: absolute;
    left: -4rem;
    top: 0;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.8rem;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.3);
}

.timeline-content h4 {
    color: #ffd700;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.timeline-content p {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Predictions */
.predictions-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.prediction-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.prediction-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.3);
}

.prediction-card h3 {
    color: #ffd700;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.prediction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin: 0.5rem 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.prediction-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.prediction-year {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.8rem;
}

.prediction-price, .prediction-metric {
    font-weight: 600;
    color: #00c9ff;
    font-size: 1.1rem;
}

.prediction-reason {
    color: #aaa;
    font-size: 0.8rem;
    text-align: right;
}

.disclaimer {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin: 2rem 0;
    text-align: center;
}

.disclaimer p {
    color: #ffc107;
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-tab {
        width: 100%;
        max-width: 200px;
    }
    
    .crypto-grid {
        grid-template-columns: 1fr;
    }
    
    .facts-grid {
        grid-template-columns: 1fr;
    }
    
    .predictions-container {
        grid-template-columns: 1fr;
    }
    
    .timeline {
        padding-left: 1rem;
    }
    
    .timeline-item {
        padding-left: 1rem;
    }
    
    .timeline-date {
        position: relative;
        left: 0;
        margin-bottom: 0.5rem;
        display: inline-block;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        max-width: 95%;
        padding: 1rem;
        margin: 10px;
        border-radius: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .price {
        font-size: 2rem;
        padding: 0.5rem;
    }
    
    .price::before {
        font-size: 1.5rem;
        margin-right: 0.3rem;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        margin: 1rem 0;
    }
    
    .stat-card {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .stat-value {
        font-size: 1.1rem;
        font-weight: bold;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .comparisons-container {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        margin: 1rem 0;
    }
    
    .comparison {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .comparison .item {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .comparison .value {
        font-size: 1.1rem;
        font-weight: bold;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .fun-facts {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .fun-fact {
        font-size: 0.9rem;
        line-height: 1.4;
        padding: 0.8rem;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
        gap: 0.3rem;
        margin-bottom: 1rem;
    }
    
    .nav-tab {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
        min-width: auto;
        flex: 1;
        min-width: 0;
    }
    
    .crypto-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .crypto-card {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .crypto-price {
        font-size: 1.1rem;
        font-weight: bold;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .stat-item {
        padding: 0.8rem;
    }
    
    .stat-number {
        font-size: 1.2rem;
        font-weight: bold;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .facts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .fact-category {
        padding: 1rem;
    }
    
    .deep-fact {
        font-size: 0.9rem;
        line-height: 1.4;
        padding: 0.6rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .timeline {
        padding-left: 1rem;
    }
    
    .timeline-item {
        margin-bottom: 1.5rem;
    }
    
    .timeline-date {
        font-size: 0.9rem;
        padding: 0.3rem 0.6rem;
        min-width: 60px;
    }
    
    .timeline-content {
        padding: 0.8rem;
        margin-left: 1rem;
    }
    
    .timeline-content h4 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    
    .timeline-content p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .predictions-container {
        padding: 1rem;
    }
    
    .prediction-card {
        padding: 1rem;
    }
    
    .prediction-item {
        padding: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .prediction-year {
        font-size: 0.9rem;
        padding: 0.3rem 0.6rem;
    }
    
    .prediction-price, .prediction-metric {
        font-size: 1rem;
        font-weight: bold;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .prediction-reason {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .disclaimer {
        padding: 0.8rem;
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .bitcoin-logo {
        font-size: 2rem;
    }
    
    .last-updated {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    /* Ensure particles don't interfere with mobile */
    .particle {
        font-size: 1rem;
        opacity: 0.2;
    }
    
    /* Better touch targets for mobile */
    .comparison, .crypto-card, .stat-card, .nav-tab {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    /* Prevent horizontal scrolling */
    body {
        overflow-x: hidden;
        padding: 10px;
    }
    
    /* Better text wrapping for long numbers */
    .stat-value, .comparison-value, .crypto-price, .stat-number, .prediction-price {
        word-break: break-all;
        hyphens: auto;
        max-width: 100%;
    }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
    .container {
        max-width: 98%;
        padding: 0.8rem;
        margin: 5px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    .price {
        font-size: 1.6rem;
    }
    
    .nav-tab {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
    }
    
    .stat-card, .comparison, .crypto-card {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
    
    .fun-fact {
        font-size: 0.8rem;
        padding: 0.6rem;
    }
    
    .deep-fact {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    /* Ensure very long numbers don't break layout */
    .stat-value, .comparison-value, .crypto-price, .stat-number {
        font-size: 0.9rem !important;
        line-height: 1.2;
        word-break: break-all;
        overflow-wrap: anywhere;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .container {
        max-width: 90%;
        padding: 0.8rem;
    }
    
    .stats-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .comparisons-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .nav-tab {
        flex-shrink: 0;
        min-width: 80px;
    }
}

/* Mobile-specific optimizations */
.mobile-device .particle {
    pointer-events: none;
    animation-duration: 20s !important;
}

.small-screen .stat-value,
.small-screen .comparison-value,
.small-screen .crypto-price,
.small-screen .stat-number {
    font-size: 0.9rem !important;
    line-height: 1.2;
    word-break: break-all;
    overflow-wrap: anywhere;
    hyphens: auto;
}

/* Prevent zoom on input focus (iOS) */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    input, select, textarea {
        font-size: 16px;
    }
}

/* Better touch targets */
@media (max-width: 768px) {
    button, .nav-tab, .comparison, .crypto-card, .stat-card {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Prevent text selection on interactive elements */
    .nav-tab, .comparison, .crypto-card, .stat-card {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* Better scrolling for long content */
    .page {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Optimize animations for mobile */
    .particle {
        will-change: transform;
        transform: translateZ(0);
    }
    
    /* Reduce motion for users who prefer it */
    @media (prefers-reduced-motion: reduce) {
        .particle {
            animation: none;
        }
        
        .bitcoin-logo {
            animation: none;
        }
        
        .fun-fact {
            animation: none;
        }
    }
}