:root {
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
    --apple-bg: #f5f5f7;
    --apple-text: #1d1d1f;
    --apple-gray: #86868b;
    --apple-glass-bg: rgba(255, 255, 255, 0.7);
    --apple-border: rgba(255, 255, 255, 0.3);
    --nav-height: 64px;
}

@media (min-width: 768px) {
    :root {
        --nav-height: 72px;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    background-color: var(--apple-bg);
    color: var(--apple-text);
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Components */
.apple-card {
    background: var(--apple-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--apple-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Apple-style Navigation - Redesigned for Mobile First */
.apple-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: var(--apple-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--apple-border);
    display: flex;
    justify-content: center;
    align-items: center; /* Ensure vertical centering */
    padding: 0 24px;
    margin-bottom: 16px; /* Added spacing below header */
}

/* Container is now handled by Tailwind in HTML, but keeping this for fallback/reference if needed */
.nav-container {
    width: 100%;
    max-width: 1200px; /* Wider max-width */
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-left { gap: 24px; }
.nav-right { gap: 16px; }

.nav-logo {
    font-weight: 600;
    font-size: 18px; /* Larger logo */
    letter-spacing: -0.01em;
    white-space: nowrap;
    color: var(--apple-text);
}

/* Responsive Cards & Layouts */
.main-content {
    padding-top: calc(var(--nav-height) + 16px);
}

@media (max-width: 768px) {
    .apple-card {
        border-radius: 0; /* Full width on mobile */
        border-left: none;
        border-right: none;
        box-shadow: none;
    }
}

/* Input & Button Standards */
.apple-input {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    transition: all 0.2s ease;
    width: 100%;
}

.apple-input:focus {
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
    outline: none;
}

.apple-button-primary {
    background: var(--apple-blue);
    color: white;
    font-weight: 500;
    border-radius: 12px;
    padding: 14px 24px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.apple-button-primary:hover:not(:disabled) {
    background: var(--apple-blue-hover);
    transform: scale(1.01);
}

.apple-button-secondary {
    background: transparent;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    padding: 14px 24px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.apple-button-secondary:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Dark Mode Overrides */
html.dark body {
    --apple-bg: #000000;
    --apple-text: #f5f5f7;
    --apple-glass-bg: rgba(28, 28, 30, 0.8);
    --apple-border: rgba(255, 255, 255, 0.1);
    color-scheme: dark;
}

html.dark .apple-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

html.dark .apple-input::placeholder {
    color: #9ca3af;
}

html.dark .nav-divider {
    background: rgba(255, 255, 255, 0.1);
}

.dark .apple-input {
    background: rgba(44, 44, 46, 0.5);
    border-color: #3a3a3c;
    color: white;
}

.dark .apple-button-secondary {
    border-color: #3a3a3c;
    color: white;
}

.dark .apple-button-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dark .text-gray-500 { color: #a1a1aa; }
.dark .text-gray-400 { color: #d4d4d8; }
.dark .text-gray-600 { color: #a1a1aa; }
.dark .bg-gray-100\/50 { background-color: rgba(63, 63, 70, 0.5); }
.dark .bg-gray-50 { background-color: #18181b; }
.dark .border-gray-200 { border-color: #3f3f46; }
.dark .bg-white { background-color: #1c1c1e; color: white; }

/* Utilities */
.step-hidden { display: none; }
.truncate-multiline {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
