/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    /* iPhone specific fixes */
    -webkit-background-size: cover;
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Profile Modal Styles */
.profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.profile-modal-content {
    background: rgba(26, 26, 46, 0.95);
    border-radius: 25px;
    padding: 2.5rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid rgba(0, 242, 254, 0.3);
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 242, 254, 0.2);
    animation: slideInUp 0.4s ease;
}

.profile-modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-modal-header h2 {
    color: #00f2fe;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #00f2fe, #4facfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-modal-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.5;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.required {
    color: #ff6347;
    margin-left: 0.2rem;
}

.profile-submit-btn {
    width: 100%;
    padding: 1.2rem 2rem;
    background: linear-gradient(45deg, #00f2fe, #4facfe, #ff0080);
    background-size: 300% 300%;
    border: none;
    border-radius: 15px;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: gradientAnimation 3s ease infinite;
    margin-top: 2rem;
}

.profile-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 242, 254, 0.4);
}

.profile-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.terms-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #00f2fe;
    margin: 0;
    flex-shrink: 0;
}

.terms-link {
    color: #00f2fe;
    text-decoration: underline;
}

.terms-link:hover {
    color: #4facfe;
}

/* Profile View Styles */
.profile-view-content {
    margin-bottom: 2rem;
}

.profile-field {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-field label {
    font-weight: 600;
    color: #00f2fe;
    min-width: 120px;
    flex-shrink: 0;
}

.profile-field span {
    color: rgba(255, 255, 255, 0.9);
    text-align: right;
    word-break: break-word;
    flex: 1;
    margin-left: 1rem;
}

.profile-note {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.profile-note p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile responsive for profile modal */
@media (max-width: 768px) {
    .profile-modal-content {
        padding: 1.5rem;
        margin: 1rem;
        max-height: 95vh;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .profile-modal-header h2 {
        font-size: 1.5rem;
    }
    
    .profile-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .profile-field label {
        min-width: auto;
    }
    
    .profile-field span {
        margin-left: 0;
        text-align: left;
    }
}

/* Animated Background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #ddd, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 3s linear infinite;
    z-index: -2;
}

.nebula {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 119, 198, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(120, 255, 198, 0.1) 0%, transparent 50%);
    animation: nebulaDrift 20s ease-in-out infinite alternate;
    z-index: -1;
}

@keyframes sparkle {
    from { transform: translateY(0px); }
    to { transform: translateY(-100px); }
}

@keyframes nebulaDrift {
    0% { transform: rotate(0deg) scale(1); }
    100% { transform: rotate(5deg) scale(1.1); }
}
/* FIXED Header Styles - Enforced single line layout */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    padding: 0.5rem 0;
    height: 60px;
}

.navbar {
    max-width: 100%;
    margin: 0 auto;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 1rem;
    height: 100%;
    flex-wrap: nowrap !important;
    gap: 1rem;
    min-width: 0;
}

.nav-brand {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.nav-brand .logo {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem;
    width: 100%;
    overflow: hidden;
    flex-wrap: nowrap !important;
}

.logo-image {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 242, 254, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0 !important;
}

.logo-image:hover {
    border-color: #00f2fe;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
}

/* Keep the AI orb as fallback if logo doesn't load */
.ai-orb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00f2fe 0%, #4facfe 100%);
    position: relative;
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0;
    display: none;
}

.ai-orb::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff0080, #ff8c00, #40e0d0);
    z-index: -1;
    animation: rotate 3s linear infinite;
}

/* Show AI orb if logo fails to load */
.logo-image:not([src]), .logo-image[src=""] {
    display: none;
}

.logo-image:not([src]) + .ai-orb, .logo-image[src=""] + .ai-orb {
    display: block;
}

.brand-text {
    font-size: 1.1rem !important;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}

.nav-actions {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem;
    flex-shrink: 0 !important;
}

/* FIXED: Force wallet button to stay compact and on same line */
.connect-wallet-btn {
    padding: 0.5rem 1rem !important;
    font-size: 0.8rem !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
    min-width: 100px !important;
    max-width: 140px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex-shrink: 0 !important;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.3rem !important;
    height: 36px !important;
}

.connect-wallet-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.connect-wallet-btn .wallet-icon {
    font-size: 0.8rem;
    flex-shrink: 0;
}

.connect-wallet-btn span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    max-width: 80px;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.highlight {
    background: linear-gradient(45deg, #00f2fe, #4facfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text {
    background: linear-gradient(45deg, #00f2fe, #4facfe, #ff0080);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(30deg); }
}

/* Buttons */
.connect-wallet-btn, .launch-btn {
    padding: 0.6rem 1rem;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.connect-wallet-btn:hover, .launch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.launch-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    background: linear-gradient(45deg, #ff0080, #ff8c00, #40e0d0);
    background-size: 300% 300%;
    animation: gradientAnimation 3s ease infinite;
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Main Content */
.main {
    padding-top: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 4rem 2rem;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-card {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #00f2fe;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-orb {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(0, 242, 254, 0.3), rgba(79, 172, 254, 0.3));
    animation: float 6s ease-in-out infinite;
}

.orb-1 {
    width: 60px;
    height: 60px;
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.orb-2 {
    width: 40px;
    height: 40px;
    top: 60%;
    right: 30%;
    animation-delay: 2s;
}

.orb-3 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 60%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(120deg); }
    66% { transform: translateY(10px) rotate(240deg); }
}

.ai-hologram {
    position: relative;
    width: 200px;
    height: 200px;
}

.hologram-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid #00f2fe;
    border-radius: 50%;
    animation: spin 10s linear infinite;
}

.hologram-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #00f2fe 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Features Section */
.features {
    padding: 6rem 0;
    background: rgba(0, 0, 0, 0.2);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 242, 254, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #00f2fe;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.feature-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover .feature-glow {
    opacity: 1;
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.5);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    color: rgba(255, 255, 255, 0.6);
}

/* Dashboard-specific styles */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    padding-top: 100px;
}

/* Dashboard Header - Center Alignment Fix */
.dashboard-header {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    flex-direction: column; /* Stack vertically instead of horizontally */
    align-items: center; /* Center align all content */
    text-align: center; /* Center align text */
    gap: 1.5rem;
    max-width: 600px; /* Limit width for better centering */
    margin: 0 auto; /* Center the entire container */
}

.user-details {
    width: 100%;
    text-align: center;
}

.user-details h2 {
    color: #00f2fe;
    margin-bottom: 0.5rem;
    font-size: 2rem; /* Make title larger */
}

.user-id {
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.balance-display {
    text-align: center;
    width: 100%;
}

.balance-amount {
    font-size: 2.5rem; /* Make balance larger */
    font-weight: 700;
    color: #00f2fe;
    margin-bottom: 0.5rem;
}

.balance-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* Button container styling */
.balance-display > div {
   display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    width: 100%;
    max-width: 600px; /* Control maximum width */
    margin-left: auto;
    margin-right: auto;
}
@media (min-width: 769px) {
    .balance-display .invest-btn {
        flex: 1; /* Make buttons stretch to fill available space */
        min-width: 180px;
        max-width: none; /* Remove max-width restriction */
        padding: 1rem 2rem;
        font-size: 1rem;
        font-weight: 600;
        white-space: nowrap;
    }
    /* Ensure both buttons are equal width */
    .balance-display > div {
        display: flex;
        gap: 1.5rem; /* Slightly larger gap for desktop */
        width: 100%;
        max-width: 700px; /* Increase max width for better button stretching */
    }
}

.balance-display .invest-btn {
    flex: 0 0 auto; /* Don't stretch buttons */
    min-width: 140px;
    max-width: 180px;
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
}

/* Enhanced Achievement Badge Styles */
.achievement-badge {
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: default;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Add shine effect overlay */
.achievement-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Space Explorer (Default) */
.achievement-badge:not(.silver):not(.gold):not(.platinum):not(.diamond) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    border-color: rgba(102, 126, 234, 0.3);
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.achievement-badge:not(.silver):not(.gold):not(.platinum):not(.diamond):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Silver Explorer */
.achievement-badge.silver {
    background: linear-gradient(135deg, #C0C0C0 0%, #E8E8E8 30%, #B8B8B8 70%, #D3D3D3 100%);
    border-color: rgba(192, 192, 192, 0.5);
    color: #2c2c2c;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(192, 192, 192, 0.3);
}

.achievement-badge.silver:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(192, 192, 192, 0.5);
}

/* Gold Pioneer */
.achievement-badge.gold {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 30%, #FF8C00 70%, #FFD700 100%);
    border-color: rgba(255, 215, 0, 0.5);
    color: #2c2c2c;
    text-shadow: 0 1px 2px rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.achievement-badge.gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6);
}

/* Platinum Navigator */
.achievement-badge.platinum {
    background: linear-gradient(135deg, #E5E4E2 0%, #C0C0C0 30%, #A8A8A8 70%, #E5E4E2 100%);
    border-color: rgba(229, 228, 226, 0.5);
    color: #1a1a1a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(192, 192, 192, 0.4);
}

.achievement-badge.platinum:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(229, 228, 226, 0.6);
}

/* Diamond Commander */
.achievement-badge.diamond {
    background: linear-gradient(135deg, #B9F2FF 0%, #89CFF0 30%, #00BFFF 70%, #B9F2FF 100%);
    border: 2px solid #00BFFF;
    color: #003d5c;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 4px 15px rgba(0, 191, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
}

.achievement-badge.diamond::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 23px;
    pointer-events: none;
}

.achievement-badge.diamond:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 10px 30px rgba(0, 191, 255, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Add sparkle animation for diamond */
.achievement-badge.diamond {
    animation: diamondSparkle 2s ease-in-out infinite;
}

@keyframes diamondSparkle {
    0%, 100% { filter: brightness(1) saturate(1); }
    50% { filter: brightness(1.1) saturate(1.2); }
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 0.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tab-navigation::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    flex: 1;
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 120px;
}

.tab-btn.active {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cards */
.card, .info-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 242, 254, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #00f2fe;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* FIXED: Team Statistics and Rewards Breakdown - Single Column Layout */
#dashboard .card:nth-child(3) > div,  /* Team Statistics */
#dashboard .card:nth-child(4) > div   /* Income Breakdown/Rewards */
{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
}

/* Alternative selector for more specific targeting */
.card:has(.card-title:contains("Team Statistics")) > div:last-child,
.card:has(.card-title:contains("Rewards Breakdown")) > div:last-child {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
}

/* Ensure the Investment Overview keeps its grid layout */
#dashboard .card:nth-child(2) > div {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 1rem !important;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(45deg, #00f2fe, #4facfe);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-align: center;
}

/* Investment Card - Enhanced Design */
.investment-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(0, 242, 254, 0.05) 100%);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 242, 254, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.investment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00f2fe, #4facfe, #00ff7f);
    border-radius: 20px 20px 0 0;
}

.investment-card h4 {
    color: #00f2fe;
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

.investment-card .days-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.investment-card .days-item {
    text-align: center;
    flex: 1;
}

.investment-card .days-number {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
}

.investment-card .days-completed .days-number {
    color: #00ff7f;
}

.investment-card .days-remaining .days-number {
    color: #ffc107;
}

.investment-card .days-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced Form Styles */
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #ffffff !important;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #00f2fe;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.2);
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Fix Select Dropdown Options */
.form-select {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23ffffff' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 0.8rem;
    padding-right: 3rem;
}

.form-select option {
    background: #1a1a2e !important;
    color: #ffffff !important;
    border: none;
    padding: 0.5rem;
    font-size: 1rem;
}

.form-select option:hover {
    background: #2d2d5a !important;
    color: #00f2fe !important;
}

.form-select option:checked {
    background: #00f2fe !important;
    color: #1a1a2e !important;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #00f2fe;
    font-weight: 600;
}

/* Package Buttons */
.package-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.package-btn {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.package-btn:hover {
    background: rgba(0, 242, 254, 0.2);
    border-color: #00f2fe;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 242, 254, 0.3);
}

.package-btn.selected {
    background: linear-gradient(45deg, #00f2fe, #4facfe);
    border-color: #00f2fe;
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.4);
}

.package-btn.selected:hover {
    transform: scale(1.05) translateY(-2px);
}

/* Custom Amount Builder */
.custom-amount-builder {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-amount-display {
    position: relative;
    margin-bottom: 1rem;
}

.custom-amount-display input {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    color: #00f2fe !important;
}

.currency-label {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.custom-amount-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.custom-btn {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: 600;
}

.custom-btn:hover {
    background: rgba(0, 242, 254, 0.2);
    border-color: #00f2fe;
}

.custom-btn.reset-btn {
    background: rgba(255, 99, 71, 0.2);
    border-color: rgba(255, 99, 71, 0.3);
}

.custom-btn.reset-btn:hover {
    background: rgba(255, 99, 71, 0.3);
    border-color: #ff6347;
}

/* Investment Summary */
.investment-summary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1rem;
    backdrop-filter: blur(10px);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.summary-row:last-child {
    margin-bottom: 0;
    font-weight: 600;
    color: #00f2fe;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.75rem;
    font-size: 1rem;
}

.summary-row span:last-child {
    font-weight: 600;
    color: #ffffff;
}

.summary-row:last-child span:last-child {
    color: #00f2fe;
}

.invest-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.invest-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th {
    background: rgba(255, 255, 255, 0.05);
    color: #00f2fe;
    font-weight: 600;
    font-size: 0.9rem;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Status badges - Fixed to include completed status */
.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-active {
    background: rgba(0, 255, 127, 0.2);
    color: #00ff7f;
    border: 1px solid #00ff7f;
}

.status-inactive {
    background: rgba(255, 99, 71, 0.2);
    color: #ff6347;
    border: 1px solid #ff6347;
}

.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid #ffc107;
}

/* FIXED: Added completed status */
.status-completed {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #00f2fe;
    animation: spin 1s ease-in-out infinite;
}

/* Notifications */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 10px;
    color: white;
    backdrop-filter: blur(10px);
    border-left: 4px solid #00f2fe;
    z-index: 1001;
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.notification.success {
    border-left-color: #00ff7f;
}

.notification.error {
    border-left-color: #ff6347;
}

.notification.warning {
    border-left-color: #ffc107;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: rgba(26, 26, 46, 0.95);
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
}

.modal-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Referral link container - FIXED for desktop overlap issue */
.referral-link-container {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.referral-link-input {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #00f2fe !important;
    background: rgba(0, 242, 254, 0.05) !important;
    border: 1px solid rgba(0, 242, 254, 0.2) !important;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    min-width: 200px; /* Ensure minimum width */
    max-width: calc(100% - 120px); /* Leave space for copy button */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    word-break: break-all;
    height: 2.8rem;
    line-height: 1.2;
}

.referral-link-input:focus {
    border-color: #00f2fe !important;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3) !important;
    text-overflow: initial;
    white-space: normal;
    word-wrap: break-word;
    height: auto;
    min-height: 2.8rem;
    max-height: 5rem;
    overflow-y: auto;
    z-index: 10;
    position: relative;
}

.referral-link-input:hover {
    cursor: pointer;
    border-color: rgba(0, 242, 254, 0.4) !important;
}

.copy-btn {
    min-width: 100px;
    max-width: 100px;
    padding: 0.75rem 1rem;
    white-space: nowrap;
    background: linear-gradient(45deg, #00f2fe, #4facfe) !important;
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    height: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 242, 254, 0.4);
}

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
}

.mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
    min-height: 60px;
}

.mobile-nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
}

.mobile-nav-btn.active {
    color: #00f2fe;
    background: rgba(0, 242, 254, 0.1);
    transform: scale(1.05);
}

.mobile-nav-btn .nav-icon {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
    display: block;
}

.mobile-nav-btn .nav-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-nav-btn.active .nav-icon {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.6));
}

/* Achievement styles */
.glp-achievement-summary {
    background: linear-gradient(45deg, rgba(0, 242, 254, 0.1), rgba(79, 172, 254, 0.1));
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 242, 254, 0.2);
    backdrop-filter: blur(10px);
}

.glp-summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.glp-summary-stat {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
}

.glp-stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #00f2fe;
    margin-bottom: 0.5rem;
}

