/* ============================================
   CYBER HUNTER - Modern Cyber Theme CSS
   ============================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

/* ============================================
   CSS Variables - Cyber Color Palette
   ============================================ */
:root {
    /* Primary Colors */
    --cyber-black: #0a0a0f;
    --cyber-dark: #0d1117;
    --cyber-darker: #010409;
    --cyber-gray: #161b22;
    --cyber-gray-light: #21262d;
    
    /* Neon Accent Colors */
    --neon-cyan: #00ffff;
    --neon-blue: #0088ff;
    --neon-purple: #bf00ff;
    --neon-pink: #ff00ff;
    --neon-green: #00ff88;
    --neon-red: #ff0040;
    --neon-orange: #ff6600;
    --neon-yellow: #ffff00;
    
    /* Gradient Colors - Cyan/Purple/Pink */
    --gradient-cyber: linear-gradient(135deg, #00ffff 0%, #bf00ff 50%, #ff00ff 100%);
    --gradient-dark: linear-gradient(180deg, #0a0a0f 0%, #161b22 100%);
    --gradient-glow: linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(255, 0, 255, 0.1) 100%);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    
    /* Shadows */
    --shadow-cyan: 0 0 20px rgba(0, 255, 255, 0.5);
    --shadow-blue: 0 0 20px rgba(0, 136, 255, 0.5);
    --shadow-purple: 0 0 20px rgba(191, 0, 255, 0.5);
    --shadow-pink: 0 0 20px rgba(255, 0, 255, 0.5);
    --shadow-glow: 0 0 40px rgba(0, 255, 255, 0.3);
    
    /* Fonts */
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--cyber-black);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background Grid */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

/* Scanline Effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 9999;
    opacity: 0.3;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    background: var(--gradient-cyber);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: var(--neon-cyan);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 2rem);
    color: var(--text-primary);
}

p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--neon-pink);
    text-shadow: var(--shadow-cyan);
}

/* ============================================
   Container & Layout
   ============================================ */
.cyber-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.cyber-section {
    padding: 6rem 0;
    position: relative;
}

.cyber-grid {
    display: grid;
    gap: 2rem;
}

.cyber-flex {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* ============================================
   Navigation
   ============================================ */
.cyber-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    z-index: 1000;
    transition: var(--transition-normal);
}

.cyber-nav.scrolled {
    padding: 0.5rem 2rem;
    background: rgba(10, 10, 15, 0.98);
}

.cyber-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.cyber-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cyber-logo img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.5));
}

.cyber-logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-cyber);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cyber-nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.cyber-nav-links a {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    position: relative;
    transition: var(--transition-fast);
}

.cyber-nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-cyber);
    transition: var(--transition-fast);
    transform: translateX(-50%);
}

.cyber-nav-links a:hover {
    color: var(--neon-cyan);
}

.cyber-nav-links a:hover::before {
    width: 100%;
}

.cyber-nav-buttons {
    display: flex;
    gap: 1rem;
}

/* ============================================
   Buttons
   ============================================ */
.cyber-btn {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.cyber-btn-primary {
    background: var(--gradient-cyber);
    color: var(--cyber-black);
    box-shadow: var(--shadow-cyan);
}

.cyber-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.7);
}

.cyber-btn-secondary {
    background: transparent;
    color: var(--neon-cyan);
    border: 2px solid var(--neon-cyan);
}

.cyber-btn-secondary:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: var(--shadow-cyan);
    transform: translateY(-2px);
}

.cyber-btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--cyber-gray-light);
}

.cyber-btn-ghost:hover {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
}

/* Button Glitch Effect */
.cyber-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: var(--transition-slow);
}

.cyber-btn:hover::before {
    left: 100%;
}

/* ============================================
   Cards
   ============================================ */
.cyber-card {
    background: var(--cyber-gray);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
}

.cyber-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-cyber);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-normal);
}

.cyber-card:hover {
    border-color: rgba(0, 255, 255, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 255, 0.1);
}

.cyber-card:hover::before {
    transform: scaleX(1);
}

