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

/* ==========================================================================
   GLOBAL STYLES & REFINED PREMIUM GLASSMORPHISM
   ========================================================================== */
:root {
    --primary-color: #3b82f6; /* Vibrant Blue */
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary-color: #10b981; /* Emerald */
    --accent-color: #f43f5e; /* Rose */
    
    --bg-main: #0f172a; /* Deep Slate */
    --bg-mesh: radial-gradient(at 0% 0%, rgba(15,23,42,1) 0px, transparent 50%),
               radial-gradient(at 100% 0%, rgba(30,58,138,0.4) 0px, transparent 50%),
               radial-gradient(at 100% 100%, rgba(15,23,42,1) 0px, transparent 50%),
               radial-gradient(at 0% 100%, rgba(16,185,129,0.15) 0px, transparent 50%);
               
    --glass-bg: rgba(30, 41, 59, 0.4);
    --glass-bg-hover: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-light: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-main);
    background-image: var(--bg-mesh);
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border: 1px solid transparent;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    letter-spacing: 0.02em;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5), inset 0 1px 0 rgba(255,255,255,0.2);
    filter: brightness(1.1);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.btn-secondary:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-light);
    transform: translateY(-2px);
}

.btn-large {
    padding: 14px 36px;
    font-size: 16px;
}

.btn-login {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    transition: color 0.3s ease;
    font-weight: 500;
}

.btn-login:hover {
    color: var(--text-primary);
}

.btn-signup {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-signup:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    filter: brightness(1.1);
}

/* 3D Glassy Navigation */
.navbar {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.logo-knot {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Responsive Navbar */
@media (max-width: 768px) {
    .navbar-content {
        flex-direction: row;
        padding: 16px;
    }
    
    .mobile-menu-btn {
        display: block !important;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 80px 24px 24px;
        transition: left 0.3s ease;
        z-index: 1000;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
        gap: 24px;
    }

    .nav-links.active {
        left: 0;
    }
    
    .nav-links a {
        font-size: 18px;
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Better Touch Targets for Mobile */
    .btn {
        min-height: 44px;
    }
    input, textarea, select {
        min-height: 44px;
        font-size: 16px !important; /* prevent iOS zoom */
    }
    body, html {
        overflow-x: hidden;
    }
}

/* Typography Colors for Glass Theme */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: white;
}

h2 {
    font-size: 36px;
}

h3 {
    font-size: 20px;
}

.section-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* General 3D Glass Cards */
.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
    color: white;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Sections */
section {
    padding: 80px 0;
}

@media (max-width: 768px) {
    section {
        padding: 40px 0;
    }
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #60A5FA;
}

ul {
    list-style: none;
}

/* Glassy Global Inputs */
input, textarea, select {
    font-family: inherit;
    font-size: 16px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px;
    color: white !important;
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.4);
}

::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

select option {
    background: #1E293B; /* Fallback for select dropdowns */
    color: white;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--text-light); }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.gap-20 { gap: 20px; }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
.flex { display: flex; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-col { flex-direction: column; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.6s ease-out; }
.slide-in-up { animation: slideInUp 0.6s ease-out; }

/* Global Form Elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input, textarea, select {
    background: rgba(15, 23, 42, 0.4) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
    border-radius: 12px;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    background: rgba(15, 23, 42, 0.6) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

::placeholder {
    color: var(--text-muted) !important;
}

.form-group small {
    font-size: 12px;
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* 3D Glass Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border-light);
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    color: var(--text-primary);
    transform: translateY(20px);
    animation: slideInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-header {
    border-bottom: 1px solid var(--glass-border);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 12px;
}