/* Wateeni - iOS App-inspired Premium Interface */

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

:root {
    /* iOS App Colors - Exact Match */
    --wateeni-blue: #007AFF;
    --wateeni-purple: #5856D6; 
    --wateeni-gradient: linear-gradient(135deg, #5856D6 0%, #007AFF 50%, #34C759 100%);
    --wateeni-focus-gradient: linear-gradient(90deg, #5856D6, #007AFF);
    
    /* Background System */
    --bg-primary: #F2F2F7;
    --bg-secondary: #FFFFFF;
    --bg-material: rgba(255, 255, 255, 0.8);
    --bg-gradient: linear-gradient(135deg, rgba(88, 86, 214, 0.05) 0%, rgba(0, 122, 255, 0.05) 100%);
    
    /* Text Colors */
    --text-primary: #000000;
    --text-secondary: #8E8E93;
    --text-muted: #C7C7CC;
    --text-success: #34C759;
    --text-error: #FF3B30;
    
    /* Border & Dividers */
    --border-inactive: rgba(142, 142, 147, 0.3);
    --border-active: var(--wateeni-focus-gradient);
    
    /* Compact Spacing System */
    --spacing-xs: 4px;
    --spacing-sm: 6px;
    --spacing-md: 8px;
    --spacing-lg: 12px;
    --spacing-xl: 16px;
    --spacing-2xl: 20px;
    --spacing-3xl: 24px;
    --spacing-4xl: 28px;
    --spacing-5xl: 32px;
    
    /* Border Radius (iOS-like) */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows (iOS-like) */
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-strong: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-focus: 0 0 0 4px rgba(88, 86, 214, 0.1);
}

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

/* Screen Reader Only - for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible - Enhanced keyboard navigation */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 3px solid var(--wateeni-blue);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-gradient);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Main Layout */
.main-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl);
    gap: var(--spacing-5xl);
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.main-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(88, 86, 214, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 122, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Left Side - App Showcase */
.app-showcase {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-4xl);
    max-width: 380px;
}

.phone-mockup {
    position: relative;
    width: 260px;
    height: 520px;
    background: linear-gradient(145deg, #1d1d1d, #2d2d2d);
    border-radius: 36px;
    padding: 8px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.1);
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.phone-mockup:hover {
    transform: perspective(1000px) rotateY(-2deg) rotateX(1deg) scale(1.02);
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: #444;
    border-radius: var(--radius-full);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    border-radius: 28px;
    overflow: hidden;
    position: relative;
}

.screenshot {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gradient);
}

.screenshot.active {
    opacity: 1;
    transform: scale(1);
}

/* Onboarding Screens */
.onboarding-screen {
    --accent: #5856D6;
    --accent-secondary: #0A84FF;
    --accent-glow: rgba(88, 86, 214, 0.35);
    --accent-glow-secondary: rgba(10, 132, 255, 0.35);
    width: 100%;
    height: 100%;
    padding: var(--spacing-4xl);
    border-radius: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    background: linear-gradient(160deg, rgba(12, 15, 36, 0.96) 0%, rgba(6, 8, 20, 0.98) 100%);
    box-shadow: 0 24px 48px rgba(7, 10, 24, 0.55);
    overflow: hidden;
}

.onboarding-screen::before,
.onboarding-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.onboarding-screen::before {
    background: radial-gradient(circle at 20% 15%, var(--accent-glow) 0%, transparent 60%);
    opacity: 0.85;
}

.onboarding-screen::after {
    background: radial-gradient(circle at 80% 85%, var(--accent-glow-secondary) 0%, transparent 55%);
    opacity: 0.7;
}

.onboarding-screen > * {
    position: relative;
    z-index: 2;
}

.screen-collab {
    --accent: #34C759;
    --accent-secondary: #0A84FF;
    --accent-glow: rgba(52, 199, 89, 0.35);
    --accent-glow-secondary: rgba(10, 132, 255, 0.32);
}