.cyber-card-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 255, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    color: var(--neon-cyan);
    font-size: 1.5rem;
}

.cyber-card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.cyber-card-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

/* ============================================
   Forms
   ============================================ */
.cyber-form {
    width: 100%;
    max-width: 400px;
}

.cyber-form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.cyber-form-label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.cyber-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--cyber-gray);
    border: 1px solid var(--cyber-gray-light);
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition-fast);
}

.cyber-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.15);
}

.cyber-input::placeholder {
    color: var(--text-muted);
}

.cyber-input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* ============================================
   Hero Section
   ============================================ */
.cyber-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.cyber-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(0, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(191, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 0, 255, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(0, 255, 255, 0.08) 0%, transparent 40%);
    z-index: -1;
}

.cyber-hero-content {
    text-align: center;
    max-width: 900px;
    z-index: 1;
}

.cyber-hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: glitch 2s infinite;
}

.cyber-hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 400;
}

.cyber-hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Glitch Animation */
@keyframes glitch {
    0%, 90%, 100% {
        text-shadow: none;
    }
    91% {
        text-shadow: 
            -2px 0 var(--neon-cyan),
            2px 0 var(--neon-pink);
    }
    92% {
        text-shadow: 
            2px 0 var(--neon-cyan),
            -2px 0 var(--neon-pink);
    }
    93% {
        text-shadow: none;
    }
}

/* ============================================
   Auth Pages (Login/Signup)
   ============================================ */
.cyber-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.cyber-auth-container {
    width: 100%;
    max-width: 450px;
    background: rgba(22, 27, 34, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.cyber-auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-cyber);
}

.cyber-auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.cyber-auth-logo {
    width: 80px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.5));
}

.cyber-auth-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.cyber-auth-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.cyber-auth-form {
    width: 100%;
}

.cyber-auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.cyber-auth-divider::before,
.cyber-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--cyber-gray-light);
}

.cyber-auth-divider span {
    padding: 0 1rem;
}

.cyber-auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--cyber-gray-light);
}

.cyber-auth-footer a {
    color: var(--neon-cyan);
    font-weight: 500;
}

/* ============================================
   Chatbot
   ============================================ */
.cyber-chatbot-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--gradient-cyber);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-cyan);
    transition: var(--transition-normal);
    z-index: 1000;
}

.cyber-chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.7);
}

.cyber-chatbot-toggle svg {
    width: 28px;
    height: 28px;
    fill: var(--cyber-black);
}

.cyber-chatbot {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 380px;
    max-width: calc(100vw - 2rem);
    height: 500px;
    max-height: calc(100vh - 8rem);
    background: var(--cyber-gray);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: var(--transition-normal);
    z-index: 999;
}

.cyber-chatbot.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.cyber-chatbot-header {
    padding: 1rem 1.5rem;
    background: var(--cyber-dark);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cyber-chatbot-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--neon-cyan);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cyber-chatbot-status {
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.cyber-chatbot-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition-fast);
}

.cyber-chatbot-close:hover {
    color: var(--neon-red);
}

.cyber-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cyber-chatbot-message {
    max-width: 85%;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.5;
}

.cyber-chatbot-message.bot {
    background: var(--cyber-dark);
    border: 1px solid rgba(0, 255, 255, 0.1);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.cyber-chatbot-message.user {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.2);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    color: var(--neon-cyan);
}

.cyber-chatbot-input-container {
    padding: 1rem;
    background: var(--cyber-dark);
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    display: flex;
    gap: 0.75rem;
}

.cyber-chatbot-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--cyber-gray);
    border: 1px solid var(--cyber-gray-light);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-fast);
}

.cyber-chatbot-input:focus {
    border-color: var(--neon-cyan);
}

.cyber-chatbot-send {
    padding: 0.75rem 1rem;
    background: var(--neon-cyan);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--cyber-black);
    cursor: pointer;
    transition: var(--transition-fast);
}

.cyber-chatbot-send:hover {
    background: var(--neon-blue);
}