.glp-stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.glp-achievement-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.glp-achievement-card.glp-achieved {
    border-color: #00ff7f;
    box-shadow: 0 10px 30px rgba(0, 255, 127, 0.2);
}

.glp-achievement-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.glp-achievement-main-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.glp-achievement-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.glp-achievement-info h4 {
    color: #00f2fe;
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.glp-achievement-reward {
    color: #ffc107;
    font-size: 0.9rem;
    font-weight: 600;
}

.glp-achievement-requirements {
    margin-bottom: 1rem;
}

.glp-requirement {
    margin-bottom: 1rem;
}

.glp-requirement:last-child {
    margin-bottom: 0;
}

.glp-requirement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.glp-progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.glp-progress-bar {
    height: 100%;
    background: linear-gradient(45deg, #00f2fe, #4facfe);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.glp-achievement-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
}

.glp-overall-progress {
    color: #00f2fe;
    font-weight: 600;
}

@media (min-width: 769px) {
    /* Allow Team Statistics and Rewards Breakdown to use grid layout on desktop */
    #dashboard .card:nth-child(3) > div,  /* Team Statistics */
    #dashboard .card:nth-child(4) > div   /* Income Breakdown/Rewards */
    {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
        gap: 1rem !important;
    }
    
    /* Alternative selector for more specific targeting */
    .card:has(.card-title:contains("Team Statistics")) > div:last-child,
    .card:has(.card-title:contains("Rewards Breakdown")) > div:last-child {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
        gap: 1rem !important;
    }
}

/* MOBILE RESPONSIVE FIXES */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }
    
    /* Hide desktop tab navigation on mobile */
    .tab-navigation {
        display: none;
    }
    
    /* Add bottom padding to main content to account for mobile nav */
    .main {
        padding-bottom: 80px;
    }
    
    /* Adjust dashboard container for mobile nav */
    .dashboard-container {
        padding-bottom: 80px;
    }
    
    /* FIXED: Mobile header layout - FORCE single line */
    .header {
        padding: 0.5rem 0 !important;
        height: 60px !important;
    }
    
    .navbar {
        padding: 0 1rem !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 0.75rem !important;
        min-height: 50px !important;
        height: 100% !important;
    }
    
    .nav-brand {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
    
    .nav-brand .logo {
        gap: 0.5rem !important;
        flex-wrap: nowrap !important;
    }
    
    .brand-text {
        font-size: 1rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .nav-actions {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        margin: 0 !important;
        width: auto !important;
    }
    
    .connect-wallet-btn {
        padding: 0.4rem 0.75rem !important;
        font-size: 0.7rem !important;
        white-space: nowrap !important;
        min-width: 90px !important;
        max-width: 110px !important;
        height: 32px !important;
    }
    
    /* FIXED: Team Statistics and Rewards must stay single column on mobile */
    #dashboard .card:nth-child(3) > div,  /* Team Statistics */
    #dashboard .card:nth-child(4) > div   /* Income Breakdown/Rewards */
    {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* FIXED: Hide type column on mobile for activities */
    .data-table .activity-type-col {
        display: none;
    }
    
    .data-table th:nth-child(2),
    .data-table td:nth-child(2) {
        display: none;
    }
    
    /* FIXED: Investment card mobile design */
    .investment-card {
        padding: 1.2rem;
    }
    
    .investment-card h4 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .investment-card .days-container {
        flex-direction: row;
        gap: 1rem;
        padding: 0.75rem;
        margin: 0.75rem 0;
    }
    
    .investment-card .days-item {
        flex: 1;
        text-align: center;
    }
    
    .investment-card .days-number {
        font-size: 1.3rem;
        margin-bottom: 0.2rem;
    }
    
    .investment-card .days-label {
        font-size: 0.75rem;
    }
    
    /* FIXED: Mobile referral link layout */
    .referral-link-container {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .referral-link-input {
        max-width: 100%;
        min-width: auto;
        font-size: 0.75rem;
        padding: 0.6rem 0.8rem;
        height: auto;
        min-height: 2.5rem;
        word-break: break-all;
        white-space: normal;
    }
    
    .copy-btn {
        width: 100%;
        min-width: auto;
        max-width: 100%;
        height: 2.5rem;
    }
    
    /* Mobile Achievement Responsive Adjustments */
    .achievement-badge {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
        margin-top: 0.5rem;
    }
    
    .achievement-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .achievement-status {
        text-align: center;
    }
    
    .next-tier-info {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .stat-card {
        flex: 1;
        min-width: 120px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-container {
        padding: 1rem;
        padding-top: 80px;
    }
    
    .tab-navigation {
        padding: 0.25rem;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
        min-width: 100px;
    }
    
    .user-info {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .balance-display {
        text-align: center;
        width: 100%;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-visual {
        height: 300px;
    }
    
    /* Mobile data table adjustments */
    .data-table {
        font-size: 0.75rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.4rem 0.3rem;
        font-size: 0.75rem;
    }
    
    .package-buttons {
        grid-template-columns: 1fr 1fr;
    }
    
    .custom-amount-buttons {
        grid-template-columns: 1fr 1fr;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .balance-amount {
        font-size: 1.5rem;
    }
    
    .user-details h2 {
        font-size: 1.5rem;
    }
    
    /* Mobile responsive status badges */
    .status-badge {
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
        border-radius: 15px;
    }
}

@media (max-width: 480px) {
    .dashboard-container {
        padding: 0.5rem;
        padding-top: 75px;
    }
    
    .card {
        padding: 1rem;
    }
    
    .tab-btn {
        padding: 0.5rem;
        font-size: 0.75rem;
        min-width: 80px;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .tab-btn span:first-child {
        font-size: 1rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.25rem;
        font-size: 0.75rem;
    }
    
    .package-buttons {
        grid-template-columns: 1fr;
    }
    
    .custom-amount-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 0.25rem;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .form-select {
        padding-right: 2.5rem;
        background-size: 0.7rem;
    }
    
    /* Achievement responsive adjustments for small screens */
    .achievement-badge {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        letter-spacing: 0.3px;
    }
    
    /* EXTRA SMALL SCREEN HEADER FIX */
    .connect-wallet-btn {
        padding: 0.3rem 0.5rem !important;
        font-size: 0.65rem !important;
        min-width: 80px !important;
        max-width: 90px !important;
        height: 28px !important;
    }
    
    .brand-text {
        font-size: 0.9rem !important;
    }
    
    .logo-image {
        width: 25px !important;
        height: 25px !important;
    }
    
    .status-badge {
        padding: 0.15rem 0.4rem;
        font-size: 0.65rem;
        border-radius: 12px;
    }
    
    /* Even smaller on very small screens */
    .data-table .activity-type-col {
        width: 70px;
        max-width: 70px;
    }
}

/* Trust Wallet Specific Fixes */
@media screen and (max-device-width: 480px) {
    /* Ensure proper viewport on mobile browsers including Trust Wallet */
    .modal-content {
        max-height: 85vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .form-select {
        /* Fix for Trust Wallet dropdown issues */
        background: rgba(26, 26, 46, 0.9) !important;
        -webkit-appearance: menulist;
        -moz-appearance: menulist;
        appearance: menulist;
    }
    
    .form-input, .form-select {
        /* Prevent zoom on focus in Trust Wallet */
        font-size: 16px !important;
    }
    
    /* Fix for Trust Wallet scroll issues */
    .tab-content {
        -webkit-overflow-scrolling: touch;
    }
    
    .dashboard-container {
        -webkit-overflow-scrolling: touch;
    }
}

/* Dark theme compatibility for Trust Wallet */
@media (prefers-color-scheme: dark) {
    .form-select option {
        background: #0a0a0a !important;
        color: #ffffff !important;
    }
    
    .form-select {
        background: rgba(26, 26, 46, 0.9) !important;
    }
}

/* Additional Mobile Wallet Fixes */
.connect-wallet-btn, .invest-btn, .launch-btn {
    /* Ensure buttons work properly on mobile wallets */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Fix for mobile wallet modal issues */
.modal {
    /* Ensure modal works properly on mobile */
    position: fixed !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ========================================
   IPHONE SPECIFIC FIXES
   ======================================== */

/* Fix for iPhone background rendering issues */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific */
    body {
        background: #0a0a0a !important;
        background-image: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%) !important;
        background-attachment: scroll !important;
        -webkit-background-size: 100% 100% !important;
        background-size: 100% 100% !important;
        min-height: 100vh !important;
        height: auto !important;
    }
    
    /* Force background for all container elements */
    html {
        background: #0a0a0a !important;
        min-height: 100vh;
    }
    
    /* Ensure proper background on main containers */
    .dashboard-container,
    .hero-section,
    main,
    .container {
        background: transparent !important;
    }
}

/* iPhone specific viewport and background fixes */
@media only screen 
  and (min-device-width: 375px) 
  and (max-device-width: 932px) 
  and (-webkit-min-device-pixel-ratio: 2) {
    
    /* Force background color on html and body */
    html {
        background: #0a0a0a !important;
        min-height: 100%;
    }
    
    body {
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%) !important;
        background-attachment: scroll !important;
        -webkit-background-size: cover !important;
        background-size: cover !important;
        min-height: 100vh !important;
        position: relative !important;
    }
    
    /* Fix for Safari rubber banding effect */
    body::before {
        content: '';
        position: fixed;
        top: -100%;
        left: 0;
        width: 100%;
        height: 200%;
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
        z-index: -10;
    }
    
    /* Ensure stars and nebula are visible on iPhone */
    .stars {
        z-index: -2 !important;
        opacity: 1 !important;
    }
    
    .nebula {
        z-index: -1 !important;
        opacity: 1 !important;
    }
}

/* Fix for iPhone Safari's address bar height issues */
@media screen and (max-width: 932px) and (-webkit-min-device-pixel-ratio: 2) {
    body {
        min-height: -webkit-fill-available;
    }
    
    html {
        height: -webkit-fill-available;
    }
}

/* Dark mode fix for iPhone */
@media (prefers-color-scheme: dark) and (-webkit-min-device-pixel-ratio: 2) {
    body {
        background-color: #0a0a0a !important;
    }
    
    html {
        background-color: #0a0a0a !important;
    }
}

/* Additional iPhone white background fix */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    z-index: -100;
    pointer-events: none;
}