/* ORBYTT - MINIMALIST BLACK & WHITE THEME */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Force all images inside dropdowns to be small */
.coin-dropdown img {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    object-fit: contain !important;
}

:root {
    /* Light Mode - Pure Black & White */
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --bg-elevated: #ffffff;
    --bg-hover: #f9f9f9;
    
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --text-muted: #b3b3b3;
    
    --border-color: #e5e5e5;
    --border-light: #f0f0f0;
    --border-dark: #d0d0d0;
    
    --accent-primary: #000000;
    --accent-hover: #333333;
    --accent-light: #f7f7f7;
    
    --success: #000000;
    --success-bg: #f0f9f0;
    --success-text: #22c55e;
    --danger: #000000;
    --danger-bg: #fef2f2;
    --danger-text: #ef4444;
    --warning: #000000;
    --warning-text: #f59e0b;
    
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.12);
    
    --chart-1: #000000;
    --chart-2: #333333;
    --chart-3: #666666;
    --chart-4: #999999;
    --chart-5: #b3b3b3;
    --chart-6: #cccccc;
    --chart-7: #e5e5e5;
}

body.dark-mode {
    /* Dark Mode - Inverted Black & White */
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #141414;
    --bg-elevated: #1a1a1a;
    --bg-hover: #1f1f1f;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #808080;
    --text-muted: #606060;
    
    --border-color: #2a2a2a;
    --border-light: #1f1f1f;
    --border-dark: #3a3a3a;
    
    --accent-primary: #ffffff;
    --accent-hover: #e0e0e0;
    --accent-light: #1a1a1a;
    
    --success: #ffffff;
    --success-bg: rgba(34, 197, 94, 0.1);
    --success-text: #22c55e;
    --danger: #ffffff;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --danger-text: #ef4444;
    --warning: #ffffff;
    --warning-text: #f59e0b;
    
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.6);
    
    --chart-1: #ffffff;
    --chart-2: #e0e0e0;
    --chart-3: #b3b3b3;
    --chart-4: #808080;
    --chart-5: #606060;
    --chart-6: #404040;
    --chart-7: #2a2a2a;
}

html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background 0.2s ease, color 0.2s ease;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* ===== HEADER ===== */
header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 64px;
}

/* Logo and Title - Positioned on the left */
header h1 {
    position: absolute;
    left: 24px;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
    margin: 0;
}

/* Logo wrapper */
.logo-wrapper {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Logo icon */
.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
    display: block;
}

/* SVG fallback logo */
.logo-svg {
    width: 32px;
    height: 32px;
    color: var(--text-primary);
}

/* Handle logo display with JavaScript fallback */
.logo-icon[src=""] {
    display: none;
}

.logo-icon:not([src]),
.logo-icon[src=""]:not([src]) + .logo-svg {
    display: block;
}

/* Invert logo in dark mode for better visibility */
body.dark-mode .logo-icon {
    filter: invert(1);
}

/* Centered Pill Navigation */
.nav-tabs {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-tertiary);
    border-radius: 100px;
    padding: 4px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.nav-tab {
    padding: 10px 20px;
    border-radius: 100px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: transparent;
    white-space: nowrap;
    cursor: pointer;
}

.nav-tab i {
    font-size: 1rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.nav-tab:hover {
    color: var(--text-primary);
}

.nav-tab:hover i {
    opacity: 1;
}

.nav-tab.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-xs);
}

.nav-tab.active i {
    opacity: 1;
}

/* Theme Toggle - Positioned on the right */
.theme-toggle {
    position: absolute;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--bg-hover);
    transform: scale(1.05);
}

.theme-toggle i {
    font-size: 1.125rem;
}

/* ===== MAIN CONTENT ===== */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* Page Sections */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* ===== SIMULATOR PAGE ===== */
.simulator-container {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.simulator-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.simulator-header h2 {
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.simulator-header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.crypto-selector {
    position: relative;
}

.crypto-selector label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Search Container */
.search-container {
    position: relative;
}

.search-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.search-container input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.search-container input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-primary);
}

.search-container input::placeholder {
    color: var(--text-tertiary);
}

/* Coin Dropdown */
.coin-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    max-height: 240px;
    overflow-y: auto;
    z-index: 50;
    display: none;
}

.coin-dropdown.active {
    display: block;
}

/* Dropdown Items (actual classes used by JS) */
.dropdown-item {
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid var(--border-light);
}

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

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