.cyber-chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Typing Indicator */
.cyber-typing {
    display: flex;
    gap: 4px;
    padding: 0.5rem;
}

.cyber-typing span {
    width: 8px;
    height: 8px;
    background: var(--neon-cyan);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.cyber-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.cyber-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* ============================================
   Features Section
   ============================================ */
.cyber-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* ============================================
   Footer
   ============================================ */
.cyber-footer {
    background: var(--cyber-dark);
    border-top: 1px solid rgba(0, 255, 255, 0.1);
    padding: 4rem 2rem 2rem;
}

.cyber-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.cyber-footer-brand {
    max-width: 300px;
}

.cyber-footer-brand img {
    height: 50px;
    margin-bottom: 1rem;
}

.cyber-footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.cyber-footer-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--neon-cyan);
    margin-bottom: 1.5rem;
}

.cyber-footer-links {
    list-style: none;
}

.cyber-footer-links li {
    margin-bottom: 0.75rem;
}

.cyber-footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.cyber-footer-links a:hover {
    color: var(--neon-cyan);
    padding-left: 5px;
}

.cyber-footer-social {
    display: flex;
    gap: 1rem;
}

.cyber-footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cyber-gray);
    border: 1px solid var(--cyber-gray-light);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.cyber-footer-social a:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.cyber-footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--cyber-gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.cyber-footer-copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============================================
   Alerts & Messages
   ============================================ */
.cyber-alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cyber-alert-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--neon-green);
}

.cyber-alert-error {
    background: rgba(255, 0, 64, 0.1);
    border: 1px solid rgba(255, 0, 64, 0.3);
    color: var(--neon-red);
}

.cyber-alert-warning {
    background: rgba(255, 102, 0, 0.1);
    border: 1px solid rgba(255, 102, 0, 0.3);
    color: var(--neon-orange);
}

.cyber-alert-info {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: var(--neon-cyan);
}

/* ============================================
   Loading Spinner
   ============================================ */
.cyber-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--cyber-gray-light);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cyber-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--cyber-gray-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-cyan);
}

/* ============================================
   Responsive Design - Mobile First
   ============================================ */

