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

:root {
    --primary-green: #00FF77;
    --primary-green-dark: #1DA152;
    --primary-green-light: #E6FFFA;
    --white: #FFFFFF;
    --bg-light: #F7FAF9;
    --dark-text: #1A2D23;
    --gray-text: #718096;
    --accent-yellow: #FFB300;
    --accent-blue: #4299E1;
    --accent-orange: #ED8936;
    --accent-red: #F56565;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --border-radius: 24px;
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-light);
    color: var(--dark-text);
    overflow-x: hidden;
    margin: 0;
}

/* Responsive Container */
#app {
    width: 100%;
    min-height: 100vh;
    background: var(--bg-light);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Scrollable Content */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    padding-bottom: 110px;
}

.content-area::-webkit-scrollbar {
    display: none;
}

.screen {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.screen.active {
    display: block;
}

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

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

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

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

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-green-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-green-dark);
}

.logo-text h2 {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-text);
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 700;
}

.profile-btn {
    width: 44px;
    height: 44px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: var(--transition);
}

.profile-btn:active {
    transform: scale(0.9);
}

.points-chip {
    background: var(--white);
    padding: 8px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    box-shadow: var(--card-shadow);
}

/* Hero Section */
.hero-card {
    height: 380px;
    border-radius: 35px;
    background-size: cover;
    background-position: center;
    margin-bottom: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    color: var(--white);
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 60%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.center-icon-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--accent-yellow);
    border: 4px solid var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    z-index: 3;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 22px;
    background: linear-gradient(135deg, #00ff77 0%, #00e06a 100%);
    border: none;
    border-radius: 40px;
    color: var(--dark-text);
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 255, 119, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    animation: btn-pulse 2s infinite;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 255, 119, 0.5);
}

.btn-primary:active {
    transform: scale(0.95);
    box-shadow: 0 5px 15px rgba(0, 255, 119, 0.2);
}

@keyframes btn-pulse {
    0% {
        box-shadow: 0 10px 30px rgba(0, 255, 119, 0.4);
    }

    50% {
        box-shadow: 0 10px 45px rgba(0, 255, 119, 0.7);
    }

    100% {
        box-shadow: 0 10px 30px rgba(0, 255, 119, 0.4);
    }
}



/* Grid Menu */
.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.grid-item {
    background: var(--white);
    border: 1px solid var(--primary-green-light);
    padding: 20px 10px;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    cursor: pointer;
}

.grid-item:hover {
    transform: translateY(-5px);
    background: var(--primary-green-light);
}

.grid-item i {
    font-size: 24px;
    color: var(--primary-green-dark);
}

.grid-item span {
    font-size: 12px;
    font-weight: 700;
}

