:root {
    --primary-color: #FF1744;
    --primary-light: #FF5252;
    --primary-lighter: #FF8A80;
    --primary-lightest: #FFCDD2;
    --background-color: #FFFFFF;
    --surface-color: #F5F5F5;
    --text-primary: #212121;
    --text-secondary: #757575;
    --text-hint: #9E9E9E;
    --border-color: #E0E0E0;
    --success-color: #00C853;
    --error-color: #FF1744;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 16px 80px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: sticky;
    top: 0;
    background-color: var(--background-color);
    z-index: 10;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.notification-icon {
    position: relative;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar {
    background-color: var(--primary-color);
    border-radius: 50%;
}

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 24px;
    padding: 24px;
    color: white;
    margin: 16px 0 24px;
    box-shadow: 0 10px 20px rgba(255, 23, 68, 0.2);
}

.balance-info h2 {
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 8px;
}

.balance-info h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
}

.trend {
    display: flex;
    align-items: center;
    font-size: 14px;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 16px;
    width: fit-content;
}

.trend.up {
    color: white;
}

.card-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-primary, .btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    flex: 1;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: white;
    color: var(--primary-color);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-2px);
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
}

/* Accounts Section */
.accounts-section {
    margin: 32px 0;
}

.accounts-slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.accounts-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.account-card {
    min-width: 200px;
    background-color: var(--surface-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.account-card.primary {
    background-color: var(--primary-light);
    color: white;
}

.account-card.savings {
    background-color: var(--primary-lightest);
    color: var(--text-primary);
}

.card-type {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.card-number {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 16px;
}

.card-balance {
    font-size: 20px;
    font-weight: 700;
}

/* Transactions Section */
.transactions-section {
    margin: 32px 0;
}

.transactions-list {
    background-color: var(--surface-color);
    border-radius: 16px;
    overflow: hidden;
}

.transaction-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

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

.transaction-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.transaction-icon.shopping {
    background-color: var(--primary-lightest);
    color: var(--primary-color);
}

.transaction-icon.transfer {
    background-color: #E3F2FD;
    color: #2196F3;
}

.transaction-icon.food {
    background-color: #FFF8E1;
    color: #FFC107;
}

.transaction-icon.subscription {
    background-color: #E8F5E9;
    color: #4CAF50;
}

.transaction-details {
    flex-grow: 1;
}

.transaction-name {
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 4px;
}

.transaction-date {
    color: var(--text-secondary);
    font-size: 14px;
}

.transaction-amount {
    font-weight: 600;
    font-size: 16px;
}

.transaction-amount.debit {
    color: var(--error-color);
}

.transaction-amount.credit {
    color: var(--success-color);
}

/* Spending Analytics */
.spending-section {
    margin: 32px 0;
}

.time-filter {
    display: flex;
    gap: 8px;
}

.time-filter button {
    background: none;
    border: none;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

.time-filter button.active {
    background-color: var(--primary-lightest);
    color: var(--primary-color);
    font-weight: 500;
}

.chart-container {
    width: 100%;
    height: 200px;
    margin: 24px 0;
}

.spending-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.category {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.category-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    margin-right: 8px;
}

.category-name {
    flex-grow: 1;
    color: var(--text-secondary);
}

.category-percentage {
    font-weight: 600;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    padding: 12px 0 8px;
    max-width: 480px;
    margin: 0 auto;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    color: var(--text-hint);
    font-size: 12px;
    gap: 4px;
    cursor: pointer;
    padding: 4px 16px;
}

.nav-item.active {
    color: var(--primary-color);
}

/* Transfer Page Styles */
.page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    background-color: var(--background-color);
    z-index: 50;
    padding: 20px 16px 80px;
    max-width: 480px;
    margin: 0 auto;
}

.page.active {
    display: block;
}

.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.recipient-section, .amount-section {
    margin-bottom: 24px;
}

.recipients-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bank-account {
    display: flex;
    align-items: center;
    background-color: var(--surface-color);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bank-account:hover {
    background-color: #f0f0f0;
}

.bank-account.selected {
    border: 2px solid var(--primary-color);
}

.bank-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    background-color: rgba(255, 255, 255, 0.8);
}

.account-details {
    flex-grow: 1;
}

.bank-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.account-number, .account-holder {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 2px;
}

.select-arrow {
    color: var(--text-hint);
}

.amount-input-container {
    display: flex;
    align-items: center;
    background-color: var(--surface-color);
    border-radius: 16px;
    padding: 16px;
    margin-top: 12px;
}

.currency-symbol {
    font-size: 24px;
    font-weight: 600;
    margin-right: 8px;
    color: var(--text-primary);
}

.amount-input {
    flex-grow: 1;
    border: none;
    background: none;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    width: 100%;
    outline: none;
}

.transfer-btn {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    font-size: 18px;
    margin-top: 32px;
    background-color: var(--primary-color);
    color: white;
}

.transfer-tabs {
    display: flex;
    margin-bottom: 20px;
    background-color: var(--surface-color);
    border-radius: 12px;
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    padding: 14px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background-color: var(--primary-light);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.description-section {
    margin-bottom: 24px;
}

.description-input-container {
    background-color: var(--surface-color);
    border-radius: 16px;
    padding: 16px;
    margin-top: 12px;
}

.description-input {
    width: 100%;
    border: none;
    background: none;
    font-size: 16px;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    resize: none;
    min-height: 80px;
    outline: none;
}

.recipients-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background-color: var(--surface-color);
    border-radius: 16px;
    padding: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-input, #bankSelect {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
    font-size: 16px;
    color: var(--text-primary);
    width: 100%;
}

.form-input:focus, #bankSelect:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--background-color);
    border-radius: 24px;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    animation: modalAppear 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.close-modal {
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
}

.modal-body {
    padding: 24px;
}

.pin-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}

.pin-input {
    width: 60px;
    height: 60px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 24px;
    text-align: center;
    background-color: var(--surface-color);
    color: var(--text-primary);
}

.pin-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

#confirmPin {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    font-size: 18px;
    margin-top: 16px;
}

/* Verification Pages (OTP and PIN) */
.verification-container {
    max-width: 360px;
    margin: 50px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.resend-text, .forgot-pin-text {
    margin: 20px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.resend-link, .forgot-pin-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.countdown-timer {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 30px;
}

.continue-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
}

.biometric-option {
    margin-top: 40px;
    text-align: center;
}

.biometric-option p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
}

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

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #FF1744 0%, #FF5252 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeOut 0.5s ease-out 2.5s forwards;
}