.screen-discover {
    --accent: #FF2D55;
    --accent-secondary: #5856D6;
    --accent-glow: rgba(255, 45, 85, 0.35);
    --accent-glow-secondary: rgba(88, 86, 214, 0.32);
}

.screen-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.status-indicators {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.status-icon {
    display: inline-block;
    width: 18px;
    height: 6px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.25);
    position: relative;
    overflow: hidden;
}

.status-icon.signal {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.15) 100%);
}

.status-icon.wifi {
    width: 16px;
    height: 10px;
    border-radius: 50% 50% 4px 4px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: transparent;
}

.status-icon.wifi::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50% 50% 4px 4px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: transparent;
}

.status-icon.wifi::before {
    content: '';
    position: absolute;
    bottom: 1px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
}

.status-icon.battery {
    width: 24px;
    height: 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
}

.status-icon.battery::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.7);
}

.status-icon.battery::before {
    content: '';
    position: absolute;
    top: 2px;
    right: -3px;
    width: 3px;
    height: 6px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.45);
}

.screen-header {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-3xl);
}

.screen-badge {
    align-self: flex-start;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.screen-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: #FFFFFF;
}

.screen-header p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
}

.circular-post-preview {
    margin-top: var(--spacing-4xl);
    display: flex;
    justify-content: center;
}

.post-shell {
    --circle-size: clamp(240px, 28vw, 320px);
    --ring-gradient: linear-gradient(135deg, #7c5cff 0%, #3ea0ff 100%);
    --inner-gradient: radial-gradient(circle at 45% 18%, rgba(255, 255, 255, 0.28) 0%, rgba(14, 18, 40, 0.92) 55%, rgba(6, 8, 20, 1) 100%);
    --overlay-gradient: linear-gradient(160deg, rgba(94, 122, 255, 0.42) 0%, rgba(12, 15, 36, 0.92) 68%), radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.18) 0%, transparent 55%);
    position: relative;
    width: var(--circle-size);
    height: var(--circle-size);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s ease;
}

.post-shell::after {
    content: '';
    position: absolute;
    inset: -24px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.35) 0%, transparent 65%);
    z-index: -1;
    filter: blur(20px);
    opacity: 0.65;
}

.post-shell:hover {
    transform: translateY(-4px);
}

.post-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    padding: 14px;
    background: var(--ring-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.post-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    background: var(--inner-gradient);
    box-shadow: inset 0 28px 60px rgba(0, 0, 0, 0.55);
}

.post-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--overlay-gradient);
    mix-blend-mode: screen;
    opacity: 0.9;
}

.post-media-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.45) 75%),
                repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0, rgba(255, 255, 255, 0.06) 2px, transparent 2px, transparent 4px);
    opacity: 0.8;
}

.post-media-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05);
    transition: transform 0.6s ease;
}

.post-shell:hover .post-media-image {
    transform: scale(1.03);
}

.post-meta {
    position: absolute;
    inset: auto 18px 18px 18px;
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(8, 12, 28, 0.12) 0%, rgba(4, 6, 16, 0.78) 100%);
    backdrop-filter: blur(12px);
    color: #f8f9fc;
    box-shadow: 0 18px 32px rgba(6, 10, 24, 0.45);
}

.post-meta__owner {
    display: flex;
    gap: 12px;
    align-items: center;
}

.post-meta__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.65);
    object-fit: cover;
}

.post-meta__name {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.post-meta__time {
    display: block;
    margin-top: 2px;
    font-size: 0.75rem;
    color: rgba(248, 249, 252, 0.6);
}

.post-meta__caption {
    font-size: 0.9rem;
    line-height: 1.45;
    color: rgba(248, 249, 252, 0.92);
}

.post-meta__tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.post-meta__tags li {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(248, 249, 252, 0.68);
}

.post-shell--create {
    --ring-gradient: linear-gradient(135deg, #7c5cff 0%, #3ea0ff 100%);
    --inner-gradient: radial-gradient(circle at 46% 16%, rgba(255, 255, 255, 0.24) 0%, rgba(13, 17, 40, 0.92) 55%, rgba(6, 8, 20, 1) 100%);
    --overlay-gradient: linear-gradient(165deg, rgba(110, 134, 255, 0.4) 0%, rgba(12, 15, 36, 0.9) 68%), radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.18) 0%, transparent 55%);
}