/* Discovery Card */
.discovery-card {
    background: #fff5e6;
    border: 2px dashed var(--accent-yellow);
    border-radius: 30px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-circle {
    width: 60px;
    height: 60px;
    background: var(--accent-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

/* Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px 15px 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 100;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #CBD5E0;
    cursor: pointer;
    transition: var(--transition);
}

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

.nav-item span {
    font-size: 10px;
    font-weight: 700;
}

/* Better Missions */
.mission-summary {
    display: flex;
    gap: 15px;
    margin-bottom: 24px;
}

.summary-card {
    flex: 1;
    background: var(--white);
    padding: 15px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-card .val {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-green-dark);
}

.summary-card .label {
    font-size: 10px;
    font-weight: 700;
    color: var(--gray-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mission-card {
    background: var(--white);
    border-radius: 35px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

.mission-card:active {
    transform: scale(0.97);
}

.mission-thumb {
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.mission-thumb::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(0deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
}

.reward-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-yellow);
    color: var(--dark-text);
    padding: 6px 12px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 11px;
    box-shadow: 0 5px 15px rgba(255, 179, 0, 0.3);
    z-index: 5;
}

.online-dot {
    width: 10px;
    height: 10px;
    background: #00ff77;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 255, 119, 0.8);
}

.online-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    animation: pulse-ring 1.5s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

.category-chip {
    display: inline-flex;
    padding: 4px 10px;
    background: var(--primary-green-light);
    color: var(--primary-green-dark);
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.mission-info {
    padding: 0 24px 24px 24px;
    margin-top: -10px;
    position: relative;
    z-index: 2;
}

.mission-header h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 4px;
}

.mission-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed rgba(0, 0, 0, 0.05);
}

.btn-small {
    padding: 10px 22px;
    background: linear-gradient(135deg, #00ff77 0%, #00e06a 100%);
    border: none;
    border-radius: 12px;
    color: var(--dark-text);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 255, 119, 0.2);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-small:active {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(0, 255, 119, 0.15);
}

/* Badge Grid */
.badge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.badge-item {
    background: var(--white);
    padding: 20px 10px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--card-shadow);
    opacity: 0.4;
    filter: grayscale(1);
    transition: var(--transition);
}

.badge-item.unlocked {
    opacity: 1;
    filter: grayscale(0);
}

.badge-item .badge-icon {
    width: 54px;
    height: 54px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 22px;
    color: var(--gray-text);
}

.badge-item.unlocked .badge-icon {
    background: var(--primary-green-light);
    color: var(--primary-green-dark);
}

.badge-item span {
    font-size: 10px;
    font-weight: 800;
}

/* Route Cards */
.route-card {
    background: var(--white);
    border-radius: 24px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    box-shadow: var(--card-shadow);
}

.route-img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
}

.route-meta {
    font-size: 11px;
    color: var(--gray-text);
    display: flex;
    gap: 12px;
}

/* Enhanced Logbook Timeline */
.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: var(--primary-green-light);
}

.log-entry {
    background: var(--white);
    padding: 16px;
    border-radius: 20px;
    margin-bottom: 16px;
    box-shadow: var(--card-shadow);
    display: flex;
    gap: 15px;
    position: relative;
    align-items: center;
}

.log-entry::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: var(--primary-green);
    border-radius: 50%;
    border: 2px solid var(--white);
}

.log-type-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.type-mission {
    background: #E6FFFA;
    color: #38B2AC;
}

.type-badge {
    background: #FEFCBF;
    color: #D69E2E;
}

.type-info {
    background: #EBF8FF;
    color: #4299E1;
}

.log-content h4 {
    font-size: 14px;
}

/* Enhanced Profile Page */
.profile-header-card {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    border-radius: 35px;
    padding: 40px 20px 30px 20px;
    color: var(--dark-text);
    margin-bottom: 24px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 255, 119, 0.2);
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    background: var(--white);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.level-badge {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-yellow);
    color: var(--dark-text);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 900;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 10;
    letter-spacing: 0.5px;
}

.profile-stat-strip {
    display: flex;
    background: var(--white);
    border-radius: 20px;
    padding: 15px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
    justify-content: space-around;
}

.stat-num {
    display: block;
    font-size: 18px;
    font-weight: 800;
}

.stat-label {
    font-size: 10px;
    color: var(--gray-text);
    text-transform: uppercase;
    font-weight: 700;
}

.section-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

.back-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.tabs-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 18px;
    background: var(--white);
    border: 1px solid var(--primary-green-light);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.tab.active {
    background: var(--primary-green);
    border-color: var(--primary-green);
}

/* Camera Simulation */
.camera-container {
    height: 400px;
    background: #000;
    border-radius: 40px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.camera-feed {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: background-image 0.5s ease;
}

.scanner-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border-radius: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.scan-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 4px solid var(--primary-green);
}

.tl {
    top: -2px;
    left: -2px;
    border-right: 0;
    border-bottom: 0;
    border-radius: 14px 0 0 0;
}

.tr {
    top: -2px;
    right: -2px;
    border-left: 0;
    border-bottom: 0;
    border-radius: 0 14px 0 0;
}

.bl {
    bottom: -2px;
    left: -2px;
    border-right: 0;
    border-top: 0;
    border-radius: 0 0 0 14px;
}

.br {
    bottom: -2px;
    right: -2px;
    border-left: 0;
    border-top: 0;
    border-radius: 0 0 14px 0;
}

.live-ai-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
}

.camera-controls {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.shutter-btn {
    width: 80px;
    height: 80px;
    background: var(--primary-green);
    border: 6px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 0 20px rgba(0, 255, 119, 0.4);
    cursor: pointer;
}

.success-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0;
}

.medal-badge {
    width: 140px;
    height: 140px;
    background: var(--accent-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

/* Auth Screens Styles */
.auth-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 30px;
    justify-content: center;
    background: var(--bg-light);
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-header i {
    font-size: 50px;
    color: var(--primary-green);
    margin-bottom: 15px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-text);
    padding-left: 10px;
}

.input-group input {
    padding: 18px 24px;
    border-radius: 20px;
    border: 2px solid var(--white);
    background: var(--white);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    box-shadow: var(--card-shadow);
}

.input-group input:focus {
    border-color: var(--primary-green);
}

.auth-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 13px;
    color: var(--gray-text);
}

.auth-link {
    color: var(--primary-green-dark);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
}

.social-login {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-outline-social {
    width: 100%;
    padding: 15px;
    background: var(--white);
    border: 1px solid #EDF2F7;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--card-shadow);
}