@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-orange: #f7931a;
    --bitcoin-orange: #f7931a;
    --bitcoin-orange-dark: #e6841a;
    --dark-bg: #0d1117;
    --card-bg: #161b22;
    --border-color: #30363d;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent-blue: #58a6ff;
    --success-green: #238636;
    --gradient-start: #f7931a;
    --gradient-end: #ff6b35;
    --accent-gold: #ffd700;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
    --dark-bg: #ffffff;
    --card-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --text-primary: #1a1a1a;
    --text-secondary: #333333;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --bitcoin-orange: #f7931a;
    --bitcoin-orange-dark: #d17316;
}

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

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
      sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    transition: all 0.3s ease;
    scroll-snap-type: y mandatory;
    overflow-y: auto;
}

.site-header {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.site-header-content, .header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo, .logo {
    font-family: "JetBrains Mono", monospace;
    font-size: 1.8rem;
    font-weight: 600;
    background: linear-gradient(
      135deg,
      var(--gradient-start),
      var(--gradient-end)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.site-logo:hover, .logo:hover {
    transform: translateY(-1px);
    filter: brightness(1.2);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 20px;
}

header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 0;
    scroll-snap-align: start;
}

header::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(
      circle,
      rgba(247, 147, 26, 0.1) 0%,
      transparent 70%
    );
    border-radius: 50%;
    z-index: -1;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(
      135deg,
      var(--text-primary),
      var(--primary-orange)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 4rem;
}

.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
    transform: translateY(-1px);
}

/* Common button styles */
button, .btn {
    background: linear-gradient(45deg, var(--primary-orange), #e6841a);
    color: white;
    padding: 0.75rem 1.5rem;
    margin: 0 0.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(247, 147, 26, 0.3);
}

button:hover, .btn:hover {
    background: linear-gradient(45deg, #e6841a, var(--primary-orange));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(247, 147, 26, 0.4);
}

/* Light mode button fixes */
[data-theme="light"] button,
[data-theme="light"] .btn {
    background: linear-gradient(45deg, var(--primary-orange), #d17316);
    color: white;
    box-shadow: 0 2px 4px rgba(247, 147, 26, 0.3);
}

[data-theme="light"] button:hover,
[data-theme="light"] .btn:hover {
    background: linear-gradient(45deg, #d17316, var(--primary-orange));
    box-shadow: 0 4px 12px rgba(247, 147, 26, 0.5);
}

/* Card styles */
.card, .stat-card, .result-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.card:hover, .stat-card:hover, .result-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-orange);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card::before, .stat-card::before, .result-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
      90deg,
      var(--gradient-start),
      var(--gradient-end)
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before, .stat-card:hover::before, .result-card:hover::before {
    opacity: 1;
}

/* Chart container common styles */
.chart-container {
    position: relative;
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 1000px;
}

.chart-container:hover {
    transform: translateY(-2px);
    border-color: var(--primary-orange);
}

.chart-container canvas {
    max-width: 100%;
    height: auto;
    color: var(--text-primary) !important;
}

/* Light mode chart text fixes */
[data-theme="light"] .chart-container canvas {
    color: var(--text-primary) !important;
}

/* Input styles */
input, select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.2);
    transform: translateY(-1px);
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        scroll-snap-type: none;
    }
    
    .content-section {
        min-height: auto;
    }
    
    .container {
        padding: 1rem 15px;
    }
    
    .site-header {
        cursor: pointer;
        user-select: none;
    }
    
    .site-header:active {
        background-color: rgba(247, 147, 26, 0.1);
        transition: background-color 0.1s ease;
    }
    
    header h1 {
        font-size: 2.2rem;
        line-height: 1.2;
        word-wrap: break-word;
    }
    
    header p {
        font-size: 1rem;
        line-height: 1.5;
        padding: 0 0.5rem;
    }
    
    header {
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0;
    }
    
    .site-header {
        padding: 1rem 0;
    }
    
    .site-header-content {
        padding: 0 15px;
    }
    
    .site-logo {
        font-size: 1.4rem;
    }
    
    .theme-toggle {
        all: unset !important;
        font-family: inherit !important;
        font-size: 1.2rem !important;
        color: var(--text-primary) !important;
        cursor: pointer !important;
        user-select: none !important;
        display: inline-block !important;
    }
    
    .theme-toggle:hover,
    .theme-toggle:focus,
    .theme-toggle:active {
        transform: none !important;
        border: none !important;
        border-color: transparent !important;
        color: var(--text-primary) !important;
        background: none !important;
        outline: none !important;
        box-shadow: none !important;
    }
    
    .theme-toggle:active {
        transform: scale(0.95);
    }
    
    .chart-container {
        padding: 1rem;
        overflow-x: auto;
        margin-bottom: 1.5rem;
    }
    
    button, .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
        min-height: 44px;
    }
    
    .content-section h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .content-card {
        min-height: 240px;
        padding: 1.5rem;
    }
    
    .content-card h3 {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }
    
    .content-card p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 1.25rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding: 0.75rem 0;
    }
    
    .stat-value {
        font-size: 1.05rem;
        word-break: break-word;
        max-width: 100%;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    footer {
        padding: 2rem 0;
    }
    
    footer p {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.75rem 10px;
    }
    
    header {
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    header p {
        font-size: 0.95rem;
    }
    
    .site-logo {
        font-size: 1.2rem;
    }
    
    .theme-toggle {
        all: unset !important;
        font-family: inherit !important;
        font-size: 1.1rem !important;
        color: var(--text-primary) !important;
        cursor: pointer !important;
        user-select: none !important;
        display: inline-block !important;
    }
    
    .theme-toggle:hover,
    .theme-toggle:focus,
    .theme-toggle:active {
        transform: none !important;
        border: none !important;
        border-color: transparent !important;
        color: var(--text-primary) !important;
        background: none !important;
        outline: none !important;
        box-shadow: none !important;
    }
    
    .theme-toggle:active {
        transform: scale(0.95);
    }
    
    .content-section h2 {
        font-size: 1.6rem;
    }
    
    .content-card {
        padding: 1rem;
        min-height: 200px;
    }
    
    .chart-container {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
}

/* Animation utilities */
@keyframes fastSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fastFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.98);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-in {
    animation: fastSlideUp 0.6s ease forwards;
}

.animate-fade-in {
    animation: fastFadeIn 0.25s ease forwards;
}

/* Simulator/Stats specific styles */
.controls, .simulation-controls {
    text-align: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    align-items: center;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.loading-text {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
}

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

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.stat-value {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.05rem;
    white-space: nowrap;
}

/* Table styles for probability tables */
.probability-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.probability-table th,
.probability-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.probability-table th {
    background: var(--dark-bg);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.probability-table td {
    color: var(--text-secondary);
    font-weight: 500;
}

.probability-table .milestone {
    font-weight: 700;
    color: var(--text-primary);
}

.prob-high {
    color: var(--success-green) !important;
    font-weight: 700;
}

.prob-medium {
    color: var(--accent-gold) !important;
    font-weight: 600;
}

.prob-low {
    color: var(--text-secondary) !important;
}


/* Disclaimer section */
.disclaimer-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-gold);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.disclaimer-section p {
    margin: 0;
}

.disclaimer-section strong {
    color: var(--text-primary);
}

/* Form input groups */
.input-group, .form-group {
    margin-bottom: 1.5rem;
}

.input-group label, .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Select dropdown styles */
select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.2);
    transform: translateY(-1px);
}

/* Home page specific styles */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

nav li {
    display: inline;
}

.content-section {
    margin-bottom: 4rem;
    margin-top: 8rem;
    scroll-snap-align: start;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.content-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
    text-align: center;
    position: relative;
}

.content-section h2::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-orange), var(--bitcoin-orange-dark));
    border-radius: 2px;
}

/* Center text in about section */
#about {
    text-align: center;
}

#about p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
}

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

.content-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
}

.content-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-orange);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.content-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-orange), var(--bitcoin-orange-dark));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-card:hover::before {
    opacity: 1;
}

.content-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.content-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.content-card .btn {
    margin-top: auto;
    align-self: center;
}

footer {
    background: var(--dark-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    text-align: center;
    margin-top: 4rem;
}

footer p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--bitcoin-orange-dark);
}

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