:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --border-glass: rgba(255, 255, 255, 0.1);
    --primary-color: #f97316; /* Shopee Orange */
    --primary-glow: rgba(249, 115, 22, 0.5);
    --secondary-color: #06b6d4; /* Cyan neon */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --warning: #eab308;
    --info: #3b82f6;
    --border-radius-lg: 20px;
    --border-radius-md: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(249, 115, 22, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.08), transparent 25%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.app-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    padding: 20px 20px 130px 20px;
    position: relative;
    overflow-x: hidden;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(to right, #f8fafc, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.neon-icon {
    color: var(--primary-color);
    font-size: 1.5rem;
    text-shadow: 0 0 10px var(--primary-glow);
}

.notification-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
}

.notification-btn::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary-glow);
}

/* Wallet Card */
.wallet-card {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.wallet-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: var(--secondary-color);
    filter: blur(80px);
    opacity: 0.3;
    z-index: 0;
}

.wallet-info {
    position: relative;
    z-index: 1;
}

.wallet-info .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 8px;
}

.wallet-info .balance {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.withdraw-btn {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.withdraw-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Converter Section */
.converter-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.section-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    align-items: center;
    padding: 6px 6px 6px 16px;
    margin-bottom: 16px;
    border-radius: var(--border-radius-md);
    transition: border-color 0.3s;
}

.input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.2);
}

.input-icon {
    color: var(--text-muted);
    margin-right: 12px;
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    width: 100%;
}

.input-group input::placeholder {
    color: var(--text-muted);
}

/* Override Browser Autofill Background */
.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover, 
.input-group input:-webkit-autofill:focus, 
.input-group input:-webkit-autofill:active{
    -webkit-box-shadow: 0 0 0 30px #1e293b inset !important;
    -webkit-text-fill-color: var(--text-main) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.primary-btn {
    width: 100%;
    padding: 16px;
    border-radius: var(--border-radius-md);
    border: none;
    background: linear-gradient(135deg, var(--primary-color), #ea580c);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.primary-btn.neon-glow {
    box-shadow: 0 4px 20px var(--primary-glow);
}

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

/* Result Area */
.result-area {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid var(--success);
    animation: slideDown 0.3s ease-out;
}

.result-area.hidden {
    display: none;
}

.success-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-weight: 500;
}

.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }

.short-link-container {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

#short-link {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 12px;
    color: var(--secondary-color);
    font-family: monospace;
    font-size: 0.9rem;
    outline: none;
}

.secondary-btn {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid var(--secondary-color);
    background: rgba(6, 182, 212, 0.1);
    color: var(--secondary-color);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background: rgba(6, 182, 212, 0.2);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

/* Features */
.features-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.feature-card {
    padding: 16px;
    text-align: center;
}

.feature-card i {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.feature-card h4 {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.feature-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    border-radius: 24px;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.2s;
}

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

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

/* Animations */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Auth View */
.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    z-index: 1000;
}

.auth-box {
    padding: 30px 20px;
}

.text-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.text-center .neon-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.text-center h2 {
    font-size: 1.4rem;
    background: linear-gradient(to right, #f8fafc, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-form {
    margin-top: 24px;
    animation: fadeIn 0.3s ease-out;
}

.auth-form.hidden {
    display: none;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-switch a:hover {
    color: #ea580c;
}

/* Global Hidden Class */
.hidden {
    display: none !important;
}

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

/* Password Toggle & Error */
.password-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s;
    z-index: 10;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.error-message {
    color: #ef4444; /* Red */
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 15px;
    animation: fadeIn 0.2s;
}

.forgot-pass {
    text-align: right;
    margin-bottom: 15px;
    margin-top: -5px;
}

.forgot-pass a {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-pass a:hover {
    color: var(--primary-color);
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.3s;
}

.modal-overlay.hidden {
    display: none;
    opacity: 0;
}

.modal-content {
    width: 100%;
    max-width: 400px;
    padding: 25px;
    animation: slideDown 0.3s ease-out;
}

/* Transaction History Styles */
.transactions-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transaction-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
}

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

.tx-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.tx-icon.withdrawal {
    background: rgba(249, 115, 22, 0.1);
    color: var(--primary-color);
}

.tx-icon.cashback {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.tx-details h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.tx-details p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tx-amount-status {
    text-align: right;
}

.tx-amount {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 6px;
}

.tx-amount.negative {
    color: var(--text-main);
}

.tx-amount.positive {
    color: var(--success);
}

.status-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background: rgba(234, 179, 8, 0.1);
    color: var(--warning);
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.status-badge.completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Tutorial Slider */
.tutorial-slide {
    animation: fadeIn 0.3s ease-out;
}

.slide-dots {
    display: flex;
    gap: 6px;
}

.slide-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.2s;
}

.slide-dots .dot.active {
    background: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-glow);
}

/* Account Profile Styles */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    border-radius: var(--border-radius-lg);
    text-align: center;
}

.avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 0 20px var(--primary-glow);
}

.danger-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 14px;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.danger-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

/* FAQ Accordion Styles */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: inherit;
}

.faq-question i {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 10px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    line-height: 1.5;
}
