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

:root {
    --primary-color: #0d9488; /* Teal 600 */
    --primary-light: #14b8a6; /* Teal 500 */
    --primary-dark: #0f766e;  /* Teal 700 */
    --secondary-color: #10b981; /* Emerald 500 */
    --bg-color: #f0fdfa; /* Teal 50 */
    --text-main: #1e293b; /* Slate 800 */
    --text-muted: #64748b; /* Slate 500 */
    --white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --app-padding: 20px;
    --nav-height: 70px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    background-image: 
        radial-gradient(at 0% 0%, hsla(167,99%,71%,1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(180,100%,89%,1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(160,100%,82%,1) 0, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(13, 148, 136, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); }
}
@keyframes floatAnim {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.animate-entrance {
    animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Navbar (Top) */
.navbar {
    padding: 20px var(--app-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.navbar-brand span {
    color: var(--secondary-color);
}
.nav-links a {
    text-decoration: none;
    color: var(--primary-dark);
    font-weight: 600;
    padding: 8px 16px;
    background: rgba(255,255,255,0.5);
    border-radius: 20px;
    transition: all 0.3s ease;
}
.nav-links a:hover, .nav-links a.active {
    background: var(--primary-color);
    color: white;
}

/* Layout - Desktop vs Mobile */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px var(--app-padding);
    display: flex;
    flex-direction: column;
}

.split-layout {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.left-panel, .right-panel {
    flex: 1;
    width: 100%;
}

.left-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: sticky;
    top: 40px;
}

/* Hero Content */
.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    background: -webkit-linear-gradient(45deg, var(--primary-dark), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}
.hero-image {
    width: 100%;
    max-width: 500px;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    animation: floatAnim 6s ease-in-out infinite;
    object-fit: cover;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 35px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
}
.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
}
textarea.form-control {
    resize: vertical;
    min-height: 140px;
}

/* Checkbox Modern */
.checkbox-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    background: rgba(255,255,255,0.5);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}
.checkbox-modern:hover {
    background: rgba(255,255,255,0.8);
}
.checkbox-modern input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    text-decoration: none;
    gap: 10px;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 14px 0 rgba(13, 148, 136, 0.39);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.23);
}
.btn-primary:active {
    transform: translateY(0);
}
.btn-block {
    width: 100%;
}

/* Mobile Bottom Navigation (Hidden on Desktop) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}
.nav-items {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 12px;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    background: transparent;
}
.nav-item svg {
    margin-bottom: 4px;
    transition: transform 0.3s;
}
.nav-item.active {
    color: var(--primary-color);
}
.nav-item.active svg {
    transform: translateY(-2px);
    animation: pulseGlow 1.5s infinite;
    border-radius: 50%;
}

/* Content Toggling */
.view-section {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.view-section.active {
    display: block;
    opacity: 1;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
    .split-layout {
        flex-direction: column;
        gap: 30px;
    }
    .left-panel {
        position: static;
        text-align: center;
        align-items: center;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: calc(var(--nav-height) + 20px);
    }
    .navbar {
        justify-content: center;
    }
    .nav-links {
        display: none; /* Hide admin login on mobile topbar for cleaner look */
    }
    .bottom-nav {
        display: block;
    }
    .glass-card {
        padding: 25px 20px;
        border-radius: 20px;
    }
    /* Hide illustrations on mobile to keep form in focus, or make them smaller */
    .hero-image {
        max-width: 250px;
        margin-top: -10px;
        margin-bottom: 20px;
    }
    /* Specific view toggling for mobile */
    .mobile-hidden {
        display: none !important;
    }
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}
.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #34d399;
}
.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

/* --- Slide Puzzle Captcha --- */
.captcha-box {
    width: 100%;
    height: 120px;
    background: url('../images/hero.jpg') no-repeat center center / cover;
    background-color: var(--primary-dark);
    border-radius: 12px;
    position: relative;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}
.captcha-target {
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,0.6);
    border-radius: 8px;
    position: absolute;
    top: 38px;
    display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.7);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
    left: 200px;
}
.captcha-slider-piece {
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 8px;
    position: absolute;
    top: 38px;
    left: 0;
    display: flex; align-items: center; justify-content: center; color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 5;
}
.captcha-track {
    width: 100%;
    height: 50px;
    background: #f0f3f5;
    border-radius: 25px;
    position: relative;
    border: 1px solid #e0e5e9;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}
.captcha-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    border-radius: 25px 0 0 25px;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.15;
}
.captcha-handle {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 1px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    cursor: grab;
    z-index: 10;
    transition: background 0.3s, color 0.3s;
}
.captcha-handle:active {
    cursor: grabbing;
}
.captcha-text {
    position: absolute;
    width: 100%;
    text-align: center;
    line-height: 50px;
    color: #888;
    font-size: 14px;
    pointer-events: none;
    user-select: none;
    font-weight: 500;
}
.captcha-success .captcha-handle {
    background: var(--primary-color);
    color: white;
}
.captcha-success .captcha-track {
    border-color: var(--primary-color);
}
.captcha-success .captcha-text {
    color: var(--primary-color);
    font-weight: 700;
}
.captcha-success .captcha-fill {
    opacity: 0.3;
}