/* Global mobile-first base styles */
html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Prevent horizontal overflow on all devices */
body {
    overflow-x: hidden;
    width: 100%;
    min-width: 320px;
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    body {
        /* Prevent iOS text size adjustment */
        -webkit-text-size-adjust: 100%;
    }
    
    input, textarea, select, button {
        /* Prevent iOS zoom on focus */
        font-size: 16px !important;
    }
    
    /* Fix iOS safe area (notch) */
    .cyber-nav,
    .cyber-footer {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .cyber-auth-page {
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
    
    /* Fix momentum scrolling on iOS */
    .cyber-chatbot-messages,
    .chadow-messages {
        -webkit-overflow-scrolling: touch;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .cyber-btn {
        min-height: 48px;
        padding: 0.875rem 1.5rem;
    }
    
    .cyber-nav-links a {
        padding: 0.75rem 1rem;
    }
    
    .cyber-input {
        min-height: 48px;
    }
    
    /* Remove hover effects that don't work on touch */
    .cyber-btn:hover::before {
        display: none;
    }
    
    .cyber-card:hover {
        transform: none;
    }
}

/* Extra small devices (phones, 320px - 480px) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .cyber-container {
        padding: 0 1rem;
    }
    
    .cyber-section {
        padding: 3rem 0;
    }
    
    h1 {
        font-size: 1.75rem;
        letter-spacing: 1px;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .cyber-nav {
        padding: 0.75rem 1rem;
    }
    
    .cyber-logo img {
        height: 35px;
    }
    
    .cyber-logo-text {
        font-size: 1.1rem;
    }
    
    .cyber-hero {
        padding: 5rem 1rem 2rem;
        min-height: auto;
    }
    
    .cyber-hero-title {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
        line-height: 1.2;
        word-break: break-word;
    }
    
    .cyber-hero-subtitle {
        font-size: 1rem;
    }
    
    .cyber-hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .cyber-btn {
        width: 100%;
        max-width: 100%;
        font-size: 0.875rem;
        padding: 0.75rem 1.5rem;
        letter-spacing: 1px;
    }
    
    .cyber-card {
        padding: 1.25rem;
    }
    
    .cyber-card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .cyber-auth-container {
        padding: 1.5rem;
        margin: 1rem;
        border-radius: var(--radius-md);
    }
    
    .cyber-auth-logo {
        width: 60px;
    }
    
    .cyber-auth-title {
        font-size: 1.25rem;
    }
    
    .cyber-input {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
    
    .cyber-footer {
        padding: 2rem 1rem 1rem;
    }
    
    .cyber-footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cyber-footer-social {
        justify-content: center;
    }
}

/* Small devices (phones landscape, small tablets, 481px - 768px) */
@media (max-width: 768px) {
    .cyber-nav-links {
        display: none;
    }
    
    .cyber-nav-buttons {
        gap: 0.5rem;
    }
    
    .cyber-nav-buttons .cyber-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .cyber-hero {
        padding: 6rem 1rem 3rem;
    }
    
    .cyber-hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cyber-btn {
        width: 100%;
        max-width: 320px;
    }
    
    .cyber-features {
        grid-template-columns: 1fr;
    }
    
    .cyber-auth-container {
        padding: 2rem;
        max-width: 100%;
        margin: 1rem;
    }
    
    .cyber-auth-page {
        padding: 1rem;
    }
    
    .cyber-chatbot {
        right: 1rem;
        left: 1rem;
        width: auto;
        bottom: 5rem;
        height: 70vh;
        max-height: calc(100vh - 6rem);
    }
    
    .cyber-chatbot-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }
    
    .cyber-footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .cyber-grid {
        grid-template-columns: 1fr;
    }
    
    .cyber-flex {
        flex-direction: column;
    }
}

/* Medium devices (tablets, 769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .cyber-container {
        padding: 0 1.5rem;
    }
    
    .cyber-nav-links {
        gap: 1rem;
    }
    
    .cyber-nav-links a {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .cyber-features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cyber-footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .cyber-hero {
        min-height: auto;
        padding: 4rem 2rem 2rem;
    }
    
    .cyber-auth-page {
        min-height: auto;
        padding: 1rem;
    }
    
    .cyber-auth-container {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Dark mode preference (most phones) */
@media (prefers-color-scheme: dark) {
    /* Already dark theme, but ensure consistency */
    :root {
        color-scheme: dark;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-cyan { color: var(--neon-cyan); }
.text-pink { color: var(--neon-red); }
.text-purple { color: var(--neon-red); }
.text-green { color: var(--neon-green); }
.text-red { color: var(--neon-red); }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden { display: none !important; }
.visible { visibility: visible !important; }

/* Password Visibility Toggle */
.cyber-password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition-fast);
}

.cyber-password-toggle:hover {
    color: var(--neon-cyan);
}

/* Checkbox Styles */
.cyber-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.cyber-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--neon-cyan);
}

.cyber-checkbox span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Link Styles */
.cyber-link {
    color: var(--neon-cyan);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.cyber-link:hover {
    text-decoration: underline;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Back to Home Link */
.back-to-home {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition-fast);
    z-index: 10;
}

.back-to-home:hover {
    color: var(--neon-cyan);
}

.back-to-home i {
    font-size: 0.875rem;
}

@media (max-width: 480px) {
    .back-to-home {
        top: 1rem;
        left: 1rem;
        font-size: 0.85rem;
    }
}

/* Special Navigation Links */
.pricing-link {
    color: #f59e0b !important;
    font-weight: 600;
}

.pricing-link:hover {
    color: #fbbf24 !important;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.pricing-link i {
    margin-right: 4px;
}

.chadow-link {
    color: var(--neon-cyan) !important;
    font-weight: 600;
}

.chadow-link:hover {
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.chadow-link i {
    margin-right: 4px;
}
