@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');

:root {
    --header-height: 44px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #dbeafe;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.container {
    position: relative;
    z-index: 2;
    padding: 15px;
    padding-top: calc(var(--header-height) + 6px); /* tighter space for fixed header */
    padding-bottom: 70px; /* space for bottom navigation */
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Responsive padding untuk container */
@media (max-width: 480px) {
    .container {
        padding: 10px;
        padding-top: calc(var(--header-height) + 12px);
        padding-bottom: 70px; /* space for bottom navigation */
    }
}

@media (max-width: 360px) {
    .container {
        padding: 8px;
        padding-top: calc(var(--header-height) + 10px);
        padding-bottom: 70px; /* space for bottom navigation */
    }
}

@media (max-width: 320px) {
    .container {
        padding: 5px;
        padding-top: calc(var(--header-height) + 8px);
        padding-bottom: 70px; /* space for bottom navigation */
    }
}

/* Curved Background */
.curved-bg {
    position: absolute;
    top: -10px; /* lowered a bit to move background down */
    left: 0;
    width: 100%;
    height: 25vh;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 0 0 18% 18% / 0 0 30px 30px; /* less rounded */
    z-index: 1;
}

.curved-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/bglengkung.jpg');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    border-radius: 0 0 18% 18% / 0 0 30px 30px; /* match outer shape */
    z-index: 1;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    margin-bottom: 0.4rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    color: white;
    /* Transparent background */
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
    padding: 4px 10px;
    min-height: var(--header-height);
}

/* Tighten inner header spacing so height actually shrinks */
.header .header-title-section { min-height: 36px; display:flex; align-items:center; padding: 2px 0; }
.header .back-btn { padding: 2px; }
.header h1 { font-size: 0.95rem; line-height: 1; margin: 0; }
.header .header-riwayat-icon { width: 22px; height: 22px; }

.back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    padding: 0.5rem;
    cursor: pointer;
}

.header h1 {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.header-title-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
}

.title-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-riwayat-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: brightness(1);
}

.header-riwayat-icon:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
    overflow-x: hidden;
    margin-top: calc(var(--header-height) - 4px);
}

/* Responsive gap untuk main content */
@media (max-width: 480px) {
    .main-content {
        gap: 0.5rem;
    }
}

@media (max-width: 360px) {
    .main-content {
        gap: 0.4rem;
    }
}

@media (max-width: 320px) {
    .main-content {
        gap: 0.3rem;
    }
}

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 20px;
    padding: 0.5rem 1.5rem 0.5rem 1.5rem;
    color: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

/* Less rounded corners specifically for the main balance card on tugas page */
.balance-card.my-balance-card {
    border-radius: 16px;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}

/* Specific styling for my-balance-card */
.my-balance-card .balance-header-row {
    margin-top: 0.5rem;
}

/* Balance Background Image */
.balance-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    z-index: 1;
    pointer-events: none;
}

/* Balance Header Row */
.balance-card .balance-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.2rem;
    margin-bottom: 0.2rem;
    position: relative;
    z-index: 2;
}

/* Tighten spacing between top of card and title */
.my-balance-card .balance-title { 
    margin-top: 0; 
    font-size: 1.40rem; 
    margin-bottom: 0;
    position: relative;
    z-index: 2;
}

/* Header Diamond inside Balance Card */
.balance-header-row .header-diamond {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.1rem 0.5rem;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    margin-left: auto;
}

.balance-header-row .header-diamond .diamond-icon-no-bg {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.balance-header-row .header-diamond .diamond-value {
    color: rgb(255, 251, 0);
    font-size: 0.9rem;
    font-weight: 700;
}

.balance-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.1rem;
    margin-bottom: 0; /* remove extra bottom space */
    position: relative;
    z-index: 2;
}

.balance-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-4px);
}

.balance-icon .coin-image { 
    width: 40px; 
    height: 40px; 
    object-fit: contain; 
    display: block; 
}

.balance-details {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    transform: translateY(-5px);
}

.balance-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #fbbf24;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.coin-value {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.1rem 0.5rem;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    transform: translateY(-5px);
}

