:root {
    --primary: #00ff88;
    --primary-glow: rgba(0, 255, 136, 0.4);
    --bg-dark: #0a0a0a;
    --bg-card: #161616;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --gradient-1: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    --card-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass: rgba(22, 22, 22, 0.8);
    --font-family: 'Inter', sans-serif;
}

html {
    font-size: 14px;
    /* Compact Base */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
    -webkit-tap-highlight-color: transparent;
    /* Removes blue tap box */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    padding-bottom: 80px;
    /* Space for specific bottom nav if needed */
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    background: var(--gradient-1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wallet-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.wallet-badge:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--primary);
}

.currency-symbol {
    color: var(--primary);
}

/* Main Content */
main {
    padding: 12px;
    /* Compact Main Padding */
    max-width: 600px;
    margin: 0 auto;
}

.hero-section {
    text-align: center;
    margin-bottom: 20px;
    padding: 24px 0;
    /* Background Removed */
}

.hero-title {
    font-size: 1.6rem;
    /* Reduced from 2rem */
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.2;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Offer List */
.offers-grid {
    display: grid;
    gap: 16px;
}

.offer-card {
    background: var(--bg-card);
    border: var(--card-border);
    border-radius: 16px;
    padding: 12px;
    /* Compact Card Padding */
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.offer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.offer-card:hover::before {
    transform: translateX(100%);
}

.offer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(0, 255, 136, 0.3);
}

.app-icon {
    width: 48px;
    /* Compact Icon */
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: #202020;
    flex-shrink: 0;
}

.offer-details {
    flex: 1;
}

.app-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: var(--text-main);
}

.offer-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

.offer-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 80px;
}

.reward-amount {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    text-shadow: 0 0 20px var(--primary-glow);
}

.get-btn {
    background: var(--gradient-1);
    border: none;
    color: #000;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.2s;
    text-transform: uppercase;
}

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.offer-card {
    animation: fadeInUp 0.5s ease backwards;
}

.offer-card:nth-child(1) {
    animation-delay: 0.1s;
}

.offer-card:nth-child(2) {
    animation-delay: 0.2s;
}

.offer-card:nth-child(3) {
    animation-delay: 0.3s;
}

.offer-card:nth-child(4) {
    animation-delay: 0.4s;
}

.offer-card:nth-child(5) {
    animation-delay: 0.5s;
}

/* Responsive */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #1a1a1a;
    width: 100%;
    max-width: 340px;
    /* Reduced width */
    border-radius: 24px;
    padding: 20px;
    /* Reduced padding */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
}

.modal-app-icon {
    width: 60px;
    /* Reduced from 80px */
    height: 60px;
    border-radius: 20px;
    margin-bottom: 16px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

#modalTitle {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

#modalDesc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.steps-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}

.steps-container h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.steps-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.steps-list li {
    display: flex;
    gap: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
    align-items: flex-start;
}

.step-num {
    background: rgba(0, 255, 136, 0.1);
    color: var(--primary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.reward-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
    margin-bottom: 24px;
}

.modal-reward-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.modal-action-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-1);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.modal-action-btn:hover {
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

/* UPI Badge */
.upi-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-around;
    padding: 10px 16px 18px 16px;
    /* -5% */
    z-index: 999;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px 12px;
    /* Standard Padding */
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.nav-item.active {
    color: var(--primary);
    /* Green Text */
    background: transparent;
    box-shadow: none;
    transform: translateY(-2px);
}

/* Underline Removed */

.nav-icon {
    font-size: 1.3rem;
    margin-bottom: 2px;
    transition: transform 0.2s;
}

.nav-item.active .nav-icon {
    transform: scale(1.1);
    color: var(--primary);
    /* Green Icon */
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

.nav-label {
    font-size: 0.75rem;
    font-weight: 700;
}


/* View Sections */
.view-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Inputs */
.input-group {
    margin-bottom: 24px;
}

.modal-input {
    width: 100%;
    padding: 12px;
    /* Reduced padding */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.3s;
}

.modal-input:focus {
    border-color: var(--primary);
    background: rgba(0, 255, 136, 0.05);
}

.error-msg {
    color: #ff4444;
    font-size: 0.85rem;
    margin-top: 8px;
    min-height: 20px;
}

/* Refer Card */
.refer-card {
    background: var(--bg-card);
    border: var(--card-border);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.refer-code-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.refer-code-box span {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

.refer-code {
    font-size: 2rem;
    color: var(--primary);
    margin: 10px 0;
    letter-spacing: 0.1em;
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--primary);
    color: #000;
}

.refer-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 12px;
}

.step-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-icon {
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.05);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 8px;
}

.step-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.share-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-1);
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    color: #000;
    cursor: pointer;
    transition: transform 0.2s;
}

