:root {
    /* Color Palette - Premium Dark/Modern Theme */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-main: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-nav: rgba(15, 23, 42, 0.8);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #10b981;
    --danger: #ef4444;
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    
    /* Spacing */
    --safe-area-bottom: env(safe-area-inset-bottom, 0);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: calc(70px + var(--safe-area-bottom));
}

/* Glassmorphism Effect */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* Header */
.main-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-nav);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    color: var(--primary);
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

/* Navigation */
.top-nav {
    display: none;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: var(--safe-area-bottom);
    z-index: 1000;
}

@media (min-width: 768px) {
    .top-nav {
        display: flex;
        gap: 1rem;
    }
    .bottom-nav {
        display: none;
    }
    #app {
        padding-bottom: 0;
    }
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 12px;
}

.nav-btn.active {
    color: var(--primary);
}

.nav-btn:hover {
    color: var(--primary);
}

.nav-btn span {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Main Content Area */
#main-content {
    flex: 1;
    padding: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* Forms & Inputs */
.form-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.4s ease-out;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 4px;
}

input, select {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

input:focus, select:focus {
    border-color: var(--primary);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Monetization / Ad Banner */
#ad-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px; /* Standard Banner Height */
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000; /* Above bottom-nav */
    border-top: 1px solid var(--glass-border);
}

/* Adjust layout when ad is present */
body.has-ads #app {
    padding-bottom: calc(70px + 60px + var(--safe-area-bottom)); /* Nav + Ad */
}

/* Mobile Adjustments */
@media (max-width: 767px) {
    #ad-banner {
        /* On mobile, place it ABOVE the bottom nav */
        bottom: 70px; 
    }
}