.coin-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.coin-amount {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.balance-conversion-inline {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.balance-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Daily Check-in Section */
.checkin-section {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.8);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* Make the balance card visually merge with the checkin-section edges */
.checkin-header .balance-card.my-balance-card {
    margin: -1.5rem -1.5rem 0 -1.5rem; /* pull to top and sides */
    border-radius: 16px 16px 0 0;      /* keep top rounded, flush on sides */
    padding-bottom: 0;                 /* remove bottom padding to kill empty space */
    margin-bottom: 0.7rem;             /* space below card before header-content */
}

/* Responsive padding untuk checkin section */
@media (max-width: 480px) {
    .checkin-section {
        padding: 1rem;
    }
    .checkin-header .balance-card.my-balance-card { margin: -1rem -1rem 0 -1rem; margin-bottom: 0.6rem; }
}

@media (max-width: 360px) {
    .checkin-section {
        padding: 0.8rem;
    }
    .checkin-header .balance-card.my-balance-card { margin: -0.8rem -0.8rem 0 -0.8rem; margin-bottom: 0.5rem; }
}

@media (max-width: 320px) {
    .checkin-section {
        padding: 0.6rem;
    }
    .checkin-header .balance-card.my-balance-card { margin: -0.6rem -0.6rem 0 -0.6rem; margin-bottom: 0.45rem; }
}

.checkin-header h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 0;
    text-align: left;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Checkin Timer */
.checkin-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 120px;
}

.timer-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 500;
}

.timer-display {
    color: #fbbf24;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.streak-days {
    color: #fbbf24;
    font-weight: 700;
}

.daily-rewards {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 100%;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

/* Responsive grid untuk layar kecil */
@media (max-width: 480px) {
    .daily-rewards {
        grid-template-columns: repeat(7, 1fr);
        gap: 0.15rem;
        margin-bottom: 1.2rem;
        padding: 0 0.2rem;
        margin-left: 0.3rem;
        margin-right: 0.3rem;
    }
}

@media (max-width: 360px) {
    .daily-rewards {
        grid-template-columns: repeat(7, 1fr);
        gap: 0.1rem;
        margin-bottom: 1rem;
        padding: 0 0.15rem;
        margin-left: 0.2rem;
        margin-right: 0.2rem;
    }
}

@media (max-width: 320px) {
    .daily-rewards {
        grid-template-columns: repeat(7, 1fr);
        gap: 0.05rem;
        margin-bottom: 0.8rem;
        padding: 0 0.1rem;
        margin-left: 0.15rem;
        margin-right: 0.15rem;
    }
}

.reward-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 80px;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

/* Responsive padding untuk reward-day */
@media (max-width: 480px) {
    .reward-day {
        padding: 0.25rem;
        min-height: 60px;
        gap: 0.15rem;
    }
}

@media (max-width: 360px) {
    .reward-day {
        padding: 0.15rem;
        min-height: 55px;
        gap: 0.1rem;
    }
}

@media (max-width: 320px) {
    .reward-day {
        padding: 0.1rem;
        min-height: 50px;
        gap: 0.05rem;
    }
}

.reward-day:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
    transform: translateY(-2px);
}

.reward-day.completed {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(16, 185, 129, 0.2) 100%);
    border: 2px solid rgba(34, 197, 94, 0.5);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.reward-day.completed::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #22c55e;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    animation: checkmarkAppear 0.5s ease-out;
    z-index: 2;
}

/* Responsive ceklis untuk layar kecil */
@media (max-width: 480px) {
    .reward-day.completed::before {
        width: 14px;
        height: 14px;
        font-size: 9px;
    }
}

@media (max-width: 360px) {
    .reward-day.completed::before {
        width: 12px;
        height: 12px;
        font-size: 8px;
    }
}

@media (max-width: 320px) {
    .reward-day.completed::before {
        width: 10px;
        height: 10px;
        font-size: 7px;
    }
}

@keyframes checkmarkAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.day-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
    font-weight: 400;
}

.reward-icon {
    width: 20px;
    height: 20px;
}

.reward-amount {
    color: #fbbf24;
    font-size: 0.8rem;
    font-weight: 700;
}

