/* ========================================
   AppGold - Main Styles
   ======================================== */

:root {
    /* Primary Colors */
    --primary: #f5a623;
    --primary-dark: #d4891a;
    --primary-light: #ffc107;
    --primary-glow: rgba(245, 166, 35, 0.3);
    
    /* Accent Colors */
    --gold: #ffd700;
    --gold-dark: #b8860b;
    --diamond: #b9f2ff;
    --diamond-dark: #00bcd4;
    
    /* Status Colors */
    --success: #00e676;
    --success-dark: #00c853;
    --error: #ff5252;
    --error-dark: #ff1744;
    --warning: #ffab40;
    --info: #40c4ff;
    
    /* Background Colors */
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a25;
    --bg-elevated: #1e1e2d;
    --bg-input: #16161f;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b80;
    --text-disabled: #404050;
    
    /* Border Colors */
    --border: #2a2a3a;
    --border-light: #3a3a4a;
    
    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #f5a623 0%, #ffd700 50%, #f5a623 100%);
    --gradient-primary: linear-gradient(135deg, #f5a623 0%, #ff8c00 100%);
    --gradient-success: linear-gradient(135deg, #00e676 0%, #00c853 100%);
    --gradient-diamond: linear-gradient(135deg, #00bcd4 0%, #b9f2ff 50%, #00bcd4 100%);
    --gradient-dark: linear-gradient(180deg, #12121a 0%, #0a0a0f 100%);
    --gradient-card: linear-gradient(145deg, #1a1a25 0%, #12121a 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--primary-glow);
    --shadow-gold: 0 4px 20px rgba(245, 166, 35, 0.3);
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Typography */
    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;
    
    /* Z-Index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-toast: 400;
    --z-splash: 500;
}

/* ========================================
   Reset & Base Styles
   ======================================== */

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

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea {
    font-family: inherit;
    font-size: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

/* ========================================
   Utility Classes
   ======================================== */

.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ========================================
   Splash Screen
   ======================================== */

.splash-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-darker);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-splash);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
    animation: fadeInUp 0.8s ease;
}

.splash-logo {
    margin-bottom: var(--space-xl);
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-gold);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    box-shadow: var(--shadow-gold);
    animation: pulse 2s ease-in-out infinite;
}

.logo-icon i {
    font-size: 40px;
    color: var(--bg-dark);
}

.logo-icon.large {
    width: 100px;
    height: 100px;
}

.logo-icon.large i {
    font-size: 50px;
}

.logo-text {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.logo-text span {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.splash-loader {
    width: 200px;
    height: 4px;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-md);
    overflow: hidden;
}

.loader-bar {
    width: 0%;
    height: 100%;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    animation: loadProgress 2s ease forwards;
}

.splash-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ========================================
   Login Screen
   ======================================== */

.login-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    overflow-y: auto;
}

.login-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(245, 166, 35, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        var(--bg-darker);
}

.bg-particles {
    position: absolute;
    inset: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 10s ease-in-out infinite;
}

.login-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    border: 1px solid var(--border);
    animation: fadeInUp 0.6s ease;
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.login-subtitle {
    color: var(--text-secondary);
    margin-top: var(--space-sm);
}

.login-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    background: var(--bg-input);
    padding: var(--space-xs);
    border-radius: var(--radius-md);
}

.tab-btn {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.tab-btn.active {
    background: var(--gradient-gold);
    color: var(--bg-dark);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: var(--space-md);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: var(--space-md);
    padding-left: 48px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-base);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

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

.input-wrapper .currency-prefix {
    position: absolute;
    left: var(--space-md);
    color: var(--text-secondary);
    font-weight: 600;
}

.input-wrapper .currency-prefix + input {
    padding-left: 48px;
}

.toggle-password {
    position: absolute;
    right: var(--space-md);
    color: var(--text-muted);
    transition: var(--transition-fast);
}

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

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    font-size: 0.875rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    color: var(--text-secondary);
}

.checkbox-wrapper input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.checkbox-wrapper input:checked + .checkmark {
    background: var(--gradient-gold);
    border-color: var(--primary);
}

.checkbox-wrapper input:checked + .checkmark::after {
    content: '✓';
    color: var(--bg-dark);
    font-size: 12px;
    font-weight: bold;
}

.checkbox-wrapper.terms {
    font-size: 0.8rem;
    margin-bottom: var(--space-md);
}

.checkbox-wrapper.terms a {
    color: var(--primary);
}

.forgot-password {
    color: var(--primary);
    font-weight: 500;
}

.social-login {
    margin-top: var(--space-xl);
    text-align: center;
}

.social-login p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: var(--space-md);
    position: relative;
}

.social-login p::before,
.social-login p::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: var(--border);
}

.social-login p::before {
    left: 0;
}

.social-login p::after {
    right: 0;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition-base);
    border: 1px solid var(--border);
}

.social-btn.google {
    background: var(--bg-input);
    color: #ea4335;
}

.social-btn.facebook {
    background: var(--bg-input);
    color: #1877f2;
}

.social-btn.apple {
    background: var(--bg-input);
    color: var(--text-primary);
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   App Container
   ======================================== */

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 80px;
}