.share-btn:active {
    transform: scale(0.98);
}

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

/* Wallet View Styles */
.wallet-card-large {
    background: var(--bg-card);
    border: var(--card-border);
    border-radius: 20px;
    padding: 16px;
    /* Compact Wallet */
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.wallet-card-large::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.wallet-balance-box {
    text-align: center;
    margin-bottom: 20px;
}

.wallet-balance-box span {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.large-balance {
    font-size: 2.4rem;
    /* Reduced from 3rem */
    font-weight: 800;
    color: var(--text-main);
    margin-top: 4px;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.large-balance span {
    font-size: 1.15em;
}

.linked-upi-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.upi-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.upi-info i {
    font-size: 1.5rem;
    color: var(--primary);
    background: rgba(0, 255, 136, 0.1);
    padding: 8px;
    border-radius: 50%;
}

.upi-text {
    display: flex;
    flex-direction: column;
}

.upi-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.upi-value {
    font-weight: 600;
    font-size: 0.95rem;
}

.edit-upi-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-upi-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.withdraw-btn {
    width: 100%;
    background: var(--gradient-1);
    border: none;
    padding: 14px;
    /* Reduced from 16px */
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    color: #000;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.withdraw-btn:active {
    transform: scale(0.98);
}

.withdraw-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 12px;
}

.transaction-history h3 {
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.empty-state {
    text-align: center;
    padding: 30px;
    /* Reduced from 40px */
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
    opacity: 0.5;
}

/* Refer Link Box */
.refer-link-box {
    text-align: left;
    margin-bottom: 24px;
}

.refer-link-box label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    letter-spacing: 0.05em;
}

.link-input-wrapper {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px;
    border-radius: 12px;
}

.link-input-wrapper input {
    background: transparent;
    border: none;
    color: var(--text-main);
    flex: 1;
    padding: 8px 12px;
    font-family: monospace;
    font-size: 0.9rem;
    outline: none;
}

.copy-link-btn {
    background: var(--primary);
    border: none;
    color: #000;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* Refer History */
.refer-history-section {
    margin-top: 30px;
}

.refer-history-section h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    padding-left: 4px;
}

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

.refer-transaction {
    background: var(--bg-card);
    border: var(--card-border);
    border-radius: 12px;
    padding: 12px;
    /* Reduced from 16px */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.trans-icon {
    width: 40px;
    height: 40px;
    background: rgba(0, 255, 136, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.trans-details {
    flex: 1;
    margin-left: 12px;
}

.trans-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.trans-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.trans-amount {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

/* Enhanced Login Modal */
.login-modal {
    padding: 30px !important;
    max-width: 380px !important;
}

.login-icon-circle {
    width: 80px;
    height: 80px;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
    border: 1px solid rgba(0, 255, 136, 0.2);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.1);
}

.login-icon-circle i {
    font-size: 2.5rem;
    color: var(--primary);
}

.input-box {
    position: relative;
    margin-bottom: 16px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
    transition: color 0.3s;
}

.modal-input-with-icon {
    padding-left: 50px !important;
    /* Space for icon */
}

.input-box:focus-within .input-icon {
    color: var(--primary);
}