.checkin-btn {
    width: 100%;
    background: linear-gradient(135deg, #fe6c51 0%, #fd1c4f 100%);
    border: none;
    border-radius: 15px;
    padding: 1rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.checkin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(254, 108, 81, 0.4);
}

.ad-icon {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Banner Section */
.baner-section {
    position: relative;
    width: 100%;
    margin: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.baner-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.banner-link {
    display: block;
    width: 100%;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
    animation: slideOutRight 0.5s ease-in-out 7s forwards, slideInFromLeft 0.5s ease-in-out 14s forwards, pointerEvents1 0.1s 7.5s forwards, pointerEvents2 0.1s 14.5s forwards;
    pointer-events: auto;
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.banner-link-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    z-index: 1;
    animation: slideInFromRight 0.5s ease-in-out 7s forwards, slideOutLeft 0.5s ease-in-out 14s forwards, pointerEvents3 0.1s 7.5s forwards, pointerEvents4 0.1s 14.5s forwards;
    pointer-events: none;
}

@keyframes pointerEvents1 {
    to { pointer-events: none; z-index: 1; }
}

@keyframes pointerEvents2 {
    to { pointer-events: auto; z-index: 2; }
}

@keyframes pointerEvents3 {
    to { pointer-events: auto; z-index: 2; }
}

@keyframes pointerEvents4 {
    to { pointer-events: none; z-index: 1; }
}

.banner-image-slide {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

@keyframes slideOutRight {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-100%);
    }
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Daily Tasks Section */
.tasks-section {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1rem;
    border: 1px solid rgba(59, 130, 246, 0.8);
}

.tasks-section h3 {
    color: white;
    font-size: 1.1rem; /* samakan tinggi visual dengan 'Saldo Saya!' */
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: stretch;
}

.task-item {
    display: flex;
    flex-direction: column;
    padding: 0.8rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
    border-radius: 15px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    transition: all 0.3s ease;
    gap: 0.8rem;
}

.task-button-container {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.task-item:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.35);
    transform: translateY(-2px);
}

.task-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.task-icon {
    width: 32px;
    height: 32px;
}

.task-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.3rem;
}

.task-title-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0;
}

.task-title {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
    text-align: left;
}

.task-reward {
    color: #fbbf24;
    font-size: 0.9rem;
    font-weight: 600;
    flex-shrink: 0;
    text-align: right;
}

/* Small coin icon next to reward for app tasks */
#appTaskList .task-reward {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

#appTaskList .task-reward .reward-coin-icon,
#appTaskList .task-reward .reward-type-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
    vertical-align: middle;
}

.task-progress {
    width: 100%;
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.2rem;
}