/* ========================================
   App Header
   ======================================== */

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--bg-dark);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.user-avatar {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    overflow: visible;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    border: 2px solid var(--primary);
}

.vip-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: var(--gradient-gold);
    color: var(--bg-dark);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

.user-info {
    display: flex;
    flex-direction: column;
}

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

.user-name {
    font-weight: 600;
    font-size: 1rem;
}

.header-right {
    display: flex;
    gap: var(--space-sm);
}

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-base);
    position: relative;
}

.header-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--error);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Balance Section
   ======================================== */

/* Balance section removed - force hide all balance elements */
.balance-section,
.balance-card,
.balance-btn,
.balance-header,
.balance-label,
.balance-amount,
.balance-change,
.balance-actions,
[class*="balance"],
[id*="balance"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
    padding: 0 var(--space-md) var(--space-md);
}

.balance-card {
    background: var(--gradient-card);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    pointer-events: none;
}

.balance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
    position: relative;
}

.balance-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.toggle-balance {
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.toggle-balance:hover {
    color: var(--text-secondary);
}

.balance-amount {
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
    position: relative;
}

.balance-amount .currency {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.balance-amount .amount {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: -1px;
}

.balance-amount.hidden-balance .amount {
    filter: blur(8px);
}

.balance-change {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.875rem;
    margin-bottom: var(--space-lg);
    position: relative;
}

.balance-change.positive {
    color: var(--success);
}

.balance-change.negative {
    color: var(--error);
}

.balance-actions {
    display: flex;
    gap: var(--space-sm);
    position: relative;
}

.balance-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm);
    background: var(--bg-input);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.balance-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.balance-btn i {
    font-size: 1.25rem;
}

.balance-btn span {
    font-size: 0.75rem;
    font-weight: 500;
}

.balance-btn.deposit:hover {
    color: var(--success);
}

.balance-btn.withdraw:hover {
    color: var(--primary);
}

/* ========================================
   Quick Stats
   ======================================== */

.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    padding: 0 var(--space-md) var(--space-md);
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    border: 1px solid var(--border);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.stat-icon.green {
    background: rgba(0, 230, 118, 0.15);
    color: var(--success);
}

.stat-icon.blue {
    background: rgba(64, 196, 255, 0.15);
    color: var(--info);
}

.stat-icon.gold {
    background: rgba(245, 166, 35, 0.15);
    color: var(--primary);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   Main Content
   ======================================== */

.main-content {
    flex: 1;
    padding: 0 var(--space-md);
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.page-header {
    margin-bottom: var(--space-lg);
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.page-header p {
    color: var(--text-secondary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.section-title i {
    color: var(--primary);
}

.see-all {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.task-counter {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========================================
   Bottom Navigation
   ======================================== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: var(--space-sm) 0;
    padding-bottom: max(var(--space-sm), env(safe-area-inset-bottom));
    z-index: var(--z-sticky);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    transition: var(--transition-base);
    padding: var(--space-xs) var(--space-sm);
}

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

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

.nav-item.nav-center {
    margin-top: -30px;
}

.nav-center-btn {
    width: 56px;
    height: 56px;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-gold);
    margin-bottom: 4px;
}

.nav-center-btn i {
    font-size: 1.5rem;
    color: var(--bg-dark);
}

/* ========================================
   Scrollbar
   ======================================== */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* ========================================
   Full Screen Iframe
   ======================================== */

#fullscreen-iframe {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 99999 !important;
    border: none !important;
    background: #000 !important;
    pointer-events: auto !important;
    overflow: hidden !important;
}

/* Garantir que o iframe cubra tudo, incluindo em mobile */
@media (max-width: 768px) {
    #fullscreen-iframe {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
    }
}

/* Esconder todos os outros elementos quando o iframe estiver ativo, exceto o popup de notificações, chat widget e modal iOS */
body.iframe-active > *:not(#fullscreen-iframe):not(#notification-prompt-overlay):not(#chat-widget-button):not(#chat-widget-container):not(#iosInstallModal):not(.modal-overlay) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Garantir que o popup de notificações apareça sobre o iframe */
#notification-prompt-overlay {
    z-index: 1000000 !important;
    position: fixed !important;
    pointer-events: auto !important;
}

/* Garantir que o chat widget apareça sobre o iframe */
.chat-widget-button,
.chat-widget-container {
    z-index: 10000000 !important;
    position: fixed !important;
    pointer-events: auto !important;
}

/* Garantir que o modal iOS apareça sobre o iframe */
.modal-overlay,
#iosInstallModal {
    z-index: 10000001 !important;
    position: fixed !important;
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.modal-overlay.active,
#iosInstallModal.active {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ========================================
   Top Banner - Estrategista
   ======================================== */

#top-banner {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: linear-gradient(135deg, #f5a623 0%, #ffc107 100%) !important;
    color: #000 !important;
    text-align: center !important;
    padding: 8px 16px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    z-index: 100000 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    animation: slideDown 0.3s ease-out !important;
    pointer-events: none !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#top-banner p {
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    #top-banner {
        font-size: 11px;
        padding: 6px 12px;
    }
}