.post-shell--collab {
    --ring-gradient: linear-gradient(135deg, #22d3ee 0%, #34d399 100%);
    --inner-gradient: radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.24) 0%, rgba(11, 16, 36, 0.92) 55%, rgba(4, 6, 16, 1) 100%);
    --overlay-gradient: linear-gradient(170deg, rgba(52, 211, 153, 0.42) 0%, rgba(9, 13, 28, 0.9) 70%), radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.18) 0%, transparent 55%);
}

.post-shell--boost {
    --ring-gradient: linear-gradient(135deg, #ff6b81 0%, #5856d6 100%);
    --inner-gradient: radial-gradient(circle at 48% 16%, rgba(255, 255, 255, 0.24) 0%, rgba(20, 16, 46, 0.92) 55%, rgba(8, 6, 24, 1) 100%);
    --overlay-gradient: linear-gradient(165deg, rgba(255, 107, 129, 0.4) 0%, rgba(10, 12, 28, 0.9) 70%), radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.18) 0%, transparent 55%);
}

.post-hot-badge {
    position: absolute;
    top: 18px;
    right: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 149, 0, 0.35);
    background: rgba(255, 149, 0, 0.18);
    color: #ff9f0a;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.post-hot-badge--live {
    background: rgba(255, 59, 48, 0.22);
    border-color: rgba(255, 59, 48, 0.42);
    color: #ff453a;
}

.post-hot-badge--boost {
    background: rgba(10, 132, 255, 0.24);
    border-color: rgba(10, 132, 255, 0.4);
    color: #0a84ff;
}

.hot-icon {
    font-size: 0.9rem;
    line-height: 1;
}

