@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #114232;
    --primary-light: #1a5c48;
    --accent: #84cc16; /* Lime 500 */
    --background: #ffffff;
    --card-bg: #f8f9fa;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #f1f5f9;
    --radius-xl: 1.5rem;
    --radius-2xl: 2.5rem;
    --shadow-soft: 0 10px 30px -5px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 20px 40px -5px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #ffffff; /* Outer background for desktop */
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.3s ease;
}

/* App Container for Desktop Consistency */
.app-container {
    max-width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    background-color: var(--background);
    position: relative;
    box-shadow: 0 0 100px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    overflow-x: hidden;
}

/* Media Queries for Desktop (Qareeb Style) */
@media (min-width: 768px) {
    .app-container {
        max-width: 768px !important;
    }
}

@media (min-width: 1024px) {
    .app-container {
        max-width: 960px !important;
    }
}

@media (min-width: 1280px) {
    .app-container {
        max-width: 1120px !important;
    }
}


/* Hide Scrollbar Utility */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Glassmorphism Utility */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}


/* Premium Card (Enhanced with Qareeb Aesthetics) */
.premium-card {
    background: var(--card-bg);
    border-radius: var(--radius-2xl);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

/* Ornamental Decor for specific cards */
.ornamental-card {
    background: linear-gradient(135deg, #ffffff 0%, #fdfdfd 100%);
    border: 1px solid #D4A57455;
    position: relative;
    overflow: hidden;
}


.ornamental-card::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-top: 2px solid #D4A574;
    border-right: 2px solid #D4A574;
    border-radius: 0 4px 0 0;
    opacity: 0.3;
}

.ornamental-card::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 20px;
    height: 20px;
    border-top: 2px solid #D4A574;
    border-left: 2px solid #D4A574;
    border-radius: 4px 0 0 0;
    opacity: 0.3;
}

.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* No Scrollbar Utility */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Animations (Qareeb Reference) */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fade-in 0.4s ease-out forwards;
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-up {
    animation: slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slide-down {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-down {
    animation: slide-down 0.4s ease-out forwards;
}

/* Score Ring */
.score-ring-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    margin: 0 auto;
}
.score-ring-container .absolute {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.score-ring-circle {
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* PB Marker on Heatmap */
.pb-marker {
    background: none !important;
    border: none !important;
}
.pb-info {
    background: rgba(17, 66, 50, 0.92);
    color: #fff;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.5;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.15);
    min-width: max-content;
    text-align: center;
    margin-bottom: 4px;
    pointer-events: auto;
}



/* Desktop Grid Adjustments */
@media (min-width: 768px) {
    .stats-grid-desktop {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 16px !important;
    }
    
    .forecast-grid-desktop {
        display: grid !important;
        grid-template-columns: repeat(6, 1fr) !important;
        gap: 12px !important;
    }
}
/* Prose/Typography for Markdown Content */
.prose {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--primary);
}

.prose h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.prose h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose p {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}

.prose ul, .prose ol {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    padding-left: 1.625rem;
}

.prose li {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose strong {
    font-weight: 700;
    color: var(--primary);
}

.prose hr {
    margin-top: 3rem;
    margin-bottom: 3rem;
    border: 0;
    border-top: 1px solid var(--border-color);
}

.prose blockquote {
    font-style: italic;
    border-left: 4px solid var(--accent);
    padding: 1.5rem;
    margin: 2rem 0;
    color: var(--primary);
    background: #f8f9fa;
    border-radius: 0 1.5rem 1.5rem 0;
}

.prose img {
    border-radius: 2rem;
    box-shadow: 0 20px 50px -10px rgba(0,0,0,0.1);
    margin: 3rem auto;
    display: block;
}

.prose pre {
    background: #114232;
    color: white;
    padding: 1.5rem;
    border-radius: 1.5rem;
    overflow-x: auto;
    font-size: 0.875rem;
    margin: 2rem 0;
}

.prose code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 0.4rem;
    font-size: 0.9em;
}

.prose a {
    color: var(--accent);
    text-decoration: underline;
    font-weight: 700;
}

.prose b {
    font-weight: 800;
}

.prose em {
    font-style: italic;
}
