:root { 
    --primary-color: #0D9488; 
    --primary-light: #ccfbf1; 
    --degree-1st-color: #FBBF24; 
    --degree-2nd-color: #F87171; 
    --degree-3rd-color: #374151; 
}

body { 
    font-family: 'Poppins', sans-serif; 
    background: #F8FAFC;
    color: #334155;
    -webkit-tap-highlight-color: transparent;
}

html[lang="ar"] body { 
    font-family: 'Cairo', sans-serif; 
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }
.app-view { display: none; }
.app-view.active { display: block; animation: fadeIn 0.4s ease-out; }

/* Safe Area for Mobile Nav */
.safe-area-pb {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Glass & Card Styles */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

/* Tab Styles */
.tab { 
    transition: all 0.3s ease; 
    border-radius: 999px; 
    border: none;
    color: #64748b;
    font-weight: 600;
}
.tab:hover { color: var(--primary-color); background: rgba(255,255,255,0.5); }
.tab.active { 
    background-color: var(--primary-color); 
    color: white; 
    box-shadow: 0 4px 6px -1px rgba(13, 148, 136, 0.3);
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease-out; }

/* Form Elements */
.input-group label { margin-bottom: 0.5rem; color: #475569; font-weight: 600; font-size: 0.9rem; display: block;}
.input-group input, .input-group select, .input-group textarea { 
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.75rem;
    width: 100%;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}
.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
    outline: none;
    background-color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* Color Palette for Burn Calc */
.color-box { 
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    border: 3px solid white; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.color-box:hover { transform: scale(1.1); }
.color-box.selected { 
    transform: scale(1.2); 
    box-shadow: 0 0 0 4px var(--primary-color), 0 10px 15px -3px rgba(0,0,0,0.1); 
    border-color: white; 
    z-index: 10;
}

/* Diagram */
.body-diagram path { cursor: pointer; stroke: #94a3b8; stroke-width: 1; transition: all 0.2s ease; fill: #f8fafc; }
.body-diagram path:hover { stroke: var(--primary-color); stroke-width: 2; filter: drop-shadow(0 0 4px rgba(13, 148, 136, 0.3)); }
.body-diagram text { font-size: 10px; font-weight: 700; fill: #64748b; text-anchor: middle; pointer-events: none; }

@media print {
    body { background: white; }
    body * { visibility: hidden; }
    .printable-area, .printable-area * { visibility: visible; }
    .printable-area { position: absolute; left: 0; top: 0; width: 100%; padding: 0; }
    .no-print { display: none !important; }
}