:root {
    --bg-color: #f0f9ff;
    --card-bg: rgba(255, 255, 255, 0.85);
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --accent: #0ea5e9;
    --text-main: #0f172a;
    --text-muted: #475569;
    --glass-border: rgba(2, 132, 199, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(2, 132, 199, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.15) 0px, transparent 50%);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.app-container {
    width: 100%;
    max-width: 420px;
    height: 100dvh;
    max-height: 900px;
    position: relative;
    background: var(--bg-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 2rem 1.5rem 4rem 1.5rem;
    /* Extra padding at bottom for mobile scroll */
    display: none;
    flex-direction: column;
    animation: fadeIn 0.4s ease-out;
    overflow-y: auto;
}

.hidden {
    display: none !important;
}

.screen.active {
    display: flex;
}

/* Login */
#login-screen {
    justify-content: center;
}

.login-card {
    text-align: center;
}

.logo {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.logo i {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    outline: none;
    transition: all 0.3s;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.primary-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 10px 15px -3px rgba(147, 51, 234, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 20px -3px rgba(147, 51, 234, 0.4);
}

.link {
    display: block;
    margin-top: 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.link:hover {
    color: var(--primary);
}

/* Dashboard */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

.status-badge {
    display: inline-block;
    background: rgba(14, 165, 233, 0.15);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.2rem;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: #ef4444;
}

.balance-card {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.balance-card h3 {
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.amount {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0.2rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.currency {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 0.5rem;
    color: var(--accent);
}

.value {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
}

.history-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.secondary-btn {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.secondary-btn:hover {
    background: rgba(2, 132, 199, 0.1);
}

.pulse-anim {
    animation: pulse 2s infinite;
}

/* Modal */
.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    z-index: 10;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.modal-content {
    width: 100%;
    text-align: center;
    position: relative;
    padding: 3rem 1.5rem 2rem;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.icon-large {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.modal-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
}

.voucher-box {
    background: rgba(240, 249, 255, 0.8);
    border: 1px dashed var(--accent);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.voucher-box h1 {
    letter-spacing: 2px;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.highlight {
    color: var(--accent);
}

.text-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
}

.timer {
    color: #ef4444;
    font-weight: 600;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.5);
    }

    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(2, 132, 199, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(2, 132, 199, 0);
    }
}