:root {
    --primary-color: #2196F3;
    --success-color: #4CAF50;
    --danger-color: #F44336;
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-color: #333;
}

[v-cloak] {
    display: none !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

#app {
    width: 100%;
    max-width: 480px; /* Mobile width simulation */
    background: var(--card-bg);
    min-height: 100vh;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

/* Profile Selection */
.profile-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 20px;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.profile-card:active {
    transform: scale(0.95);
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.avatar.blue { background: #2196F3; }
.avatar.purple { background: #9C27B0; }
.avatar.green { background: #4CAF50; }
.avatar.orange { background: #FF9800; }

/* Emoji Avatar Styles */
.avatar.emoji-avatar {
    background: #f5f5f5;
    font-size: 50px;
    color: #333;
}

.user-select-avatar.emoji-avatar {
    background: #f5f5f5;
    font-size: 30px;
    color: #333;
}

.user-list-item .avatar.emoji-avatar {
    font-size: 24px !important;
}

/* Login Screen */
.login-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 20px;
}

.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px; /* Increased gap */
    margin-top: 30px;
    justify-items: center;
}

.pin-btn {
    width: 70px; /* Increased size */
    height: 70px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex; /* Centering */
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.pin-btn:active {
    background: #f0f0f0;
    transform: scale(0.95);
}

.pin-display {
    font-size: 32px;
    letter-spacing: 10px;
    margin-bottom: 20px;
    height: 40px;
}

/* Dashboard */
header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 0 0 20px 20px;
}

.balance-card {
    text-align: center;
    margin-top: 10px;
}

.balance-amount {
    font-size: 48px;
    font-weight: bold;
}

.actions {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    margin-top: 20px;
}

.action-btn {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    border: none;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.1s;
}

.action-btn:active {
    transform: scale(0.95);
}

.btn-pay {
    background-color: var(--danger-color);
}

.btn-receive {
    background-color: var(--success-color);
}

.icon {
    font-size: 32px;
    margin-bottom: 10px;
}

/* Tasks Section */
.tasks-section {
    padding: 20px;
    flex-grow: 1;
    background: #fafafa;
}

.task-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.task-reward {
    color: var(--success-color);
    font-weight: bold;
}

.btn-complete {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
}

/* Payment Modal/Screen */
.payment-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 50px;
}

.nfc-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 5px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); border-color: #ccc; }
    50% { transform: scale(1.05); border-color: var(--primary-color); }
    100% { transform: scale(1); border-color: #ccc; }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

input[type="number"], input[type="text"], select {
    width: 80%;
    padding: 15px;
    font-size: 18px;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-bottom: 20px;
    background: white;
}

.btn-main {
    width: 80%;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
}

/* Admin User Management */
.admin-section {
    padding: 20px;
    background: white;
    margin-bottom: 20px;
    border-radius: 10px;
}
.user-list-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

/* Keypad Styles - Matching PIN Design */
.keypad-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 320px; /* Slightly wider for comfort */
    margin: 0 auto;
}

.keypad-display {
    width: 100%;
    height: 80px;
    background: transparent; /* Removed grey background */
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px; /* Larger text */
    font-weight: bold;
    color: var(--primary-color);
    border-bottom: 2px solid #eee; /* Subtle underline */
}

.keypad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px; /* Increased gap */
    width: 100%;
    justify-items: center; /* Center items in grid cells */
}

.keypad-btn {
    width: 70px; /* Fixed size like PIN */
    height: 70px;
    border-radius: 50%;
    background: white;
    border: 1px solid #ddd;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Softer shadow */
    transition: all 0.2s;
}

.keypad-btn:active {
    background: #f0f0f0;
    transform: scale(0.95);
}

/* User Selection - Card Style */
.user-select-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 10px;
    width: 100%;
    max-width: 400px;
    padding: 0 20px; /* Add side padding */
    box-sizing: border-box;
}

.user-select-card {
    background: #ffffff;
    border: 1px solid #f0f0f0; /* Subtle border */
    border-radius: 24px; /* More rounded */
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06); /* Soft shadow */
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.user-select-card:active {
    transform: scale(0.95);
    background: #f0f8ff;
    border-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.user-select-card.selected .user-select-avatar {
    /* Removed scaling here to keep it clean */
    box-shadow: none;
}

.user-select-avatar {
    width: 70px;
    height: 70px;
    font-size: 32px;
    margin-bottom: 15px;
    /* Removed individual avatar shadow for cleaner card look */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.user-select-avatar.emoji-avatar {
    font-size: 45px;
    background: transparent; /* Emoji floats */
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 5px;
}

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

.btn-cancel {
    background: #ccc;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-confirm {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

/* Reward Animation Overlay */
.reward-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    flex-direction: column;
    animation: fadeIn 0.3s ease-out;
}

.reward-content {
    text-align: center;
    color: #FFD700;
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2;
}

.reward-amount {
    font-size: 72px;
    font-weight: 900;
    text-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
    margin-bottom: 10px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

.reward-label {
    font-size: 28px;
    color: white;
    font-weight: bold;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.stars-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.star-anim {
    position: absolute;
    color: #FFD700;
    font-size: 24px;
    opacity: 0;
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fallDown {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}
