:root {
    --bg-color: #222;
    --row-bg: #121212;
    --active-bg: #444;
    --text-main: #ffffff;
    --text-dim: #999;
    --accent-blue: #3d5afe;
    --op-color: #ff9800;
}

body {
    margin: 0; padding: 0; background: var(--bg-color); color: var(--text-main);
    font-family: -apple-system, sans-serif; overflow: hidden;
}
html, body {
    /* This tells the browser to handle scrolls and pinches, 
       but ignore double-tap to zoom */
    touch-action: manipulation;
}
.app-wrapper {
    display: flex; flex-direction: column; height: 100vh; width: 100vw;
}

header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 15px; font-size: 0.7rem; letter-spacing: 1px;margin:0 auto;
}

.currency-list { flex: 1; overflow-y: auto; padding: 0 5px; }

.currency-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 15px; margin-bottom: 6px; border-radius: 4px;
    background: var(--row-bg); transition: 0.2s;
}

.currency-row.active { background: var(--active-bg); border-right: 4px solid var(--accent-blue); }

.row-left { display: flex; align-items: center; gap: 15px; }
.flag { width: 50px; height: 30px; object-fit: cover; }
.code { font-size: 1.0rem; color:var(--text-dim);}

.row-right { text-align: right; overflow: hidden; }
.value { font-size: 2rem; white-space: nowrap; }

.plus-icon { font-size: 2rem; border: 1px solid #444; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 4px; }

.keypad {
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: #0a0a0a; padding: 8px; gap: 8px; marin-bottom:30px;
}

.btn {
    background: #262626; border: none; color: white; padding: 15px 0;
    font-size: 1.6rem; border-radius: 8px; cursor: pointer;
}

.btn:active { background: #333; }
.col-op { color: var(--op-color); }
.col-red { color: #ff5252; }
.col-blue { background: var(--accent-blue); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

.bottom-nav {
    display: flex; justify-content: space-around; background: #000;
    padding: 12px 0; border-top: 1px solid #222;
}

.nav-item { display: flex; flex-direction: column; align-items: center; font-size: 0.65rem; color: var(--text-dim); gap: 4px; }
.nav-item.active { color: var(--accent-blue); }