.progress-bar {
    /* Layered background: gradient fill sized by --progress over a dark track */
    background: 
        linear-gradient(90deg, #fe6c51 0%, #fd1c4f 50%, #f7931e 100%) 0 0 / var(--progress, 0%) 100% no-repeat,
        rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex: 1;
    transition: background-size 0.3s ease;
}

.progress-text {
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
    z-index: 2;
    position: relative;
}

.task-button-container {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.task-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.task-btn.watch-video {
    background: linear-gradient(135deg, #fe6c51 0%, #fd1c4f 100%);
    color: white;
}

/* Scoped: App tasks button should size to text only */
#app-tasks-section .task-btn.watch-video {
    display: inline-flex;
    width: auto;
    align-self: flex-end;
}

.task-btn.completed {
    background: transparent;
    color: #10b981;
    border: 2px solid #10b981;
}

/* Completed state (red stroke, transparent background) */
.task-btn.completed-claim {
    background: transparent !important;
    color: #ef4444 !important; /* red */
    border: 2px solid #ef4444 !important;
    box-shadow: none !important;
}

.task-btn.completed-claim:hover,
.task-btn.completed-claim:active {
    transform: none;
    box-shadow: none;
}

.task-btn:hover {
    transform: translateY(-2px);
}



/* Responsive Design */
@media (max-width: 480px) {
    .daily-rewards {
        gap: 0.3rem;
    }
    
    .reward-day {
        padding: 0.3rem;
    }
    
    .day-label {
        font-size: 0.6rem;
    }
    
    .reward-amount {
        font-size: 0.7rem;
    }
    
    .task-item {
        flex-direction: row;
        gap: 0.8rem;
        align-items: center;
        padding: 0.8rem;
    }
    
    .task-info {
        flex: 1;
        min-width: 0;
    }
    
    .task-title {
        font-size: 0.9rem;
        line-height: 1.2;
        margin-bottom: 0.2rem;
    }
    
    .task-reward {
        font-size: 0.8rem;
        line-height: 1.1;
    }
    
    .task-btn {
        flex-shrink: 0;
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        line-height: 1;
    }
    
    /* Checkin section responsive adjustments */
    .checkin-section {
        padding: 1rem;
    }
    
    .header-content {
        margin-bottom: 0.8rem;
    }
    
    .checkin-header h3 {
        font-size: 1rem;
        margin-bottom: 0;
    }
    
    .daily-rewards {
        gap: 0.3rem;
        margin-bottom: 1rem;
    }
    
    .reward-day {
        padding: 0.4rem;
        gap: 0.2rem;
    }
    
    .day-label {
        font-size: 0.65rem;
    }
    
    .reward-icon {
        width: 18px;
        height: 18px;
    }
    
    .reward-amount {
        font-size: 0.75rem;
    }
    
    .checkin-btn {
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    .checkin-timer {
        padding: 0.2rem 0.6rem;
        min-width: 110px;
    }
    
    .timer-label {
        font-size: 0.75rem;
    }
    
    .timer-display {
        font-size: 1.1rem;
    }
    
    /* Balance card responsive adjustments */
    .balance-card {
        padding: 0.4rem 1.2rem;
    }
    
    .my-balance-card .balance-title {
        font-size: 1.1rem;
    }
    
    .balance-amount {
        font-size: 1.6rem;
    }
    
    .balance-conversion-inline {
        font-size: 0.8rem;
    }
    
    .balance-label {
        font-size: 0.75rem;
    }
    
    .balance-icon {
        width: 40px;
        height: 40px;
    }
    
    .balance-icon .coin-image {
        width: 36px;
        height: 36px;
    }
    
    .balance-header-row .header-diamond {
        padding: 0.1rem 0.4rem;
    }
    
    .balance-header-row .header-diamond .diamond-icon-no-bg {
        width: 14px;
        height: 14px;
    }
    
    .balance-header-row .header-diamond .diamond-value {
        font-size: 0.8rem;
    }
    
    .coin-value {
        padding: 0.1rem 0.4rem;
    }
    
    .coin-icon {
        width: 14px;
        height: 14px;
    }
    
    .coin-amount {
        font-size: 0.8rem;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .balance-card {
        padding: 0.3rem 1rem;
    }
    
    .my-balance-card .balance-title {
        font-size: 1rem;
    }
    
    .balance-amount {
        font-size: 1.4rem;
    }
    
    .balance-conversion-inline {
        font-size: 0.75rem;
    }
    
    .balance-label {
        font-size: 0.7rem;
    }
    
    .balance-icon {
        width: 36px;
        height: 36px;
    }
    
    .balance-icon .coin-image {
        width: 32px;
        height: 32px;
    }
    
    .balance-header-row .header-diamond {
        padding: 0.1rem 0.3rem;
    }
    
    .balance-header-row .header-diamond .diamond-icon-no-bg {
        width: 12px;
        height: 12px;
    }
    
    .balance-header-row .header-diamond .diamond-value {
        font-size: 0.7rem;
    }
    
    .coin-value {
        padding: 0.1rem 0.3rem;
    }
    
    .coin-icon {
        width: 12px;
        height: 12px;
    }
    
    .coin-amount {
        font-size: 0.7rem;
    }
    
    /* Ensure tasks stay horizontal on extra small screens */
    .task-item {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.6rem;
    }
    
    .task-title {
        font-size: 0.8rem;
        line-height: 1.1;
        margin-bottom: 0.15rem;
    }
    
    .task-reward {
        font-size: 0.7rem;
        line-height: 1;
    }
    
    .task-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
        line-height: 1;
    }
    
    /* Checkin section extra small screen adjustments */
    .checkin-section {
        padding: 0.8rem;
    }
    
    .header-content {
        margin-bottom: 0.6rem;
    }
    
    .checkin-header h3 {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
    
    .daily-rewards {
        gap: 0.25rem;
        margin-bottom: 0.8rem;
    }
    
    .reward-day {
        padding: 0.3rem;
        gap: 0.15rem;
    }
    
    .day-label {
        font-size: 0.6rem;
    }
    
    .reward-icon {
        width: 16px;
        height: 16px;
    }
    
    .reward-amount {
        font-size: 0.7rem;
    }
    
    .checkin-btn {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .checkin-timer {
        padding: 0.15rem 0.5rem;
        min-width: 100px;
    }
    
    .timer-label {
        font-size: 0.7rem;
    }
    
    .timer-display {
        font-size: 1rem;
    }
}


/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        padding-bottom: 70px;
    }
    
    .header h1 {
        font-size: 1.4rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .header-riwayat-icon {
        width: 30px;
        height: 30px;
    }
    
    .my-balance-card .balance-header-row {
        margin-top: 0.4rem;
    }
    
    .content-card {
        padding: 1.5rem;
    }
    
    .content-card h2 {
        font-size: 1.5rem;
    }
    
    .content-card p {
        font-size: 1rem;
    }
    
    /* Task items responsive */
    .task-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }
    
    .task-progress {
        flex-direction: row;
        gap: 1.2rem;
    }
    
    .progress-bar {
        flex: 1;
    }
    
    .task-button-container {
        display: flex;
        justify-content: flex-end;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.1rem;
    }
    
    .header-riwayat-icon {
        width: 28px;
        height: 28px;
    }
    
    .my-balance-card .balance-header-row {
        margin-top: 0.35rem;
    }
    
    .content-card {
        padding: 1rem;
    }
    
    .content-card h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 360px) {
    .header h1 {
        font-size: 1rem;
    }
    
    .header-riwayat-icon {
        width: 26px;
        height: 26px;
    }
    
    .my-balance-card .balance-header-row {
        margin-top: 0.25rem;
    }
}

@media (max-width: 320px) {
    .header h1 {
        font-size: 0.9rem;
    }
    
    .header-riwayat-icon {
        width: 24px;
        height: 24px;
    }
    
    .my-balance-card .balance-header-row {
        margin-top: 0.2rem;
    }
}

/* Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.popup-overlay.show {
    display: flex;
}

.popup-content {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 25px;
    padding: 35px;
    max-width: 95%;
    width: 420px;
    text-align: center;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: popupSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.popup-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-60px) scale(0.85);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.popup-header {
    margin-bottom: 4px;
    position: relative;
}

.popup-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 1px;
    animation: iconFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(139, 92, 246, 0.3));
    transition: all 0.3s ease;
}

/* Special animation for diamond icon */
.popup-icon[src*="berlian"] {
    filter: drop-shadow(0 5px 15px rgba(59, 130, 246, 0.4));
    animation: diamondSparkle 2s ease-in-out infinite;
}

@keyframes diamondSparkle {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
        filter: drop-shadow(0 5px 15px rgba(59, 130, 246, 0.4));
    }
    25% {
        transform: translateY(-8px) rotate(5deg) scale(1.05);
        filter: drop-shadow(0 8px 20px rgba(59, 130, 246, 0.6));
    }
    50% {
        transform: translateY(-10px) rotate(-3deg) scale(1.1);
        filter: drop-shadow(0 10px 25px rgba(59, 130, 246, 0.8));
    }
    75% {
        transform: translateY(-6px) rotate(2deg) scale(1.05);
        filter: drop-shadow(0 6px 18px rgba(59, 130, 246, 0.5));
    }
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(5deg);
    }
}

.popup-header h3 {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive popup untuk layar kecil */
@media (max-width: 480px) {
    .popup-content {
        width: 350px;
        padding: 25px;
        max-width: 98%;
    }
    
    .popup-header h3 {
        font-size: 1.4rem;
    }
    
    .popup-message {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }
    
    .popup-message p {
        white-space: normal;
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .checkin-reward strong {
        font-size: 1.2rem;
    }
    
    .popup-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
        min-width: 0;
        flex: 1;
    }
}

@media (max-width: 360px) {
    .popup-content {
        width: 320px;
        padding: 20px;
        max-width: 98%;
    }
    
    .popup-header h3 {
        font-size: 1.2rem;
    }
    
    .popup-message {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .popup-message p {
        white-space: nowrap;
        font-size: 0.85rem;
    }
    
    .checkin-reward strong {
        font-size: 1.1rem;
    }
    
    .popup-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-width: 100px;
    }
}

/* Responsive design untuk daily rewards */
@media (max-width: 480px) {
    .daily-rewards {
        gap: 0.15rem;
        margin-bottom: 1.2rem;
    }
    
    .reward-day {
        padding: 0.25rem;
        min-width: 45px;
    }
    
    .day-label {
        font-size: 0.55rem;
    }
    
    .reward-icon {
        width: 14px;
        height: 14px;
    }
    
    .reward-amount {
        font-size: 0.65rem;
    }
    
    .checkin-btn {
        padding: 0.8rem;
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .daily-rewards {
        gap: 0.1rem;
        margin-bottom: 1rem;
    }
    
    .reward-day {
        padding: 0.15rem;
        min-width: 40px;
    }
    
    .day-label {
        font-size: 0.5rem;
    }
    
    .reward-icon {
        width: 12px;
        height: 12px;
    }
    
    .reward-amount {
        font-size: 0.6rem;
    }
    
    .checkin-btn {
        padding: 0.7rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 320px) {
    .daily-rewards {
        gap: 0.05rem;
        margin-bottom: 0.8rem;
    }
    
    .reward-day {
        padding: 0.1rem;
        min-width: 35px;
    }
    
    .day-label {
        font-size: 0.45rem;
    }
    
    .reward-icon {
        width: 10px;
        height: 10px;
    }
    
    .reward-amount {
        font-size: 0.55rem;
    }
    
    .checkin-btn {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
}

.popup-message {
    margin-bottom: 15px;
    color: #e0e7ff;
    line-height: 0.9;
    font-size: 1.05rem;
}

.popup-message p {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkin-reward {
    margin-top: 8px;
    margin-bottom: 8px;
}

.checkin-reward strong {
    color: #fbbf24;
    font-weight: 700;
    font-size: 1.3rem;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
    display: block;
}

.popup-message strong {
    color: #fbbf24;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.popup-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.popup-btn {
    padding: 15px 35px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 120px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-btn.primary {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ff6b35 100%);
    color: white;
    box-shadow: 
        0 8px 25px rgba(255, 107, 53, 0.4),
        0 0 0 1px rgba(255, 107, 53, 0.2);
}

.popup-btn.primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.popup-btn.primary:hover::before {
    left: 100%;
}

.popup-btn.primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 15px 35px rgba(255, 107, 53, 0.5),
        0 0 0 2px rgba(255, 107, 53, 0.3);
}

.popup-btn.primary:active {
    transform: translateY(-1px) scale(1.02);
}

/* Scoped styling for App Tasks list so beginner tasks remain unchanged */
#appTaskList .task-details {
    width: 100%;
}

#appTaskList .task-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    width: 100%;
}

#appTaskList .task-title .task-reward {
    margin-left: auto;
    font-weight: 700;
}

@media (max-width: 768px) {
    #appTaskList .task-title {
        gap: 0.3rem;
    }
}

/* Reduce spacing between title and description for app tasks */
#app-tasks-section .task-details {
    gap: 0.05rem;
}

