Files
SocialMediaApp/styles/main.css
2026-01-29 16:41:37 +11:00

1025 lines
19 KiB
CSS

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');
:root {
/* Premium Ultra Dark Palette */
--bg-dark: #0A0A0B;
/* Near Black */
--bg-card: rgba(255, 255, 255, 0.03);
--bg-card-hover: rgba(255, 255, 255, 0.07);
/* Brand Gradients - Monochrome */
--primary-gradient: linear-gradient(135deg, #404040 0%, #171717 100%);
--accent-glow: #525252;
/* Text Colors */
--text-main: #EDEDED;
--text-muted: rgba(255, 255, 255, 0.5);
--text-placeholder: rgba(255, 255, 255, 0.2);
/* Borders & Glassmorphism */
--glass-border: rgba(255, 255, 255, 0.08);
--glass-highlight: rgba(255, 255, 255, 0.1);
/* Spacing & Layout */
--radius-lg: 24px;
--radius-md: 16px;
--radius-sm: 12px;
--radius-full: 9999px;
/* Animation */
--transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
--transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
body {
font-family: 'Outfit', sans-serif;
background-color: var(--bg-dark);
color: var(--text-main);
min-height: 100vh;
overflow-x: hidden;
/* Clean grainy texture for premium feel */
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.65' 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");
display: flex;
justify-content: center;
align-items: center;
}
/* Utilities */
.hidden {
display: none;
}
.fade-in {
animation: fadeIn 0.6s ease-out forwards;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Login Page Styles */
/* Background Orbs & Animation */
.login-container {
position: relative;
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
.orb {
position: absolute;
border-radius: 50%;
filter: blur(80px);
z-index: 0;
opacity: 0.6;
animation: float 10s infinite ease-in-out;
}
.orb-1 {
width: 300px;
height: 300px;
background: #262626;
/* Dark Neutral Grey */
top: -50px;
left: -50px;
}
.orb-2 {
width: 400px;
height: 400px;
background: #171717;
/* Very Dark Grey */
bottom: -100px;
right: -100px;
animation-delay: -5s;
}
@keyframes float {
0%,
100% {
transform: translate(0, 0);
}
50% {
transform: translate(30px, 50px);
}
}
/* Glass Card */
.login-card {
position: relative;
z-index: 10;
width: 90%;
max-width: 400px;
background: var(--bg-card);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border: 1px solid var(--glass-border);
border-top: 1px solid var(--glass-highlight);
border-radius: var(--radius-lg);
padding: 40px 30px;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
display: flex;
flex-direction: column;
gap: 32px;
}
/* Brand Section */
.brand-section {
text-align: center;
}
.logo-icon {
width: 60px;
height: 60px;
background: var(--primary-gradient);
border-radius: var(--radius-md);
display: inline-flex;
justify-content: center;
align-items: center;
font-size: 32px;
font-weight: 700;
color: white;
margin-bottom: 20px;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}
h1 {
font-size: 28px;
font-weight: 700;
margin-bottom: 8px;
color: var(--text-main);
}
p {
color: var(--text-muted);
font-size: 15px;
}
/* Input Fields */
.input-group {
position: relative;
margin-bottom: 20px;
}
.input-group input {
width: 100%;
background: rgba(0, 0, 0, 0.2);
border: 1px solid var(--glass-border);
border-radius: var(--radius-md);
padding: 16px 16px 6px;
/* pt pb */
height: 56px;
color: var(--text-main);
font-size: 16px;
font-family: inherit;
outline: none;
transition: var(--transition-fast);
}
.input-group input:focus {
border-color: var(--accent-glow);
background: rgba(0, 0, 0, 0.3);
box-shadow: 0 0 0 4px rgba(82, 82, 82, 0.2);
}
.input-group label {
position: absolute;
left: 16px;
top: 50%;
transform: translateY(-50%);
color: var(--text-muted);
font-size: 16px;
pointer-events: none;
transition: var(--transition-fast);
}
/* Label Float Animation */
.input-group input:focus+label,
.input-group input:not(:placeholder-shown)+label {
top: 14px;
font-size: 11px;
color: rgba(255, 255, 255, 0.8);
font-weight: 600;
letter-spacing: 0.5px;
}
/* Buttons */
.btn-primary {
width: 100%;
height: 54px;
border: none;
border-radius: var(--radius-full);
background: var(--primary-gradient);
color: white;
font-size: 16px;
font-weight: 600;
font-family: inherit;
cursor: pointer;
position: relative;
overflow: hidden;
margin-top: 10px;
transition: transform var(--transition-fast);
box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
}
.btn-primary:active {
transform: scale(0.98);
}
.forgot-pass {
display: block;
text-align: right;
color: var(--text-muted);
text-decoration: none;
font-size: 13px;
margin-top: -10px;
margin-bottom: 20px;
transition: color 0.2s;
}
.forgot-pass:hover {
color: white;
}
/* Divider */
.divider {
display: flex;
align-items: center;
color: var(--text-placeholder);
font-size: 13px;
margin: 10px 0;
}
.divider::before,
.divider::after {
content: '';
flex: 1;
height: 1px;
background: var(--glass-border);
}
.divider span {
padding: 0 10px;
}
/* Social Login */
.social-login {
display: flex;
gap: 16px;
justify-content: center;
}
.btn-social {
width: 50px;
height: 50px;
border-radius: var(--radius-full);
border: 1px solid var(--glass-border);
background: var(--bg-card);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: var(--transition-fast);
color: white;
}
.btn-social:hover {
background: var(--bg-card-hover);
transform: translateY(-2px);
}
.social-icon {
width: 24px;
height: 24px;
}
.signup-link {
text-align: center;
margin-top: 10px;
color: var(--text-muted);
}
/* --- FEED VIEW STYLES --- */
#feed-view {
width: 100%;
max-width: 480px;
/* Mobile width constraint */
min-height: 100vh;
background: var(--bg-dark);
position: relative;
padding-bottom: 80px;
/* Space for bottom nav */
}
/* Header */
.feed-header {
position: sticky;
top: 0;
z-index: 50;
background: rgba(10, 10, 11, 0.8);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 20px;
border-bottom: 1px solid var(--glass-border);
}
.header-logo {
font-size: 24px;
font-weight: 700;
font-family: 'Outfit', sans-serif;
background: var(--primary-gradient);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
letter-spacing: -0.5px;
}
/* Stories */
.stories-container {
display: flex;
gap: 15px;
padding: 15px 20px;
overflow-x: auto;
scrollbar-width: none;
/* Hide scrollbar Firefox */
-ms-overflow-style: none;
/* Hide scrollbar IE/Edge */
}
.stories-container::-webkit-scrollbar {
display: none;
/* Hide scrollbar Chrome/Safari */
}
.story-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
min-width: 70px;
cursor: pointer;
}
.story-ring {
width: 68px;
height: 68px;
border-radius: 50%;
background: linear-gradient(45deg, #FFB800, #FF3D00, #D500F9);
padding: 2px;
display: flex;
justify-content: center;
align-items: center;
}
.story-ring.add-story {
background: var(--glass-border);
}
.story-avatar {
width: 100%;
height: 100%;
border-radius: 50%;
border: 3px solid var(--bg-dark);
object-fit: cover;
}
.story-item span {
font-size: 11px;
color: var(--text-main);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
text-align: center;
}
/* Feed & Posts */
.feed-container {
display: flex;
flex-direction: column;
gap: 20px;
}
.post-card {
background: transparent;
border-top: 1px solid var(--glass-border);
padding-bottom: 15px;
}
.post-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 15px;
}
.post-user {
display: flex;
align-items: center;
gap: 10px;
}
.avatar-sm {
width: 32px;
height: 32px;
border-radius: 50%;
object-fit: cover;
}
.username {
font-weight: 600;
font-size: 14px;
}
.icon-btn-sm {
background: none;
border: none;
color: var(--text-main);
cursor: pointer;
font-size: 20px;
padding: 5px;
}
.post-image {
width: 100%;
aspect-ratio: 4/5;
background: #111;
overflow: hidden;
}
.post-image img {
width: 100%;
height: 100%;
object-fit: cover;
}
.post-actions {
display: flex;
justify-content: space-between;
padding: 12px 15px;
}
.action-left {
display: flex;
gap: 16px;
}
.icon-btn {
background: none;
border: none;
padding: 0;
cursor: pointer;
display: flex;
align-items: center;
transition: transform 0.1s;
}
.icon-btn:active {
transform: scale(0.9);
}
.post-content {
padding: 0 15px;
}
.likes {
font-weight: 700;
font-size: 14px;
display: block;
margin-bottom: 6px;
}
.post-content p {
font-size: 14px;
line-height: 1.4;
color: var(--text-main);
}
/* Feed Interactions */
.icon-btn .heart-icon.liked {
fill: #EF4444;
stroke: #EF4444;
animation: likeBounce 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes likeBounce {
0% {
transform: scale(1);
}
50% {
transform: scale(1.3);
}
100% {
transform: scale(1);
}
}
/* Comment Section */
.comment-section {
padding: 0 15px 15px;
display: none;
/* Hidden by default */
}
.comment-section.active {
display: block;
animation: fadeIn 0.3s ease-out;
}
.comment-input-wrapper {
display: flex;
gap: 10px;
margin-top: 10px;
}
.comment-input {
flex: 1;
background: rgba(255, 255, 255, 0.05);
border: 1px solid var(--glass-border);
border-radius: var(--radius-full);
padding: 8px 15px;
color: var(--text-main);
font-size: 13px;
outline: none;
}
.comment-input:focus {
border-color: var(--text-muted);
}
.post-btn {
background: none;
border: none;
color: #3B82F6;
/* Blue accent */
font-weight: 600;
font-size: 13px;
cursor: pointer;
}
.added-comments {
margin-top: 10px;
font-size: 13px;
color: var(--text-main);
display: flex;
flex-direction: column;
gap: 6px;
}
.comment-item {
line-height: 1.4;
}
.comment-user {
font-weight: 600;
margin-right: 5px;
}
/* Options Menu */
.post-header {
position: relative;
/* Context for menu */
}
.options-menu {
position: absolute;
top: 40px;
right: 15px;
background: rgba(20, 20, 22, 0.95);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid var(--glass-border);
border-radius: var(--radius-sm);
padding: 5px;
z-index: 10;
min-width: 120px;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
display: none;
}
.options-menu.active {
display: block;
animation: fadeIn 0.2s ease-out;
}
.menu-btn {
width: 100%;
background: none;
border: none;
padding: 10px 15px;
text-align: left;
color: var(--text-main);
font-size: 14px;
cursor: pointer;
border-radius: 8px;
transition: background 0.2s;
display: flex;
align-items: center;
gap: 8px;
}
.menu-btn:hover {
background: rgba(255, 255, 255, 0.05);
}
.menu-btn.delete {
color: #EF4444;
}
/* Bottom Navigation */
.bottom-nav {
position: fixed;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 100%;
max-width: 480px;
background: rgba(10, 10, 11, 0.95);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border-top: 1px solid var(--glass-border);
display: flex;
justify-content: space-around;
padding: 12px 0;
z-index: 100;
}
.nav-btn {
background: none;
border: none;
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
color: var(--text-muted);
cursor: pointer;
width: 60px;
}
.nav-btn svg {
stroke: var(--text-muted);
transition: 0.2s;
}
.nav-btn span {
font-size: 10px;
font-weight: 500;
}
.nav-btn.active {
color: var(--text-main);
}
.nav-btn.active svg {
stroke: var(--text-main);
stroke-width: 2.5px;
}
/* --- CREATE POST VIEW --- */
#create-post-view {
width: 100%;
max-width: 480px;
min-height: 100vh;
background: var(--bg-dark);
position: relative;
z-index: 200;
/* Above everything */
}
.text-btn {
background: none;
border: none;
color: var(--text-main);
font-size: 16px;
font-weight: 500;
cursor: pointer;
}
.text-btn.accent {
color: #3B82F6;
font-weight: 600;
}
.header-title {
font-weight: 700;
font-size: 16px;
}
.post-creation-area {
display: flex;
flex-direction: column;
}
.image-upload-wrapper {
width: 100%;
aspect-ratio: 1/1;
background: #111;
position: relative;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
overflow: hidden;
}
.upload-placeholder {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
color: var(--text-muted);
}
#image-preview {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
.caption-wrapper {
display: flex;
gap: 12px;
padding: 20px;
border-top: 1px solid var(--glass-border);
}
#post-caption-input {
flex: 1;
background: none;
border: none;
color: var(--text-main);
font-family: inherit;
font-size: 15px;
resize: none;
height: 100px;
outline: none;
padding-top: 8px;
/* Align with avatar */
}
/* --- CAROUSEL & VIDEO STYLES --- */
/* Carousel Container */
.media-carousel {
width: 100%;
height: 100%;
display: flex;
overflow-x: auto;
scroll-snap-type: x mandatory;
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE/Edge */
background: #000;
}
.media-carousel::-webkit-scrollbar {
display: none;
}
/* Individual Slide */
.media-slide {
min-width: 100%;
height: 100%;
scroll-snap-align: center;
position: relative;
display: flex;
justify-content: center;
background: #000;
}
.media-slide img,
.media-slide video {
width: 100%;
height: 100%;
object-fit: cover; /* or contain depending on pref */
display: block;
}
/* Pagination Dots */
.carousel-dots {
position: absolute;
bottom: 15px;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 6px;
z-index: 10;
pointer-events: none;
}
.dot {
width: 6px;
height: 6px;
background: rgba(255, 255, 255, 0.4);
border-radius: 50%;
transition: 0.2s;
}
.dot.active {
background: #fff;
transform: scale(1.2);
}
/* Post Media Wrapper (replaces .post-image) */
.post-media-wrapper {
position: relative;
width: 100%;
aspect-ratio: 4/5;
background: #111;
overflow: hidden;
}
/* Update create post view to handle carousel preview */
#create-post-view .image-upload-wrapper {
/* Keep aspect ratio but allow overflow for carousel */
display: block;
overflow: hidden;
}
#media-preview-container {
width: 100%;
height: 100%;
display: flex;
overflow-x: auto;
scroll-snap-type: x mandatory;
}
/* --- MEDIA COUNTER BADGE --- */
.media-counter {
position: absolute;
top: 12px;
right: 12px;
background: rgba(0, 0, 0, 0.6);
color: #fff;
font-size: 12px;
padding: 4px 8px;
border-radius: 12px;
pointer-events: none;
z-index: 10;
font-weight: 500;
backdrop-filter: blur(4px);
}
/* --- LIGHTBOX STYLES --- */
#lightbox-view {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: #000;
z-index: 9999;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
#lightbox-close {
position: absolute;
top: 20px;
right: 20px;
z-index: 100;
background: rgba(0,0,0,0.5);
border-radius: 50%;
padding: 10px;
cursor: pointer;
border: none;
color: white;
}
.lightbox-carousel {
width: 100%;
height: 100%;
display: flex;
overflow-x: auto;
scroll-snap-type: x mandatory;
scrollbar-width: none;
align-items: center;
}
.lightbox-carousel::-webkit-scrollbar {
display: none;
}
.lightbox-slide {
min-width: 100vw;
height: 100vh;
scroll-snap-align: center;
display: flex;
justify-content: center;
align-items: center;
}
.lightbox-slide img,
.lightbox-slide video {
max-width: 100%;
max-height: 100%;
object-fit: contain;
}
/* Fix Specificity Conflict */
#lightbox-view.hidden {
display: none !important;
}
/* --- ONBOARDING STYLES --- */
.profile-upload-section {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 20px;
}
.avatar-upload-wrapper {
width: 100px;
height: 100px;
border-radius: 50%;
position: relative;
cursor: pointer;
border: 2px dashed var(--glass-border);
padding: 2px;
transition: transform 0.2s;
}
.avatar-upload-wrapper:active {
transform: scale(0.95);
}
.avatar-upload-wrapper img {
width: 100%;
height: 100%;
border-radius: 50%;
object-fit: cover;
}
.upload-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.4);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
opacity: 0;
transition: opacity 0.2s;
}
.avatar-upload-wrapper:hover .upload-overlay {
opacity: 1;
}
/* Fix Visibility for Onboarding Views */
#verification-view.hidden,
#onboarding-view.hidden {
display: none !important;
}
/* FINAL FIX: Ensure ALL login containers hide correctly */
.login-container.hidden,
#login-view.hidden {
display: none !important;
}
/* Fix Bottom Nav Z-Index and Visibility */
.bottom-nav {
z-index: 100;
}