/* Apple HIG inspired System Fonts */
:root {
    --system-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --primary-color: #0071e3;
    /* iOS Blue */
    --background-color: #f5f5f7;
    /* Light Gray Background */
    --card-background: rgba(255, 255, 255, 0.72);
    /* Glass effect */
    --text-color: #1d1d1f;
    --secondary-text: #86868b;
    --radius: 12px;
    --blur: 20px;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* App-like behavior */
    overscroll-behavior-y: none;
    /* Prevent elastic scroll */
    user-select: none;
    /* Disable text selection for UI feel */
    -webkit-tap-highlight-color: transparent;
    /* Remove blue tap box */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* Allow text selection on inputs and paragraphs that matter */
input,
textarea,
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    user-select: text;
}

/* Glassmorphism Components */
.glass-effect {
    background: var(--card-background);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

/* Navbar Redesign */
.apple-navbar {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-weight: 600;
    color: var(--text-color) !important;
    letter-spacing: -0.5px;
}

.nav-link {
    color: var(--text-color) !important;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.nav-link:hover {
    opacity: 1;
}

/* Buttons */
.btn-apple {
    background-color: var(--primary-color);
    color: white;
    border-radius: 980px;
    /* Pillow shape */
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    transition: all 0.2s ease;
}

.btn-apple:hover {
    background-color: #0077ED;
    /* Slightly lighter */
    transform: scale(1.02);
}

.btn-apple-secondary {
    background-color: #e8e8ed;
    color: var(--primary-color);
    border-radius: 980px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    transition: all 0.2s ease;
}

.btn-apple-secondary:hover {
    background-color: #d2d2d7;
}

/* Cards */
.card-apple {
    border-radius: 18px;
    border: none;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Inputs */
.form-control-apple {
    border-radius: 12px;
    border: 1px solid #d2d2d7;
    padding: 12px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.2s;
}

.form-control-apple:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

/* Feature Grid */
.feature-icon {
    font-size: 40px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.transition-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.transition-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Bottom Tab Bar */
.bottom-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 83px;
    /* Standard iOS Tab Bar height including safe area */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding-top: 10px;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 1000;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #999;
    font-size: 10px;
    width: 60px;
}

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

.tab-icon {
    font-size: 24px;
    margin-bottom: 2px;
}

.tab-label {
    font-weight: 500;
}

/* Main Action Button (Center) */
.tab-main-action {
    position: relative;
    top: -20px;
}

.tab-icon-main {
    font-size: 32px;
    background: var(--primary-color);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}