.splash-content {
    text-align: center;
    position: relative;
}

.logo-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.logo {
    position: relative;
    z-index: 2;
    animation: grow 1.5s ease-out;
}

.logo-pulse {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    z-index: 1;
    animation: pulse 1.5s ease-out infinite;
}

.splash-title {
    color: white;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.7s forwards;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    height: 100%;
    width: 0;
    background-color: white;
    animation: progress 2s ease-out forwards;
}

@keyframes grow {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

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

@keyframes fadeOut {
    0% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes progress {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

/* Login Page */
.login-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--background-color);
    z-index: 900;
    display: none;
    animation: fadeIn 0.5s ease-out;
    padding: 20px;
    overflow-y: auto;
}

.login-page.active {
    display: block;
}

.login-container {
    max-width: 400px;
    margin: 10% auto;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    margin-bottom: 20px;
    animation: floatAnimation 3s ease-in-out infinite;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

.login-form {
    margin-bottom: 30px;
}

.input-with-icon {
    position: relative;
    margin-top: 8px;
}

.input-with-icon svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.input-with-icon .form-input {
    padding-left: 40px;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.forgot-password {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
}

.login-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
}

.login-footer {
    text-align: center;
}

.login-footer p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.fingerprint-login {
    margin-top: 30px;
}

.fingerprint-login p {
    margin-bottom: 15px;
}

.fingerprint-btn {
    background: none;
    border: 2px dashed var(--primary-lightest);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fingerprint-btn:hover {
    border-color: var(--primary-light);
    transform: scale(1.05);
}

@keyframes floatAnimation {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 380px) {
    .balance-info h1 {
        font-size: 28px;
    }
    
    .btn-primary, .btn-secondary {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .spending-categories {
        grid-template-columns: 1fr;
    }
}