@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-gradient: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    --bg-color: #F3F4F6;
    --subpage-bg: #f8fafc;
    --text-dark: #111827;
    --text-gray: #6B7280;
    --white: #FFFFFF;
    --danger: #EF4444;
    --success-bg: #E8FBF5;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-main: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: #F1F5F9;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background-color: var(--bg-color);
    min-height: 100vh;
    position: relative;
}

@media (min-width: 1024px) {
    .app-container {
        max-width: 1200px;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
    }
}

/* Compact Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.relative {
    position: relative;
}

.w-full {
    width: 100%;
}

.text-xs {
    font-size: 10px;
}

.text-sm {
    font-size: 13px;
}

.text-center {
    text-align: center;
}

.font-bold {
    font-weight: 700;
}

.text-gray {
    color: var(--text-gray);
}

.text-primary {
    color: var(--primary);
}

.text-green {
    color: #10b981;
}

/* Compact Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background-color: var(--bg-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.white-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
}

.green-card {
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    padding: 24px;
    color: white;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.2);
}

.avatar-header {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 16px;
}

.header-icon {
    color: #64748b;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.header-icon:hover {
    color: var(--primary);
}

.header-icon-wrapper {
    cursor: pointer;
}

.notification-dot {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 6px;
    height: 6px;
    background: #EF4444;
    border-radius: 50%;
    border: 1px solid var(--bg-color);
}

.header-help-btn {
    cursor: pointer;
}

.help-badge {
    font-size: 7px;
    font-weight: 800;
    color: #EF4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 1px 4px;
    border-radius: 4px;
    margin-bottom: 1px;
}

/* Compact Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 12px 0;
}

@media (min-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(6, 1fr);
    }
}

.service-icon-circle {
    width: 44px;
    height: 44px;
    background-color: var(--success-bg);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: #FF6B6B;
    color: white;
    font-size: 8px;
    padding: 1px 6px;
    border-radius: 6px;
    font-weight: bold;
    z-index: 5;
}

/* Compact Bottom Nav */
.bottom-nav-container {
    position: fixed;
    bottom: 20px;
    width: 92%;
    max-width: 480px;
    height: 68px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 24px;
    z-index: 1000;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    padding: 0 8px;
}

@media (min-width: 1024px) {
    .bottom-nav-container {
        max-width: 550px;
    }
}

.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    height: 100%;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    text-decoration: none;
    transition: all 0.25s ease;
    flex: 1;
    height: 100%;
    position: relative;
    padding: 4px 0;
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon-circle {
    width: 40px;
    height: 40px;
    background: #F8FAFC;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0px;
    /* Removed margin to tighten space */
    transition: all 0.25s ease;
    border: 1px solid #F1F5F9;
}

@media (max-width: 360px) {
    .nav-icon-circle {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .nav-item i {
        font-size: 18px !important;
    }

    .nav-item span {
        font-size: 9px !important;
    }
}

.nav-item.active .nav-icon-circle {
    background: var(--success-bg);
    border-color: rgba(16, 185, 129, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.nav-item i {
    font-size: 20px;
    transition: all 0.25s ease;
}

.nav-item span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1px;
    line-height: 1;
    /* Tightened line height */
    margin-top: 1px;
}

/* Sub-pages */
.subpage-container {
    padding: 30px 24px 120px;
    background: var(--subpage-bg);
    min-height: 100vh;
}

.subpage-header h1 {
    font-size: 22px;
    font-weight: 800;
}

.back-btn {
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.dot.active {
    background-color: #000;
}

/* Subpage Layout Helpers */
.subpage-section-title {
    font-size: 14px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 8px;
    margin-bottom: 12px;
}

.premium-list-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.premium-list-card:active {
    background: #f8fafc;
    transform: scale(0.98);
}

.card-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.card-content-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-title-text {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1px;
}

.card-sub-text {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

.premium-pill-badge {
    font-size: 9px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

/* Auth Screens - keep them compact even on desktop */
.auth-wrapper {
    max-width: 450px !important;
    margin: 0 auto;
}

/* Google Translate Customization */
#google_translate_element {
    height: 36px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.goog-te-gadget-simple {
    background-color: #f1f5f9 !important;
    border: none !important;
    padding: 6px 10px !important;
    border-radius: 10px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
}

.goog-te-gadget-simple img {
    display: none !important;
}

.goog-te-gadget-simple span {
    font-size: 10px !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    text-transform: uppercase !important;
}

.goog-te-gadget-icon {
    margin-right: 0 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='18' viewBox='0 0 24 24' width='18' fill='%2364748b'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.91-4.33-3.56zm2.95-8H5.08c.96-1.65 2.49-2.93 4.33-3.56-.6 1.11-1.06 2.31-1.38 3.56zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.34.16-2h4.68c.09.66.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.28 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    width: 18px !important;
    height: 18px !important;
}

/* Hide Google Branding */
.goog-logo-link,
.goog-te-gadget span {
    display: none !important;
}

.goog-te-gadget {
    color: transparent !important;
    font-size: 0 !important;
}

body {
    top: 0 !important;
}

.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame {
    display: none !important;
}

#goog-gt-tt,
.goog-te-balloon-frame {
    display: none !important;
}

.goog-text-highlight {
    background: none !important;
    box-shadow: none !important;
}