.dropdown-item.disabled {
    color: var(--text-tertiary);
    cursor: default;
    opacity: 0.5;
}

/* Coin Icon in Dropdown - Force small size */
.coin-icon {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
    display: inline-block;
}


/* Selected Coin Display */
.selected-coin-display {
    margin-top: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    display: none;
}

.selected-coin-display.active {
    display: block;
}

.selected-coin-display img {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
}

.selected-coin-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.selected-coin-header img {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
}

.selected-coin-info h4 {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
}

.selected-coin-info span {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.coin-stats {
    display: grid;
    gap: 8px;
    font-size: 0.875rem;
}

.coin-stat {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.coin-stat span:first-child {
    color: var(--text-secondary);
}

.coin-stat span:last-child {
    font-weight: 500;
    color: var(--text-primary);
}

/* Buttons */
.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

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

.btn-large {
    padding: 14px 32px;
    font-size: 1rem;
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-dark);
}

#swapButton {
    width: 100%;
    justify-content: center;
    margin-bottom: 16px;
}

/* Simulator Results */
.simulator-results {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
    display: none;
}

.simulator-results.active {
    display: block;
}

.result-card {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}

.result-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.result-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.result-details {
    display: grid;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.detail-label {
    color: var(--text-secondary);
}

.detail-value {
    font-weight: 500;
    color: var(--text-primary);
}

/* ===== PORTFOLIO PAGE ===== */

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.summary-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
}

.summary-card:hover {
    border-color: var(--border-dark);
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.card-header i {
    font-size: 1rem;
}

.card-value {
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.card-value.positive {
    color: var(--success-text);
}

.card-value.negative {
    color: var(--danger-text);
}

.card-subtext {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.daily-change {
    display: inline-block;
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid var(--border-light);
}

.gain-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    background: var(--success-bg);
    color: var(--success-text);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Add Coin Section */
.add-coin-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.add-coin-section h3 {
    margin-bottom: 20px;
    font-size: 1.125rem;
    font-weight: 600;
}

.add-coin-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
}

.add-coin-form input[type="number"] {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.add-coin-form input[type="number"]:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.add-coin-form input[type="number"]::placeholder {
    color: var(--text-tertiary);
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

/* Holdings Section */
.holdings-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-dark);
}

.btn-icon.btn-danger:hover {
    background: var(--danger-bg);
    color: var(--danger-text);
    border-color: var(--danger-text);
}

/* Holdings List */
.holdings-list {
    max-height: 400px;
    overflow-y: auto;
}

.holdings-list::-webkit-scrollbar {
    width: 4px;
}

.holdings-list::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.holdings-list::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 4px;
}

.holding-item {
    padding: 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.holding-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-color);
}

.holding-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.holding-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.holding-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
}

