* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    height: 100vh;
    overflow: hidden;
}

.app {
    max-width: 600px;
    margin: 0 auto;
    height: 100vh;
    background: white;
}

header {
    background: #2196F3;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 1.5rem;
}

#settingsBtn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
}

.page {
    display: none;
    height: calc(100vh - 4rem);
    overflow-y: auto;
}

.page.active {
    display: block;
}

.amount-display {
    font-size: 2.5rem;
    text-align: right;
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    margin-top: 0;
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #dee2e6;
    padding: 1px;
    margin: 2rem 0;
}

.key {
    padding: 1.5rem;
    font-size: 1.5rem;
    border: none;
    background: white;
    cursor: pointer;
}

.key:active {
    background: #e9ecef;
}

.button-row {
    display: flex;
    gap: 0.5rem;
    padding: 0 1px;  /* Match keypad padding */
}

.calculate-btn, .clear-btn {
    flex: 1;
    padding: 1rem;
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
    height: 3.5rem;  /* Set explicit height */
    display: flex;
    align-items: center;
    justify-content: center;
}

.calculate-btn {
    background: #2196F3;
    color: white;
    margin-bottom: 0.5rem;
}

.clear-btn {
    background: #dc3545;
    color: white;
}

.results {
    padding: 1rem;
}

/* Settings Page Styles */
.settings-content {
    padding: 1rem;
}

.base-fee-section {
    margin-bottom: 2rem;
}

.base-fee-section input {
    width: 100%;
    padding: 0.5rem;
    font-size: 1.1rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.card-list {
    list-style: none;
    margin-top: 1rem;
}

.card-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: white;
    border: 1px solid #dee2e6;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-item input {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.card-item .card-name {
    flex: 1 1 100px;
    min-width: 0;
}

.card-item .card-fee {
    flex: 0 1 80px;
    min-width: 0;
}

.delete-card {
    margin-left: auto;
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.add-card-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.drag-handle {
    cursor: move;
    padding: 0.5rem;
    color: #6c757d;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

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

.result-item h3, .result-item p {
    margin: 0;
}

.copyable {
    cursor: pointer;
    user-select: none;
}

.copyable:hover {
    color: #2196F3;
}

#resultsPage {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 4rem); /* Account for header height */
    padding: 1rem;
}

.results {
    margin: 0;  /* Remove the top margin we had before */
}

.results-header {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-bottom: 2px solid #dee2e6;
    font-weight: bold;
    color: #6c757d;
}

.results-header h3 {
    margin: 0;
    font-size: 1rem;
} 