/* App task description below task-info */
#app-tasks-section .task-details .task-title { 
    margin-bottom: 0; /* remove any bottom spacing on the title */
}

#app-tasks-section .task-details .task-desc.app {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin: 0 0 0; /* no space under title */
    font-size: 0.7rem !important;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.85);
}

#app-tasks-section .task-details .task-desc.app .desc-text {
    flex: 1;
}

#app-tasks-section .task-details .task-desc.app .task-btn.watch-video {
    display: inline-flex;
    width: auto;
    flex-shrink: 0;
}

/* Reduce spacing between title and progress for beginner tasks only */
.tasks-section:not(#app-tasks-section) .task-details {
    gap: 0.05rem;
}

@media (max-width: 480px) {
    #app-tasks-section .task-details .task-desc.app {
        font-size: 0.65rem !important;
    }
}

/* Level Warning Popup Styles */
.current-level-text {
    color: #ffffff;
    font-size: 0.9rem;
    margin: 10px 0 0 0;
    text-align: center;
}

.current-level-text strong {
    color: #ff6b6b;
    font-weight: 700;
}

.level-list {
    margin: 15px 0;
    padding: 12px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    text-align: center;
}

.level-item {
    display: block;
    color: #ffffff;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 600;
    line-height: 1.4;
}