.holding-details h4 {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.holding-details span {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.holding-actions {
    display: flex;
    gap: 4px;
}

.holding-actions button {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.holding-actions button:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.holding-actions .delete-btn:hover {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.holding-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.holding-stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    margin-bottom: 2px;
}

.stat-value {
    font-weight: 500;
    font-size: 0.875rem;
}

.stat-value.positive {
    color: var(--success-text);
}

.stat-value.negative {
    color: var(--danger-text);
}

/* Chart Section */
.chart-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.btn-menu {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-menu:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.chart-container {
    position: relative;
    height: 350px;
    margin-top: 20px;
}

/* Trades Section */
.trades-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.trades-list {
    max-height: 300px;
    overflow-y: auto;
}

.trade-item {
    padding: 12px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

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

.trade-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.trade-type {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.trade-type.buy {
    background: var(--success-bg);
    color: var(--success-text);
}

.trade-type.sell {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.trade-details {
    flex: 1;
}

.trade-coin {
    font-weight: 500;
    font-size: 0.875rem;
}

.trade-meta {
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

.trade-value {
    text-align: right;
}

.trade-amount {
    font-weight: 500;
    font-size: 0.875rem;
}

.trade-price {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-tertiary);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.875rem;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.empty-state span {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Last Updated */
.last-updated {
    text-align: center;
    padding: 16px;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* Global Loader */
.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.global-loader.active {
    opacity: 1;
    pointer-events: all;
}

.loader-circle {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    header h1 {
        left: 16px;
        font-size: 1.125rem;
        gap: 8px;
        position: relative;
        margin-right: auto;
    }
    
    .nav-tabs {
        order: 3;
        width: 100%;
        justify-content: center;
        padding: 3px;
    }
    
    .theme-toggle {
        position: relative;
        right: auto;
        width: 36px;
        height: 36px;
        order: 2;
    }
    
    .logo-wrapper {
        width: 28px;
        height: 28px;
    }
    
    .logo-icon,
    .logo-svg {
        width: 28px;
        height: 28px;
    }
    
    .nav-tab {
        padding: 8px 16px;
        font-size: 0.875rem;
        gap: 6px;
    }
    
    .nav-tab i {
        font-size: 0.9375rem;
    }
    
    .theme-toggle i {
        font-size: 1rem;
    }
    
    main {
        padding: 24px 16px;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .add-coin-form {
        grid-template-columns: 1fr;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .holding-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .simulator-container {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1rem;
        left: auto;
        position: relative;
    }
    
    .logo-wrapper {
        width: 24px;
        height: 24px;
    }
    
    .logo-icon,
    .logo-svg {
        width: 24px;
        height: 24px;
    }
    
    .nav-tabs {
        padding: 3px;
    }
    
    .nav-tab {
        padding: 7px 14px;
        font-size: 0.8125rem;
        gap: 5px;
    }
    
    .nav-tab i {
        font-size: 0.875rem;
    }
    
    .theme-toggle {
        right: auto;
        width: 34px;
        height: 34px;
    }
    
    .card-value {
        font-size: 1.5rem;
    }
    
    .result-value {
        font-size: 1.5rem;
    }
    
    .daily-change {
        display: block;
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        margin-top: 4px;
    }
}

/* Very small mobile - hide icons in nav to save space */
@media (max-width: 380px) {
    .nav-tab i {
        display: none;
    }
    
    .nav-tab {
        padding: 7px 12px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    header,
    .add-coin-section,
    .section-actions,
    .btn-menu,
    .theme-toggle {
        display: none;
    }
    
    .summary-card,
    .holdings-section,
    .chart-section {
        break-inside: avoid;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States */
button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

::-moz-selection {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

/* ===== LANDING PAGE STYLES ===== */

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 80px 24px 60px;
    max-width: 900px;
    margin: 0 auto;
}

.hero-content {
    animation: fadeInUp 0.8s ease;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.hero-badge:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.hero-badge i {
    color: var(--success-text);
    animation: pulse 2s ease-in-out infinite;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.hero-gradient {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Section */
.features-section {
    padding: 60px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.features-header {
    text-align: center;
    margin-bottom: 48px;
}

.features-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.features-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-dark);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: rotate(5deg) scale(1.05);
}

.feature-icon i {
    font-size: 1.5rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon i {
    color: var(--bg-primary);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.feature-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-top: auto;
}

.feature-link i {
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-link i {
    transform: translateX(4px);
}

.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--success-bg);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--success-text);
    margin-top: auto;
    width: fit-content;
}

.feature-badge i {
    font-size: 0.75rem;
}

/* Stats Section */
.stats-section {
    padding: 60px 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stats-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 48px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.landing-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

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

.stat-divider {
    width: 1px;
    height: 60px;
    background: var(--border-color);
}

/* CTA Section */
.cta-section {
    padding: 80px 24px;
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 48px 32px;
    box-shadow: var(--shadow-md);
}

.cta-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.cta-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Button Enhancements */
.btn-large {
    padding: 16px 32px;
    font-size: 1rem;
}

/* Responsive Landing Page */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 24px 40px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.125rem;
    }

    .features-header h2 {
        font-size: 2rem;
    }

    .features-section {
        padding: 40px 16px;
    }

    .feature-card {
        padding: 24px;
    }

    .stats-container {
        gap: 32px;
    }

    .landing-stat-value {
        font-size: 2rem;
    }

    .stat-divider {
        display: none;
    }

    .cta-section {
        padding: 60px 24px;
    }

    .cta-content {
        padding: 36px 24px;
    }

    .cta-content h2 {
        font-size: 1.75rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons a {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-cta a {
        width: 100%;
    }

    .features-header h2 {
        font-size: 1.75rem;
    }

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

    .landing-stat-value {
        font-size: 1.75rem;
    }

    .cta-content h2 {
        font-size: 1.5rem;
    }

    .cta-content p {
        font-size: 1rem;
    }
}