diff --git a/frontend/package-lock.json b/frontend/package-lock.json index e1c0a29..1e20d46 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -75,6 +75,7 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.7.tgz", "integrity": "sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==", "dev": true, + "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.23.5", @@ -1306,6 +1307,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.18.1.tgz", "integrity": "sha512-zct/MdJnVaRRNy9e84XnVtRv9Vf91/qqe+hZJtKanjojud4wAVy/7lXxJmMyX6X6J+xc6c//YEWvpeif8cAhWA==", "dev": true, + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "6.18.1", "@typescript-eslint/types": "6.18.1", @@ -1486,6 +1488,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -1600,6 +1603,7 @@ "url": "https://github.com/sponsors/ai" } ], + "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001565", "electron-to-chromium": "^1.4.601", @@ -1836,6 +1840,7 @@ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "dev": true, + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -2836,6 +2841,7 @@ "version": "18.2.0", "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -2847,6 +2853,7 @@ "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.0" @@ -3195,6 +3202,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "dev": true, + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -3247,6 +3255,7 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.11.tgz", "integrity": "sha512-XBMnDjZcNAw/G1gEiskiM1v6yzM4GE5aMGvhWTlHAYYhxb7S3/V1s3m2LDHa8Vh6yIWYYB0iJwsEaS523c4oYA==", "dev": true, + "peer": true, "dependencies": { "esbuild": "^0.19.3", "postcss": "^8.4.32", @@ -3403,6 +3412,7 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.7.tgz", "integrity": "sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==", "dev": true, + "peer": true, "requires": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.23.5", @@ -4192,6 +4202,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.18.1.tgz", "integrity": "sha512-zct/MdJnVaRRNy9e84XnVtRv9Vf91/qqe+hZJtKanjojud4wAVy/7lXxJmMyX6X6J+xc6c//YEWvpeif8cAhWA==", "dev": true, + "peer": true, "requires": { "@typescript-eslint/scope-manager": "6.18.1", "@typescript-eslint/types": "6.18.1", @@ -4292,7 +4303,8 @@ "version": "8.11.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "dev": true + "dev": true, + "peer": true }, "acorn-jsx": { "version": "5.3.2", @@ -4369,6 +4381,7 @@ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz", "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==", "dev": true, + "peer": true, "requires": { "caniuse-lite": "^1.0.30001565", "electron-to-chromium": "^1.4.601", @@ -4546,6 +4559,7 @@ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "dev": true, + "peer": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -5267,6 +5281,7 @@ "version": "18.2.0", "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "peer": true, "requires": { "loose-envify": "^1.1.0" } @@ -5275,6 +5290,7 @@ "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "peer": true, "requires": { "loose-envify": "^1.1.0", "scheduler": "^0.23.0" @@ -5510,7 +5526,8 @@ "version": "5.3.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", - "dev": true + "dev": true, + "peer": true }, "update-browserslist-db": { "version": "1.0.13", @@ -5536,6 +5553,7 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.11.tgz", "integrity": "sha512-XBMnDjZcNAw/G1gEiskiM1v6yzM4GE5aMGvhWTlHAYYhxb7S3/V1s3m2LDHa8Vh6yIWYYB0iJwsEaS523c4oYA==", "dev": true, + "peer": true, "requires": { "esbuild": "^0.19.3", "fsevents": "~2.3.3", diff --git a/frontend/src/App.css b/frontend/src/App.css index 15d7c2d..5623289 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -20,31 +20,25 @@ --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0,0,0,0.02); } -/* --- 2. DARK MODE OVERRIDES (The Concrete Paper Look) --- */ +/* --- 2. DARK MODE OVERRIDES --- */ body.dark-mode { --brand-primary: #ffffff; --brand-secondary: #e5e5e5; --brand-accent: #a3a3a3; - --text-body: #e0e0e0; /* Slightly softer white for readability */ + --text-body: #e0e0e0; --text-muted: #888888; - --bg-main: #121212; /* Deepest charcoal base */ - --bg-card: #1c1c1c; /* Lighter charcoal for cards */ - --bg-benefit: #252525; /* Distinct grey for benefits */ + --bg-main: #121212; + --bg-card: #1c1c1c; + --bg-benefit: #252525; --border-subtle: rgba(255, 255, 255, 0.1); - - /* Deep, ambient shadows for the dark theme */ --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.7); --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5); - /* --- THE DARK CONCRETE TEXTURE MAGIC --- */ background-color: var(--bg-main); background-image: - /* 1. The Grain (Noise) */ url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.15'/%3E%3C/svg%3E"), - /* 2. The Lighting (Vignette) - Makes it look 3D/Textured */ radial-gradient(circle at 50% 0%, rgba(255,255,255,0.03) 0%, rgba(0,0,0,0.5) 100%); - - background-attachment: fixed; /* Keeps texture still while scrolling */ + background-attachment: fixed; } /* --- 3. GLOBAL BASE --- */ @@ -55,7 +49,6 @@ html, body { min-height: 100%; } body { margin: 0; min-height: 100vh; - /* Light Mode Texture (The White Paper) */ background-color: var(--bg-main); background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E"); color: var(--text-body); @@ -69,58 +62,36 @@ body.room-active { height: 100vh; overflow: hidden; } /* --- 4. THEME TOGGLE BUTTON --- */ .theme-toggle { - position: fixed; - bottom: 30px; - left: 30px; - width: 48px; - height: 48px; - border-radius: 50%; - background: var(--bg-card); - border: 1px solid var(--border-subtle); - color: var(--text-body); - font-size: 1.2rem; - cursor: pointer; - box-shadow: var(--shadow-md); - display: flex; - align-items: center; - justify-content: center; - transition: all 0.3s ease; - z-index: 1000; + position: fixed; bottom: 30px; left: 30px; + width: 48px; height: 48px; border-radius: 50%; + background: var(--bg-card); border: 1px solid var(--border-subtle); + color: var(--text-body); font-size: 1.2rem; cursor: pointer; + box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center; + transition: all 0.3s ease; z-index: 1000; } .theme-toggle:hover { transform: scale(1.1); } -/* --- 5. LANDING PAGE STYLING --- */ +/* --- 5. LANDING PAGE STYLING (UNTOUCHED) --- */ .landing-screen { position: relative; min-height: 100vh; padding: clamp(24px, 4vw, 48px) clamp(16px, 5vw, 64px); - display: flex; - flex-direction: column; - gap: clamp(24px, 4vw, 48px); + display: flex; flex-direction: column; gap: clamp(24px, 4vw, 48px); } .landing-nav { - width: 100%; - display: flex; - align-items: center; - justify-content: space-between; - padding: 16px 32px; - border-radius: 12px; - background: var(--bg-card); - box-shadow: var(--shadow-md); - border: 1px solid var(--border-subtle); + width: 100%; display: flex; align-items: center; justify-content: space-between; + padding: 16px 32px; border-radius: 12px; + background: var(--bg-card); box-shadow: var(--shadow-md); border: 1px solid var(--border-subtle); transition: background-color 0.3s, border-color 0.3s; } .brand { display: flex; align-items: center; gap: 12px; } .logo-mark { - width: 48px; height: 48px; - border-radius: 10px; - background: var(--brand-primary); - color: var(--bg-card); + width: 48px; height: 48px; border-radius: 10px; + background: var(--brand-primary); color: var(--bg-card); display: flex; align-items: center; justify-content: center; - font-weight: 700; - letter-spacing: 0.04em; + font-weight: 700; letter-spacing: 0.04em; transition: background-color 0.3s, color 0.3s; } .brand-label { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--text-body); } @@ -131,62 +102,42 @@ body.room-active { height: 100vh; overflow: hidden; } .nav-links a:hover { color: var(--brand-primary); } .nav-cta { padding-inline: 28px; } -/* Tagline (Pill Shape) */ .tagline { - letter-spacing: 0.15em; - text-transform: uppercase; - font-size: 0.75rem; - color: var(--text-muted); - margin: 0 0 12px; - background: transparent; - border-radius: 999px; - padding: 6px 12px; - border: 1px solid var(--border-subtle); - display: inline-block; - font-weight: 500; - transition: border-color 0.3s, color 0.3s; + letter-spacing: 0.15em; text-transform: uppercase; font-size: 0.75rem; + color: var(--text-muted); margin: 0 0 12px; background: transparent; + border-radius: 999px; padding: 6px 12px; border: 1px solid var(--border-subtle); + display: inline-block; font-weight: 500; transition: border-color 0.3s, color 0.3s; } .subhead { color: var(--text-muted); margin-top: 12px; font-size: 1rem; } .landing-hero { - width: 100%; - display: grid; + width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); - gap: clamp(32px, 5vw, 56px); - align-items: stretch; + gap: clamp(32px, 5vw, 56px); align-items: stretch; } .hero-content { display: flex; flex-direction: column; gap: 24px; } .hero-content h1 { - font-size: clamp(2.5rem, 5vw, 3.6rem); - margin: 0; - color: var(--text-body); - letter-spacing: -0.03em; + font-size: clamp(2.5rem, 5vw, 3.6rem); margin: 0; + color: var(--text-body); letter-spacing: -0.03em; } -/* Stats */ .hero-stats { display: flex; flex-wrap: wrap; gap: 16px; } .stat-pill { - flex: 1; - min-width: 140px; - padding: 18px 20px; - border-radius: 12px; - border: 1px solid var(--border-subtle); - background: var(--bg-card); - box-shadow: var(--shadow-md); + flex: 1; min-width: 140px; padding: 18px 20px; + border-radius: 12px; border: 1px solid var(--border-subtle); + background: var(--bg-card); box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 4px; transition: background-color 0.3s, border-color 0.3s; } .stat-value { font-size: 1.4rem; font-weight: 600; color: var(--text-body); } .stat-label { font-size: 0.85rem; color: var(--text-muted); } -/* Benefits */ .hero-benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; } .benefit { display: flex; gap: 12px; padding: 16px; border-radius: 12px; - background: var(--bg-benefit); - border: 1px solid var(--border-subtle); + background: var(--bg-benefit); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-md); transition: transform 0.2s, border-color 0.3s, background-color 0.3s; } @@ -195,60 +146,46 @@ body.room-active { height: 100vh; overflow: hidden; } .benefit-title { margin: 0; font-weight: 600; color: var(--text-body); } .benefit-copy { margin: 4px 0 0; color: var(--text-muted); font-size: 0.9rem; } -/* Right Panel */ .hero-panel { display: grid; grid-template-columns: 1fr; gap: 20px; } .panel-card { - border-radius: 16px; - background: var(--bg-card); - box-shadow: var(--shadow-lg); - border: 1px solid var(--border-subtle); - padding: 24px; - transition: background-color 0.3s, border-color 0.3s; + border-radius: 16px; background: var(--bg-card); + box-shadow: var(--shadow-lg); border: 1px solid var(--border-subtle); + padding: 24px; transition: background-color 0.3s, border-color 0.3s; } .preview-panel { display: flex; flex-direction: column; gap: 12px; } .video-frame { - width: 100%; aspect-ratio: 4 / 3; - border-radius: 12px; - background: var(--bg-benefit); - object-fit: cover; + width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; + background: var(--bg-benefit); object-fit: cover; border: 1px solid var(--border-subtle); transition: background-color 0.3s, border-color 0.3s; } .preview-video { width: 100%; border-radius: 12px; overflow: hidden; } .preview-label { font-size: 0.9rem; color: var(--text-muted); } -/* Form */ .form-wrapper { display: flex; flex-direction: column; gap: 16px; } .verified-pill { margin: 0; font-weight: 600; font-size: 0.9rem; - color: #059669; - background: rgba(16, 185, 129, 0.1); + color: #059669; background: rgba(16, 185, 129, 0.1); border-radius: 999px; padding: 8px 14px; display: inline-flex; align-items: center; border: 1px solid rgba(16, 185, 129, 0.2); } .alert { - background: rgba(220, 38, 38, 0.1); - border: 1px solid rgba(220, 38, 38, 0.2); - border-radius: 12px; padding: 12px 16px; - color: #dc2626; + background: rgba(220, 38, 38, 0.1); border: 1px solid rgba(220, 38, 38, 0.2); + border-radius: 12px; padding: 12px 16px; color: #dc2626; } .form-section { display: flex; flex-direction: column; gap: 16px; } .field-label { font-weight: 600; color: var(--text-body); } .input-field { - width: 100%; padding: 14px 16px; - border-radius: 12px; - border: 1px solid var(--border-subtle); - background: var(--bg-main); - color: var(--text-body); - font-size: 1rem; + width: 100%; padding: 14px 16px; border-radius: 12px; + border: 1px solid var(--border-subtle); background: var(--bg-main); + color: var(--text-body); font-size: 1rem; transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.3s; } .input-field:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05); } .helper-text { font-size: 0.8rem; color: var(--text-muted); } -/* Buttons */ .actions-row { display: flex; gap: 12px; flex-wrap: wrap; } .btn { border: none; border-radius: 12px; padding: 14px 18px; @@ -260,74 +197,199 @@ body.room-active { height: 100vh; overflow: hidden; } .btn.primary { background: var(--brand-primary); color: var(--bg-card); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); } .btn.secondary { background: var(--bg-main); color: var(--brand-primary); border: 1px solid var(--border-subtle); } -/* --- ROOM LAYOUT --- */ -.room-container { position: relative; min-height: 100vh; padding: 0; display: flex; align-items: stretch; justify-content: center; background: var(--bg-main); transition: background-color 0.3s; } -.room-shell { width: 100%; max-width: none; height: 100vh; background: var(--bg-main); border: none; border-radius: 0; padding: clamp(16px, 3vw, 32px); box-shadow: none; backdrop-filter: none; position: relative; overflow: hidden; display: flex; flex-direction: column; transition: background-color 0.3s; } -.room-shell::after { content: none; } -.room-header h2 { margin: 0; font-size: clamp(2.2rem, 4vw, 3rem); color: var(--text-body); } -.room-shell { width: min(1100px, 100%); } -.room-connected .room-shell { width: 100%; max-width: none; height: 100vh; display: flex; flex-direction: column; } -.room-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-start; gap: 16px; margin-bottom: 32px; } -.room-header .status-pill { margin-left: auto; } -.status-pill { padding: 8px 16px; border-radius: 999px; font-size: 0.9rem; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; transition: all 0.3s; } -.status-pill.waiting { background: rgba(0, 0, 0, 0.05); color: var(--text-body); border: 1px solid var(--border-subtle); } -body.dark-mode .status-pill.waiting { background: rgba(255, 255, 255, 0.05); } -.status-pill.connected { background: rgba(16, 185, 129, 0.1); color: #059669; border: 1px solid rgba(16, 185, 129, 0.2); } -.room-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-bottom: 32px; } -.room-connected .room-grid { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; } -.room-connected .video-card { height: 100%; display: flex; flex-direction: column; } -.room-connected .video-card .video-frame { flex: 1; height: 100%; } -.video-card { background: var(--bg-card); border-radius: 16px; border: 1px solid var(--border-subtle); padding: 20px; position: relative; box-shadow: var(--shadow-md); transition: all 0.3s; } -.video-card h3 { margin: 0 0 12px; font-size: 1.1rem; color: var(--text-body); } -.room-layout { display: grid; grid-template-columns: minmax(0, 2.8fr) minmax(300px, 360px); gap: 32px; flex: 1; min-height: 0; } -.video-stack { position: relative; height: 100%; } -.video-card.remote-card { padding: 16px; height: 100%; display: flex; flex-direction: column; } -.video-meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; } -.video-meta h3 { margin: 0; font-size: 1.2rem; color: var(--text-body); } -.video-meta span { color: var(--text-muted); font-size: 0.9rem; } -.remote-frame { width: 100%; flex: 1; min-height: 0; height: 100%; aspect-ratio: auto; object-fit: contain; background: var(--bg-benefit); border-radius: 12px; border: 1px solid var(--border-subtle); transition: all 0.3s; } -.mirror { transform: scaleX(-1); } -.chat-column { display: flex; flex-direction: column; gap: 24px; } -.chat-panel { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 16px; padding: 20px; margin-bottom: 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow-md); transition: all 0.3s; } -.chat-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; } -.chat-header h4 { margin: 0; font-size: 1rem; color: var(--text-body); } -.chat-header span { font-size: 0.85rem; color: var(--text-muted); } -.chat-messages { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 6px; } -.chat-empty { margin: 0; color: var(--text-muted); font-size: 0.9rem; } -.chat-message { border-radius: 12px; padding: 10px 14px; max-width: 70%; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--border-subtle); transition: all 0.3s; } -.chat-message.self { align-self: flex-end; background: var(--brand-primary); color: var(--bg-card); border-color: var(--brand-primary); } -.chat-message.peer { align-self: flex-start; background: var(--bg-main); border-color: var(--border-subtle); } -.chat-author { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); } -.chat-message p { margin: 0; font-size: 0.95rem; } -.chat-message.self p { color: var(--bg-card); } -.chat-message.peer p { color: var(--text-body); } -.chat-input-row { display: flex; gap: 12px; align-items: center; } -.chat-input-row .input-field { flex: 1; } -.controls { display: flex; justify-content: center; gap: 16px; } -.chat-controls { margin-top: 18px; justify-content: space-between; } -.self-card { padding: 16px; } -.self-frame { width: 100%; min-height: 220px; border-radius: 12px; object-fit: contain; background: var(--bg-benefit); border: 1px solid var(--border-subtle); transition: all 0.3s; } - -@media (max-width: 640px) { - .landing-nav { flex-direction: column; gap: 16px; padding: 16px 20px; } - .landing-hero { grid-template-columns: 1fr; } - .room-shell { padding: 24px; } - .actions-row { flex-direction: column; } - .controls { flex-direction: column; } - .room-layout { grid-template-columns: 1fr; } - .remote-frame { min-height: 320px; } - .pip-card { position: static; width: 100%; } -} /* --- ICON POLISH --- */ .theme-toggle svg { - width: 22px; - height: 22px; - stroke-width: 1.5px; /* Thinner, sharper lines for that "technical" feel */ - opacity: 0.8; - transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1); + width: 22px; height: 22px; stroke-width: 1.5px; + opacity: 0.8; transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1); +} +.theme-toggle:active svg { transform: rotate(90deg) scale(0.8); } + + +/* --- 6. INSTAGRAM-STYLE DASHBOARD LAYOUT (The Connection Page) --- */ + +/* Fixed overlay for the dashboard app */ +.insta-dashboard { + position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; + background: var(--bg-main); color: var(--text-body); + display: flex; overflow: hidden; z-index: 999; +} + +/* --- LEFT SIDEBAR (Updated Icons) --- */ +.left-nav { + width: 72px; height: 100%; background: var(--bg-card); + border-right: 1px solid var(--border-subtle); + display: flex; flex-direction: column; padding: 24px 12px; gap: 32px; + transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 100; position: relative; +} +.left-nav:hover { width: 240px; box-shadow: 4px 0 24px rgba(0,0,0,0.05); } + +.nav-brand { + display: flex; align-items: center; gap: 16px; overflow: hidden; + white-space: nowrap; padding-left: 4px; +} +.nst-logo-icon { + min-width: 40px; height: 40px; background: #000; color: #fff; + border-radius: 12px; display: flex; align-items: center; justify-content: center; + font-weight: 800; font-size: 0.9rem; letter-spacing: 0.05em; +} +.brand-text { font-weight: 700; font-size: 1rem; opacity: 0; transition: opacity 0.2s; } +.left-nav:hover .brand-text { opacity: 1; } + +.nav-menu { display: flex; flex-direction: column; gap: 8px; } + +/* UPDATED NAV ITEM: Bigger & Rounder */ +.nav-item { + display: flex; align-items: center; gap: 16px; + padding: 14px; /* Bigger padding */ + border-radius: 18px; /* Rounder corners */ + cursor: pointer; color: var(--text-body); text-decoration: none; + transition: background 0.2s; overflow: hidden; white-space: nowrap; +} +.nav-item:hover { background: var(--bg-benefit); } + +.nav-item svg { + min-width: 26px; height: 26px; /* Slightly bigger icon */ + stroke-width: 2px; +} +.nav-label { opacity: 0; transition: opacity 0.2s; font-weight: 500; } +.left-nav:hover .nav-label { opacity: 1; } + +.nav-section-title { + font-size: 0.75rem; color: var(--text-muted); + text-transform: uppercase; letter-spacing: 0.1em; + padding-left: 12px; margin-top: 16px; margin-bottom: 8px; + opacity: 0; display: none; +} +.left-nav:hover .nav-section-title { opacity: 1; display: block; } + +/* --- CENTER STAGE --- */ +.center-stage { + flex: 1; position: relative; display: flex; flex-direction: column; + background: var(--bg-main); +} +.center-header-area { + padding: 20px 24px 10px; display: flex; flex-direction: column; gap: 8px; +} +.signed-in-badge { + display: inline-block; padding: 4px 12px; border-radius: 999px; + border: 1px solid var(--border-subtle); font-size: 0.75rem; + font-weight: 600; color: var(--text-muted); width: fit-content; +} +.center-header-title { + font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; margin: 0; +} + +.video-stage-flex-container { + flex: 1; position: relative; min-height: 0; background: #000; + margin: 0 24px; border-radius: 16px; overflow: hidden; + border: 1px solid rgba(0,0,0,0.1); +} +.remote-video-full { width: 100%; height: 100%; object-fit: cover; } +.loading-state-wrapper { + width: 100%; height: 100%; display: flex; flex-direction: column; + align-items: center; justify-content: center; color: #666; gap: 12px; +} + +.bottom-controls { + padding: 24px; display: flex; justify-content: center; gap: 16px; + background: transparent; +} +.control-btn { + padding: 12px 32px; border-radius: 99px; font-weight: 600; font-size: 1rem; + border: none; cursor: pointer; box-shadow: 0 4px 20px rgba(0,0,0,0.3); + transition: transform 0.2s; +} +.control-btn:hover { transform: translateY(-2px); } +.btn-skip { background: var(--bg-card); color: var(--text-body); border: 1px solid var(--border-subtle); } +.btn-report { background: #dc2626; color: #fff; } + +/* --- RIGHT SIDEBAR --- */ +.right-panel { + width: 360px; background: var(--bg-card); + border-left: 1px solid var(--border-subtle); + display: flex; flex-direction: column; padding: 20px; gap: 20px; +} +.sidebar-points-area { text-align: center; padding-bottom: 12px; } +.points-pill-green { + background: rgba(16, 185, 129, 0.1); color: #059669; + padding: 6px 12px; border-radius: 999px; + font-size: 0.85rem; font-weight: 600; +} +.top-right-actions { display: flex; justify-content: flex-end; } +.login-btn { + background: var(--brand-primary); color: var(--bg-card); + padding: 8px 20px; border-radius: 6px; font-weight: 600; border: none; +} +.right-chat-box { + flex: 1; background: var(--bg-main); border: 1px solid var(--border-subtle); + border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; +} +.chat-scroll { flex: 1; padding: 12px; } +.chat-input-bar { + padding: 12px; background: var(--bg-card); + border-top: 1px solid var(--border-subtle); display: flex; gap: 8px; +} +.local-cam-box { + height: 200px; border-radius: 12px; overflow: hidden; + border: 2px solid var(--border-subtle); background: #111; position: relative; +} +.local-video-feed { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); } +.cam-label { + position: absolute; bottom: 8px; left: 8px; + color: #fff; font-size: 0.75rem; font-weight: 600; + text-shadow: 0 1px 4px rgba(0,0,0,0.8); +} +/* --- COMPACT & SLEEK CHAT INPUT --- */ +.chat-input-bar { + padding: 12px 16px; /* Tighter spacing */ + background: var(--bg-card); + border-top: 1px solid var(--border-subtle); + display: flex; + align-items: center; + gap: 10px; +} + +/* The "Box" where you type */ +.input-field-chat { + flex: 1; + height: 40px; /* Reduced height (was 50px) */ + padding: 0 16px; + border-radius: 20px; /* Perfect pill shape */ + background: var(--bg-main); + border: 1px solid transparent; + color: var(--text-body); + font-size: 0.95rem; + transition: all 0.2s ease; +} + +/* Focus State */ +.input-field-chat:focus { + outline: none; + background: var(--bg-card); + border-color: var(--border-subtle); + box-shadow: 0 2px 8px rgba(0,0,0,0.05); +} + +/* The Send Button */ +.chat-input-bar .btn.primary { + height: 40px; /* Matches input height exactly */ + border-radius: 20px; + padding: 0 20px; /* Less horizontal padding */ + display: flex; + align-items: center; + gap: 6px; + font-weight: 600; + font-size: 0.9rem; + box-shadow: none; +} +/* Find the .bottom-controls section and ADD this new class */ + +.btn-friend { + background: #3b82f6; /* Bright Action Blue */ + color: #ffffff; } -/* Rotate animation when clicked */ -.theme-toggle:active svg { - transform: rotate(90deg) scale(0.8); +.btn-friend:hover { + background: #2563eb; + box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); } \ No newline at end of file diff --git a/frontend/src/components/Landing.tsx b/frontend/src/components/Landing.tsx index cad9869..96033eb 100644 --- a/frontend/src/components/Landing.tsx +++ b/frontend/src/components/Landing.tsx @@ -14,10 +14,15 @@ export const Landing = () => { const [localVideoTrack, setlocalVideoTrack] = useState(null); const videoRef = useRef(null); const [theme, setTheme] = useState<'light' | 'dark'>('light'); + + // Dashboard Refs + const remoteVideoRef = useRef(null); + const [remoteStream, setRemoteStream] = useState(null); -useEffect(() => { - document.body.className = theme === 'dark' ? 'dark-mode' : ''; -}, [theme]); + useEffect(() => { + document.body.className = theme === 'dark' ? 'dark-mode' : ''; + }, [theme]); + const [joined, setJoined] = useState(false); const getCam = async () => { @@ -159,6 +164,9 @@ useEffect(() => { setJoined(false); }; + // ========================================================================= + // 1. LANDING PAGE (UNCHANGED) + // ========================================================================= if (!joined) { return (
@@ -345,13 +353,111 @@ useEffect(() => { ) } + // ========================================================================= + // 2. CHATTING DASHBOARD (Joined = true) + // ========================================================================= return ( - - ) +
+ {/* --- LEFT SIDEBAR --- */} + + + {/* --- CENTER STAGE --- */} +
+
+ SIGNED IN AS {name.toUpperCase()} +

NST Network

+
+ +
+ {remoteStream ? ( +
+ +
+ + + {/* NEW BUTTON */} + + + +
+
+ + {/* --- RIGHT PANEL --- */} + +
+ ); } \ No newline at end of file