.popup-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: nowrap;
}

.popup-btn {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.popup-btn.secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: #ffffff;
}

.popup-btn.secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #3d4449 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.popup-btn.primary {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #ffffff;
}

.popup-btn.primary:hover {
    background: linear-gradient(135deg, #e55a2b 0%, #e8841a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments for small screens */
@media (max-width: 480px) {
    .popup-buttons {
        flex-direction: row;
        gap: 8px;
    }
    
    .popup-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 360px) {
    .popup-buttons {
        gap: 6px;
    }
    
    .popup-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}

/* Bottom Navigation - Exact copy from home.css */
.bottom-nav {
    position: fixed;
    bottom: -6px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
    display: flex;
    justify-content: space-around;
    padding: 0.28rem 0.35rem;
    box-shadow: 0 -6px 18px rgba(30, 64, 175, 0.35), 0 -1px 0 rgba(147, 197, 253, 0.25) inset;
    z-index: 1000;
    border-radius: 16px 16px 0 0;
    border: none;
    border-top: 1px solid rgba(147, 197, 253, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding-bottom: calc(0.6rem + env(safe-area-inset-bottom));
}


.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.06rem;
    color: rgba(226, 232, 240, 0.85);
    cursor: pointer;
    transition: color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
    padding: 0.42rem 0.55rem;
    border-radius: 12px;
    min-width: 64px;
    flex: 1;
    position: relative;
}

.nav-item:hover { color: #f8fafc; background: rgba(59, 130, 246, 0.25); transform: translateY(-1px); }

.nav-item.active { color: #f0f9ff; background: rgba(59, 130, 246, 0.35); box-shadow: 0 6px 14px rgba(30, 64, 175, 0.35), inset 0 0 0 1px rgba(191, 219, 254, 0.55); }

/* active top indicator */
.nav-item.active::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 3px;
    background: #93c5fd;
    border-radius: 999px;
    box-shadow: 0 0 8px rgba(147, 197, 253, 0.65);
}

.nav-item i {
    font-size: 1.3rem;
}

.nav-item span {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1px;
    line-height: 1;
    margin-top: 2px;
}

/* Image icons for bottom navigation */
.nav-item .nav-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: drop-shadow(0 0 1px rgba(0,0,0,0.65));
    opacity: 0.9;
    transition: opacity 180ms ease, transform 180ms ease;
}

/* crisper icon on active */
.nav-item.active .nav-icon { opacity: 1; transform: translateY(-1px); }

/* PWA Install Popup Styles */
.pwa-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pwa-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.pwa-popup-content {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 20px;
    padding: 0;
    max-width: 90%;
    width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pwa-popup-overlay.show .pwa-popup-content {
    transform: scale(1) translateY(0);
}

.pwa-popup-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Close (X) button in header */
.pwa-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 22px;
    line-height: 34px;
    cursor: pointer;
    backdrop-filter: blur(2px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.pwa-close-btn:hover { background: rgba(255, 255, 255, 0.28); transform: scale(1.05); }
.pwa-close-btn:active { transform: scale(0.98); }

.pwa-popup-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin-bottom: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.pwa-popup-header h2 {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pwa-popup-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.pwa-popup-body {
    padding: 25px;
    background: white;
}

.pwa-install-steps {
    margin-bottom: 25px;
}

.pwa-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9ff;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.pwa-step:hover {
    background: #f0f2ff;
    transform: translateX(5px);
}

.pwa-step:last-child {
    margin-bottom: 0;
}

.pwa-step-number {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    margin-right: 15px;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.pwa-step-content h4 {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.pwa-step-content p {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

.pwa-reward-info {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.5);
}

.pwa-reward-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pwa-reward-icon {
    width: 30px;
    height: 30px;
}

.pwa-reward-text {
    color: #b8860b;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.pwa-popup-buttons {
    padding: 8px 20px 16px;
    display: flex;
    gap: 15px;
    background: white;
}

.pwa-popup-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pwa-popup-btn.secondary {
    background: #f1f3f4;
    color: #666;
    border: 2px solid #e0e0e0;
}

.pwa-popup-btn.secondary:hover {
    background: #e8eaed;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pwa-popup-btn.primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.pwa-popup-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.pwa-popup-btn:active {
    transform: translateY(0);
}

/* Responsive PWA Popup */
@media (max-width: 480px) {
    .pwa-popup-content {
        width: 95%;
        margin: 10px;
    }
    
    .pwa-popup-header {
        padding: 25px 20px 15px;
    }
    
    .pwa-popup-logo {
        width: 70px;
        height: 70px;
    }
    
    .pwa-popup-header h2 {
        font-size: 22px;
    }
    
    .pwa-popup-body {
        padding: 20px;
    }
    
    .pwa-step {
        padding: 12px;
    }
    
    .pwa-step-number {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    
    .pwa-step-content h4 {
        font-size: 15px;
    }
    
    .pwa-step-content p {
        font-size: 13px;
    }
    
    .pwa-popup-buttons {
        padding: 8px 16px 14px;
        flex-direction: column;
    }
    
    .pwa-popup-btn {
        padding: 12px 16px;
        font-size: 15px;
    }
}

/* Override: keep normal casing for popup buttons text in PWA popup */
#pwaInstallPopup .pwa-popup-btn { text-transform: none; letter-spacing: 0.2px; }

/* Pulse (denyut) animation for the primary install button */
@keyframes pwaPulse {
    0% { transform: translateY(0) scale(1); box-shadow: 0 4px 15px rgba(102,126,234,0.4); }
    50% { transform: translateY(-1px) scale(1.04); box-shadow: 0 8px 24px rgba(102,126,234,0.55); }
    100% { transform: translateY(0) scale(1); box-shadow: 0 4px 15px rgba(102,126,234,0.4); }
}

#pwaInstallPopup .pwa-popup-btn.primary {
    animation: pwaPulse 1.6s ease-in-out infinite;
}

#pwaInstallPopup .pwa-popup-btn.primary:hover {
    animation-play-state: paused;
}

/* Reduce space between body and buttons */
#pwaInstallPopup .pwa-install-steps { margin-bottom: 8px; }

/* Compact typography overrides for PWA popup */
#pwaInstallPopup .pwa-popup-header h2,
#pwaInstallPopup .pwa-popup-subtitle,
#pwaInstallPopup .pwa-step-content h4,
#pwaInstallPopup .pwa-step-content p,
#pwaInstallPopup .pwa-reward-text {
    line-height: 1.08;
}

/* Tighten overall header line height (force override) */
#pwaInstallPopup .pwa-popup-header,
#pwaInstallPopup .pwa-popup-header * {
    line-height: 1.04 !important;
}

/* Reduce header title spacing */
#pwaInstallPopup .pwa-popup-header h2 { margin-bottom: 4px; }

#pwaInstallPopup .pwa-step-content h4 { margin: 0 0 4px; }
#pwaInstallPopup .pwa-step-content p { margin: 0; }

/* Reduce vertical spacing between steps for denser layout */
#pwaInstallPopup .pwa-step { margin-bottom: 8px; padding: 10px; }

/* Slightly reduce header and body paddings to tighten overall popup */
#pwaInstallPopup .pwa-popup-header { padding: 18px 14px 10px; }
#pwaInstallPopup .pwa-popup-body { padding: 14px; }

@media (max-width: 480px) {
    #pwaInstallPopup .pwa-step { margin-bottom: 6px; padding: 8px; }
    #pwaInstallPopup .pwa-popup-header { padding: 16px 12px 8px; }
    #pwaInstallPopup .pwa-popup-body { padding: 12px; }
}