.post-ellipsis {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 62px;
    height: 26px;
    border-radius: 999px;
    background: rgba(12, 15, 36, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.post-ellipsis span {
    font-size: 1.4rem;
    transform: translateY(-1px);
}

.post-controls {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.post-control {
    --radius: calc(var(--circle-size) / 2 + 60px);
    --offset: 0px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center;
    transform: rotate(var(--angle)) translateY(calc((var(--radius) + var(--offset)) * -1)) rotate(calc(var(--angle) * -1));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
}

.control-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1.4px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 18, 40, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.control-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 36px rgba(0, 0, 0, 0.5);
}

.control-button--like {
    border: none;
    background: linear-gradient(135deg, #ff6b81 0%, #ff9f0a 100%);
    color: #FFFFFF;
    box-shadow: 0 18px 32px rgba(255, 107, 129, 0.45);
}

.post-shell--collab .control-button--like {
    background: linear-gradient(135deg, #22d3ee 0%, #34d399 100%);
    box-shadow: 0 18px 32px rgba(52, 211, 153, 0.42);
}

.post-shell--boost .control-button--like {
    background: linear-gradient(135deg, #ff6b81 0%, #7c5cff 100%);
    box-shadow: 0 18px 32px rgba(88, 86, 214, 0.42);
}

.control-icon {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.6;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.control-button--like .control-icon {
    stroke: none;
    fill: currentColor;
}

.control-button--profile {
    border: 1.4px solid rgba(255, 255, 255, 0.22);
    background: rgba(13, 16, 34, 0.88);
}

.control-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    min-width: 54px;
    white-space: pre-line;
}

.control-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #FFFFFF;
}

.control-avatar--group {
    width: 36px;
    background: linear-gradient(135deg, #34d399 0%, #0ea5e9 100%);
    font-size: 0.78rem;
}

/* Screenshot Navigation */
.screenshot-dots {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-top: var(--spacing-lg);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--text-muted);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.dot:hover {
    background: var(--text-secondary);
    transform: scale(1.3);
}

.dot:focus-visible {
    outline: 2px solid var(--wateeni-blue);
    outline-offset: 4px;
    transform: scale(1.3);
}

.dot.active {
    background: var(--wateeni-blue);
    width: 20px;
    transform: scale(1);
}

.dot.active:focus-visible {
    transform: scale(1.05);
}

/* Right Side - Auth Container */
.auth-container {
    flex: 1;
    max-width: 420px;
    display: flex;
    justify-content: center;
    position: relative;
    min-height: 600px;
}

.auth-box {
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-3xl) var(--spacing-2xl);
    box-shadow: var(--shadow-strong);
    position: relative;
    overflow: hidden;
}

.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--wateeni-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-box:hover::before {
    opacity: 1;
}

/* Logo */
.logo {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.logo h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--wateeni-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--spacing-xs);
    filter: drop-shadow(0 2px 4px rgba(88, 86, 214, 0.2));
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Form Headers */
.form-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    letter-spacing: -0.01em;
}

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

/* Auth Views - Separate View System */
.auth-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

.auth-view.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.auth-view.slide-left {
    transform: translateX(-100%);
}

/* Back Button */
.back-button {
    margin-bottom: var(--spacing-xl);
}

.btn-back {
    background: none;
    border: none;
    color: var(--wateeni-blue);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: rgba(88, 86, 214, 0.1);
    transform: translateX(-2px);
}

.btn-back:focus-visible {
    outline: 2px solid var(--wateeni-blue);
    outline-offset: 2px;
    background: rgba(88, 86, 214, 0.1);
}

.back-icon {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Auth Switch Links */
.auth-switch {
    text-align: center;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(142, 142, 147, 0.2);
}

.auth-switch p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.auth-switch a {
    color: var(--wateeni-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: var(--radius-sm);
    padding: 2px 4px;
    margin: -2px -4px;
}

.auth-switch a:hover {
    color: var(--wateeni-purple);
    text-decoration: underline;
}

.auth-switch a:focus-visible {
    outline: 2px solid var(--wateeni-blue);
    outline-offset: 2px;
}

/* iOS AuthTextField Recreation */
.input-group {
    position: relative;
    margin-bottom: var(--spacing-lg);
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(20px);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    border: 1.5px solid var(--border-inactive);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-height: 48px;
    box-shadow: var(--shadow-subtle);
}

.auth-input-wrapper:focus-within {
    border: 1.5px solid transparent;
    background: linear-gradient(white, white) padding-box, var(--wateeni-focus-gradient) border-box;
    box-shadow: var(--shadow-focus);
    transform: scale(1.005);
}

.auth-input-wrapper:focus-within::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(88, 86, 214, 0.03), transparent);
    border-radius: var(--radius-xl);
    pointer-events: none;
}

.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: var(--spacing-lg);
    opacity: 0.5;
    transition: opacity 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.input-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 2;
}

.auth-input-wrapper:focus-within .input-icon {
    opacity: 0.8;
    color: var(--wateeni-purple);
}

.auth-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
}

.auth-input-wrapper input::placeholder {
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show placeholder only when label is not active */
.auth-input-wrapper:not(:focus-within) input:placeholder-shown::placeholder {
    opacity: 0;
}

/* Hide placeholder when input is focused or has content */
.auth-input-wrapper input:focus::placeholder,
.auth-input-wrapper input:not(:placeholder-shown)::placeholder {
    opacity: 0;
}

/* Floating Labels - Fixed Positioning */
.floating-label {
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: transparent;
    padding: 0 4px;
    z-index: 1;
    opacity: 0.7;
}

.floating-label.active {
    top: -12px;
    left: 14px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--wateeni-purple);
    background: rgba(255, 255, 255, 0.95);
    padding: 0 6px;
    opacity: 1;
}

/* Hide placeholder when label is active */
.auth-input-wrapper input:focus + .floating-label.active,
.auth-input-wrapper input:not(:placeholder-shown) + .floating-label.active {
    color: var(--wateeni-blue);
}

/* Ensure input text doesn't overlap with label */
.auth-input-wrapper input {
    padding-top: 2px;
}

/* Password Toggle */
.password-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    margin-left: var(--spacing-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 28px;
    height: 28px;
    color: var(--text-secondary);
    opacity: 0.6;
}

.password-toggle:hover {
    background: rgba(142, 142, 147, 0.08);
    color: var(--text-primary);
    opacity: 1;
}

.password-toggle:focus-visible {
    outline: 2px solid var(--wateeni-blue);
    outline-offset: 2px;
    opacity: 1;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* Username Validation */
.username-validation {
    margin-top: var(--spacing-md);
    padding: 0 var(--spacing-lg);
}

.validation-message {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.8rem;
    font-weight: 500;
    min-height: 20px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.validation-message.show {
    opacity: 1;
    transform: translateY(0);
}

.validation-message.checking { color: var(--wateeni-blue); }
.validation-message.available { color: var(--text-success); }
.validation-message.unavailable { color: var(--text-error); }

.validation-icon {
    position: absolute;
    right: var(--spacing-lg);
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.validation-icon.show {
    opacity: 1;
}

/* Username Suggestions */
.username-suggestions {
    display: flex;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.username-suggestions.show {
    opacity: 1;
    transform: translateY(0);
}

.suggestion-chip {
    background: rgba(88, 86, 214, 0.1);
    color: var(--wateeni-purple);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(88, 86, 214, 0.2);
    transition: all 0.2s ease;
    font-family: inherit;
}

.suggestion-chip:hover {
    background: rgba(88, 86, 214, 0.2);
    transform: translateY(-1px);
}

.suggestion-chip:focus-visible {
    outline: 2px solid var(--wateeni-blue);
    outline-offset: 2px;
    background: rgba(88, 86, 214, 0.2);
    transform: translateY(-1px);
}

/* Password Strength Indicator */
.password-strength {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    padding: 0 var(--spacing-lg);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.password-strength.show {
    opacity: 1;
    transform: translateY(0);
}

.strength-bars {
    display: flex;
    gap: var(--spacing-xs);
    flex: 1;
}

.strength-bar {
    height: 4px;
    background: rgba(142, 142, 147, 0.3);
    border-radius: var(--radius-full);
    flex: 1;
    transition: all 0.3s ease;
}

.strength-bar.filled {
    background: var(--bar-color, var(--text-muted));
}

.strength-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--strength-color, var(--text-secondary));
    min-width: 60px;
    text-align: right;
}

/* Password Requirements */
.password-requirements {
    margin-top: var(--spacing-md);
    padding: 0 var(--spacing-lg);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.password-requirements.show {
    opacity: 1;
    transform: translateY(0);
}

.requirement {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-xs);
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.requirement .req-text {
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.requirement.met .req-text {
    color: var(--text-success);
    font-weight: 600;
}

.requirement.met {
    transform: translateX(2px);
}

/* Terms Checkbox */
.terms-checkbox {
    margin: var(--spacing-lg) 0;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 4px;
    margin: -4px;
    border-radius: var(--radius-sm);
    position: relative;
}

.checkbox-container:focus-within {
    outline: 2px solid var(--wateeni-blue);
    outline-offset: 2px;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-container input[type="checkbox"]:focus-visible + .checkmark {
    outline: 2px solid var(--wateeni-blue);
    outline-offset: 2px;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-inactive);
    border-radius: var(--radius-sm);
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: var(--wateeni-gradient);
    border-color: transparent;
    transform: scale(1.1);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
}

.checkbox-text {
    color: var(--text-secondary);
    font-weight: 500;
}

.checkbox-text a {
    color: var(--wateeni-blue);
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 2px 4px;
    margin: -2px -4px;
}

.checkbox-text a:hover {
    text-decoration: underline;
}

.checkbox-text a:focus-visible {
    outline: 2px solid var(--wateeni-blue);
    outline-offset: 2px;
}

/* Buttons - iOS Style */
.btn-auth {
    width: 100%;
    padding: 13px var(--spacing-md);
    background: var(--wateeni-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    margin: var(--spacing-xl) 0 var(--spacing-lg) 0;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.btn-auth:focus-visible {
    outline: 3px solid var(--wateeni-blue);
    outline-offset: 3px;
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-auth:disabled:focus-visible {
    outline: 2px solid var(--text-secondary);
}

.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    border-top-color: white;
    animation: spin 1s linear infinite;
}

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

/* Form Links */
.form-links {
    text-align: center;
    margin-top: var(--spacing-lg);
}

.form-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    margin: -4px -8px;
}

.form-links a:hover {
    color: var(--wateeni-blue);
    text-decoration: underline;
}

.form-links a:focus-visible {
    outline: 2px solid var(--wateeni-blue);
    outline-offset: 2px;
    color: var(--wateeni-blue);
}

/* App Download */
.app-download {
    text-align: center;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(142, 142, 147, 0.2);
}

.app-download p {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-size: 0.8rem;
    font-weight: 600;
}

.store-badges img {
    height: 32px;
    transition: transform 0.3s ease;
    border-radius: var(--radius-md);
}

.store-badges img:hover {
    transform: scale(1.05) translateY(-2px);
}

/* Footer */
.simple-footer {
    margin-top: var(--spacing-5xl);
    padding: var(--spacing-4xl);
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.footer-links {
    display: flex;
    gap: var(--spacing-3xl);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    margin: -4px -8px;
}

.footer-links a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.footer-links a:focus-visible {
    outline: 2px solid var(--wateeni-blue);
    outline-offset: 2px;
    color: var(--wateeni-blue);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        padding: var(--spacing-3xl) var(--spacing-lg);
        gap: var(--spacing-4xl);
    }
    
    .auth-container {
        order: 1;
        width: 100%;
        min-height: auto;
        position: relative;
    }
    
    .app-showcase {
        order: 2;
    }
    
    .phone-mockup {
        width: 240px;
        height: 480px;
        transform: none;
    }
    
    .auth-view {
        position: relative;
        width: 100%;
        height: auto;
        transform: none !important;
        opacity: 1;
    }
    
    .auth-view:not(.active) {
        display: none;
    }
    
    .auth-view.active {
        display: block;
    }
    
    .auth-box {
        padding: var(--spacing-4xl) var(--spacing-3xl);
        background: var(--bg-secondary);
        backdrop-filter: none;
    }
    
    .logo h1 {
        font-size: 2.75rem;
    }
}

/* Enhanced input states */
.auth-input-wrapper.valid {
    border-color: var(--text-success);
    box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.1);
}

.auth-input-wrapper.invalid {
    border-color: var(--text-error);
    box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.1);
}

/* Toast styles */
.error-toast,
.success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-secondary);
    backdrop-filter: saturate(180%) blur(20px);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-strong);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    max-width: 300px;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000;
    border-left: 4px solid;
}

.error-toast { border-left-color: #FF3B30; }
.success-toast { border-left-color: #34C759; }

.error-toast.show,
.success-toast.show {
    transform: translateX(0);
}

.toast-message {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
}

.mini-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(88, 86, 214, 0.3);
    border-radius: 50%;
    border-top-color: var(--wateeni-purple);
    animation: spin 1s linear infinite;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #1C1C1E;
        --bg-material: rgba(28, 28, 30, 0.8);
        --text-primary: #FFFFFF;
        --text-secondary: #8E8E93;
        --border-inactive: rgba(142, 142, 147, 0.2);
    }
}
