@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;600;700;800&display=swap');

:root {
    --bg-primary: #111115;
    --accent-red: #ff453a;
    --accent-orange: #ff9f0a;
    --accent-gradient: linear-gradient(135deg, #ff375f 0%, #ff9f0a 100%);
    --card-bg: rgba(30, 30, 42, 0.7);
    --card-border: rgba(255, 255, 255, 0.18);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.88);
    --text-muted: rgba(255, 255, 255, 0.55);
    --input-bg: rgba(255, 255, 255, 0.07);
    --input-border: rgba(255, 255, 255, 0.2);
    --input-focus: rgba(255, 55, 95, 0.45);

    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --shadow-premium: 0 20px 40px rgba(0, 0, 0, 0.4),
                      0 0 50px rgba(255, 55, 95, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    background-image: url('../images/hero_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    padding: 100px 20px 40px 20px;
    line-height: 1.5;
}

/* Glassmorphic Background Blur Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(15, 15, 20, 0.1) 0%, rgba(15, 15, 20, 0.6) 100%);
    z-index: -1;
}

/* Top Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: rgba(28, 28, 36, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--card-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 48px;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-logo:hover {
    transform: scale(1.02);
}

.logo-img {
    height: 38px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255, 55, 95, 0.4));
}

.nav-brand-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    padding: 6px 0;
}

.nav-link:hover:not(.disabled) {
    color: var(--text-primary);
}

.nav-link.disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.55;
}

.container {
    width: 100%;
    max-width: 440px;
    z-index: 1;
}

/* Glassmorphic Card */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px 32px;
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6),
                0 0 60px rgba(255, 55, 95, 0.08);
}

/* Header & Typography */
.card-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(255, 55, 95, 0.4));
    animation: pulse 3s infinite ease-in-out;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.site-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Forms */
.form-group {
    margin-bottom: 22px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.form-control {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 14px 16px 14px 44px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-red);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px var(--input-focus);
}

.form-control:focus + .input-icon {
    color: var(--accent-red);
}

/* Button */
.btn-submit {
    width: 100%;
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    padding: 14px;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(255, 55, 95, 0.3);
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 55, 95, 0.45);
    filter: brightness(1.1);
}

.btn-submit:active {
    transform: translateY(1px);
}

/* Form Toggles and Links */
.form-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-toggle-link {
    color: var(--accent-red);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.form-toggle-link:hover {
    color: var(--accent-orange);
    text-decoration: underline;
}

/* Alerts and Messages */
.alert {
    background: rgba(255, 59, 48, 0.15);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: #ff453a;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.85rem;
    margin-bottom: 24px;
    display: none;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: rgba(48, 209, 88, 0.15);
    border: 1px solid rgba(48, 209, 88, 0.3);
    color: #30d158;
}

/* Success View Dashboard */
.success-container {
    text-align: center;
}

.success-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(48, 209, 88, 0.15);
    border: 2px solid #30d158;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #30d158;
    margin: 0 auto 24px auto;
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 20px rgba(48, 209, 88, 0.2);
}

.success-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #30d158 0%, #66d9ef 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.success-message {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 32px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-val {
    font-size: 1.15rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.btn-secondary {
    display: inline-block;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 24px;
    color: var(--text-primary);
    font-weight: 600;
    font-family: var(--font-heading);
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Bottom Navigation (Hidden on Desktop) */
.bottom-nav {
    display: none;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-secondary);
    gap: 4px;
    transition: all 0.3s ease;
    flex: 1;
    height: 100%;
}

.bottom-nav-item:hover:not(.disabled) {
    color: var(--text-primary);
}

.bottom-nav-item.active {
    color: var(--accent-red);
}

.bottom-nav-item.disabled {
    color: var(--text-muted);
    opacity: 0.6;
    cursor: not-allowed;
}

.bottom-nav-icon {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.bottom-nav-item:active:not(.disabled) .bottom-nav-icon {
    transform: scale(0.9);
}

.bottom-nav-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Pulsating dot for Cams */
.cam-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pulsating-dot {
    width: 12px;
    height: 12px;
    background-color: var(--accent-red);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.5);
}

.pulsating-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: var(--accent-red);
    border-radius: 50%;
    animation: pulsate 1.5s infinite ease-out;
    z-index: -1;
}

@keyframes pulsate {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

/* Responsive Scaling */
@media (max-width: 768px) {
    .navbar .nav-links {
        display: none; /* Hide header navigation links */
    }

    .nav-brand-text {
        display: none;
    }

    body {
        padding-bottom: 96px; /* Offset bottom navigation bar */
    }

    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 68px;
        background: rgba(28, 28, 36, 0.9);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-top: 1px solid var(--card-border);
        z-index: 1000;
        justify-content: space-around;
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
    }
}

@media (max-width: 480px) {
    body {
        padding: 92px 16px 100px 16px;
    }

    .card {
        padding: 32px 20px;
        border-radius: 20px;
    }

    .site-title {
        font-size: 1.5rem;
    }
}
