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

:root{
--pink:#ff6fa8;
--pink-deep:#ff4f96;
--blush:#ffd6e8;
--lavender:#c9b6ff;
--ink:#3a2a3c;
--ink-soft:#7a6b7d;
}

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

body{
font-family:'Poppins',sans-serif;
background:linear-gradient(135deg,#fff0f6,#ffe1ee,#f3e6ff,#ffe9f0);
background-size:400% 400%;
animation:bgMove 25s ease infinite;
color:var(--ink);
min-height:100vh;
overflow-x:hidden;
}

@keyframes bgMove{
0%{background-position:0% 50%;}
50%{background-position:100% 50%;}
100%{background-position:0% 50%;}
}

.bg{
position:fixed;
top:0;
left:0;
right:0;
bottom:0;
backdrop-filter:blur(20px);
z-index:-1;
}

header{
display:flex;
justify-content:space-between;
align-items:center;
padding:18px 50px;
background:rgba(255,255,255,.65);
backdrop-filter:blur(15px);
position:sticky;
top:0;
z-index:100;
border-bottom:3px solid var(--pink);
}

.logo{
font-family:'Fredoka',cursive;
font-size:32px;
font-weight:600;
color:var(--ink);
display:flex;
align-items:center;
gap:8px;
cursor:pointer;
}

.logo .hand{
display:inline-block;
transform:rotate(-15deg);
}

.logo .slap-word{
color:var(--pink-deep);
text-shadow:2px 2px 0 var(--blush);
}

nav{
display:flex;
gap:8px;
}

nav a{
color:var(--ink);
text-decoration:none;
font-weight:600;
font-size:14px;
letter-spacing:.5px;
padding:10px 18px;
border-radius:30px;
transition:.25s;
}

nav a:hover{
background:var(--pink);
color:white;
transform:translateY(-2px);
}

.search input{
padding:12px 18px;
border:2px solid var(--blush);
border-radius:30px;
width:220px;
outline:none;
font-size:15px;
background:white;
}

.search input:focus{
border-color:var(--pink);
}

.hero{
padding:40px;
display:flex;
justify-content:center;
}

.profile{
width:100%;
max-width:1200px;
background:linear-gradient(120deg,rgba(255,255,255,.85),rgba(255,214,232,.7));
backdrop-filter:blur(18px);
border-radius:30px;
padding:30px;
display:flex;
align-items:center;
gap:25px;
box-shadow:0 15px 40px rgba(255,111,168,.25);
border:1px solid rgba(255,255,255,.6);
}

.profile img{
width:130px;
height:130px;
border-radius:50%;
border:6px solid white;
outline:3px solid var(--pink);
object-fit:cover;
}

.profile h1{
color:var(--ink);
font-size:38px;
font-family:'Fredoka',cursive;
cursor:pointer;
}

.profile p{
color:var(--ink-soft);
margin-top:5px;
}

.mood-status{
margin-top:10px;
display:inline-block;
background:white;
color:var(--pink-deep);
font-weight:600;
padding:8px 16px;
border-radius:20px;
font-size:14px;
cursor:pointer;
box-shadow:0 4px 12px rgba(255,111,168,.25);
}

.stats{
display:flex;
gap:40px;
margin-top:20px;
}

.stats h3{
color:var(--ink);
font-size:26px;
}

.stats span{
color:var(--ink-soft);
}

.profile button{
margin-left:auto;
padding:15px 35px;
border:none;
border-radius:50px;
font-size:17px;
font-weight:bold;
background:var(--pink);
color:white;
cursor:pointer;
transition:.3s;
box-shadow:0 10px 25px rgba(255,111,168,.4);
}

.profile button:hover{
transform:scale(1.06);
background:var(--pink-deep);
}

main{
display:grid;
grid-template-columns:2fr 1fr;
gap:30px;
padding:40px;
max-width:1400px;
margin:auto;
}

.feed{
display:flex;
flex-direction:column;
gap:30px;
}

.post{
background:white;
border-radius:22px;
padding:25px;
box-shadow:0 12px 30px rgba(255,111,168,.15);
transition:.3s;
border-left:6px solid var(--pink);
}

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

.top{
display:flex;
align-items:center;
gap:15px;
margin-bottom:12px;
}

.top img{
width:56px;
height:56px;
border-radius:50%;
}

.top h3{
font-size:19px;
}

.top span{
color:#a08a9e;
font-size:13px;
}

.feeling-tag{
display:inline-block;
font-size:14px;
font-weight:600;
color:var(--pink-deep);
background:var(--blush);
padding:5px 14px;
border-radius:20px;
margin-bottom:14px;
}

.post p{
line-height:1.7;
margin-bottom:20px;
font-size:16px;
}

.photo{
width:100%;
border-radius:18px;
margin-bottom:20px;
}

iframe{
width:100%;
border:none;
border-radius:18px;
margin-bottom:20px;
}

.actions{
display:flex;
gap:12px;
}

.actions button{
flex:1;
padding:13px;
border:none;
border-radius:14px;
font-weight:bold;
cursor:pointer;
background:#fdf1f6;
color:var(--ink);
transition:.25s;
}

.actions button:hover{
background:var(--blush);
}

.comments{
margin-top:18px;
}

.comments input{
width:100%;
padding:14px;
border-radius:14px;
border:2px solid #f2dbe6;
outline:none;
}

.comments input:focus{
border-color:var(--pink);
}

aside{
display:flex;
flex-direction:column;
gap:25px;
}

.card{
background:white;
padding:24px;
border-radius:22px;
box-shadow:0 12px 28px rgba(255,111,168,.15);
}

.card h2{
margin-bottom:16px;
font-size:20px;
font-family:'Fredoka',cursive;
color:var(--ink);
display:flex;
align-items:center;
justify-content:space-between;
}

.card ul{
list-style:none;
}

.card li{
padding:9px 0;
font-weight:600;
color:var(--pink-deep);
cursor:pointer;
border-bottom:1px solid #fbeaf1;
}

.card li:last-child{
border-bottom:none;
}

.fun-fact-refresh{
background:var(--blush);
border:none;
border-radius:50%;
width:32px;
height:32px;
font-size:15px;
cursor:pointer;
transition:.25s;
}

.fun-fact-refresh:hover{
background:var(--pink);
transform:rotate(90deg);
}

.fun-fact-text{
font-size:15px;
line-height:1.6;
color:var(--ink-soft);
}

.friend{
display:flex;
align-items:center;
gap:12px;
padding:10px 0;
}

.friend img{
width:48px;
height:48px;
border-radius:50%;
}

audio{
width:100%;
margin-top:15px;
}

footer{
text-align:center;
padding:35px;
color:var(--ink-soft);
font-size:15px;
font-weight:600;
}

.like.active{
background:var(--pink);
color:white;
}

@media(max-width:1100px){

main{
grid-template-columns:1fr;
}

aside{
order:-1;
}

.profile{
flex-direction:column;
text-align:center;
}

.profile button{
margin:auto;
}

.stats{
justify-content:center;
}

}

@media(max-width:700px){

header{
padding:16px 20px;
}

nav{
flex-wrap:wrap;
justify-content:center;
}

.search input{
width:100%;
}

main{
padding:20px;
}

.profile h1{
font-size:28px;
}

.logo{
font-size:26px;
}

}

.dark-toggle{
position:fixed;
bottom:100px;
right:30px;
width:50px;
height:50px;
border:none;
border-radius:50%;
background:white;
font-size:22px;
cursor:pointer;
box-shadow:0 8px 20px rgba(255,111,168,.35);
z-index:200;
transition:.3s;
}

.dark-toggle:hover{
transform:scale(1.1);
}

body.dark-mode{
background:linear-gradient(135deg,#241323,#2e1a30,#1f1023);
background-size:400% 400%;
color:#f3e6ee;
}

body.dark-mode header{
background:rgba(30,15,30,.7);
}

body.dark-mode .logo,
body.dark-mode nav a{
color:#f3e6ee;
}

body.dark-mode .post,
body.dark-mode .card{
background:#2b1830;
color:#f3e6ee;
}

body.dark-mode .actions button{
background:#3a2440;
color:#f3e6ee;
}

body.dark-mode .top span{
color:#b79bc0;
}

body.dark-mode .profile{
background:linear-gradient(120deg,rgba(60,30,60,.6),rgba(80,40,70,.5));
}

body.dark-mode .profile h1,
body.dark-mode .profile p{
color:#f3e6ee;
}

.notification{
position:fixed;
top:-100px;
left:50%;
transform:translateX(-50%);
background:white;
color:var(--ink);
padding:15px 30px;
border-radius:50px;
box-shadow:0 10px 30px rgba(255,111,168,.3);
font-weight:600;
z-index:999;
transition:top .5s ease;
border:2px solid var(--pink);
}

.notification.show{
top:20px;
}

.confetti{
position:fixed;
top:-10px;
width:10px;
height:10px;
z-index:500;
animation:confettiFall linear forwards;
pointer-events:none;
}

@keyframes confettiFall{
to{
top:110vh;
opacity:.3;
}
}

.particle{
position:fixed;
width:4px;
height:4px;
background:rgba(255,111,168,.35);
border-radius:50%;
z-index:-1;
animation:particleFloat 6s ease-in-out infinite;
}

@keyframes particleFloat{
0%,100%{transform:translateY(0);}
50%{transform:translateY(-30px);}
}

.scroll-top{
position:fixed;
bottom:30px;
right:30px;
width:50px;
height:50px;
border:none;
border-radius:50%;
background:var(--pink);
color:white;
font-size:20px;
cursor:pointer;
opacity:0;
visibility:hidden;
transform:translateY(20px);
transition:.3s;
z-index:200;
box-shadow:0 8px 20px rgba(255,111,168,.35);
}

.scroll-top.visible{
opacity:1;
visibility:visible;
transform:translateY(0);
}

.friend{
position:relative;
}

.online-dot{
width:10px;
height:10px;
background:#37d67a;
border-radius:50%;
position:absolute;
left:36px;
top:36px;
border:2px solid white;
}

.notification-button{
background:none;
border:none;
font-size:22px;
cursor:pointer;
color:var(--ink);
margin-left:10px;
}

.notification-panel{
position:fixed;
top:80px;
right:30px;
width:280px;
background:white;
border-radius:20px;
padding:20px;
box-shadow:0 15px 40px rgba(255,111,168,.3);
opacity:0;
visibility:hidden;
transform:translateY(-10px);
transition:.3s;
z-index:300;
border:2px solid var(--blush);
}

.notification-panel.open{
opacity:1;
visibility:visible;
transform:translateY(0);
}

.notification-panel h3{
margin-bottom:12px;
font-family:'Fredoka',cursive;
}

.notification-panel p{
padding:8px 0;
border-top:1px solid #fbeaf1;
font-size:14px;
}

.mobile-menu{
display:none;
background:none;
border:none;
font-size:24px;
color:var(--ink);
cursor:pointer;
}

@media(max-width:700px){

.mobile-menu{
display:block;
}

nav{
display:none;
width:100%;
}

nav.open{
display:flex;
flex-direction:column;
}

}

.post.creator{
border-left:6px solid var(--lavender);
}

.post.creator h2{
font-family:'Fredoka',cursive;
margin-bottom:10px;
}

.post.creator select{
width:100%;
padding:12px;
border:2px solid var(--blush);
border-radius:14px;
margin-bottom:12px;
font-family:inherit;
font-size:14px;
background:white;
}

.post.creator textarea{
width:100%;
min-height:80px;
border:2px solid #f2dbe6;
border-radius:15px;
padding:15px;
font-family:inherit;
font-size:15px;
resize:vertical;
margin-bottom:15px;
}

.post.creator input[type="file"]{
margin-bottom:15px;
}

.post.creator img{
max-width:200px;
border-radius:15px;
margin-bottom:15px;
}

.post.creator button{
padding:12px 30px;
border:none;
border-radius:50px;
background:var(--pink);
color:white;
font-weight:bold;
cursor:pointer;
}

.post.saved{
border:3px solid var(--pink);
border-left:6px solid var(--pink);
}

.new-comment{
padding:10px 0;
border-top:1px solid #fbeaf1;
font-size:14px;
margin-top:8px;
}

.like{
position:relative;
overflow:visible;
}

.floating-heart{
position:absolute;
top:0;
left:50%;
transform:translateX(-50%);
font-size:20px;
animation:heartFloat 1s ease-out forwards;
pointer-events:none;
}

@keyframes heartFloat{
0%{
opacity:1;
transform:translate(-50%,0) scale(1);
}
100%{
opacity:0;
transform:translate(-50%,-40px) scale(1.5);
}
}


/* ================================
   AUTH PAGE (login.html)
   ================================ */

.auth-wrapper{
min-height:100vh;
display:flex;
align-items:center;
justify-content:center;
padding:30px;
}

.auth-card{
background:rgba(255,255,255,.9);
backdrop-filter:blur(18px);
border-radius:30px;
padding:45px;
max-width:420px;
width:100%;
box-shadow:0 15px 40px rgba(255,111,168,.25);
border:1px solid rgba(255,255,255,.6);
}

.auth-logo{
justify-content:center;
margin-bottom:30px;
font-size:36px;
}

.auth-tabs{
display:flex;
background:var(--blush);
border-radius:30px;
padding:5px;
margin-bottom:25px;
}

.auth-tab{
flex:1;
text-align:center;
padding:12px;
border-radius:25px;
cursor:pointer;
font-weight:600;
color:var(--ink-soft);
transition:.25s;
}

.auth-tab.active{
background:var(--pink);
color:white;
}

.auth-error{
display:none;
background:#ffe3ea;
color:#c81854;
padding:12px 16px;
border-radius:14px;
font-size:14px;
font-weight:600;
margin-bottom:16px;
}

.auth-form{
display:flex;
flex-direction:column;
gap:14px;
}

.auth-form input{
padding:14px 16px;
border:2px solid var(--blush);
border-radius:14px;
outline:none;
font-family:inherit;
font-size:15px;
}

.auth-form input:focus{
border-color:var(--pink);
}

.auth-form button[type="submit"]{
padding:15px;
border:none;
border-radius:50px;
background:var(--pink);
color:white;
font-size:16px;
font-weight:bold;
cursor:pointer;
transition:.3s;
box-shadow:0 10px 25px rgba(255,111,168,.35);
}

.auth-form button[type="submit"]:hover{
background:var(--pink-deep);
transform:scale(1.03);
}

.auth-switch-text{
text-align:center;
margin-top:18px;
font-size:14px;
color:var(--ink-soft);
}

.auth-switch-text span{
color:var(--pink-deep);
font-weight:600;
cursor:pointer;
}

.logout-btn{
background:none;
border:2px solid var(--pink);
color:var(--pink-deep);
font-weight:600;
padding:8px 16px;
border-radius:30px;
cursor:pointer;
margin-left:15px;
font-size:13px;
transition:.25s;
}

.logout-btn:hover{
background:var(--pink);
color:white;
}


/* ================================
   PROFILE SETUP PAGE (profile-setup.html)
   ================================ */

.setup-card{
max-width:460px;
}

.setup-heading{
text-align:center;
font-family:'Fredoka',cursive;
font-size:24px;
color:var(--ink);
margin-bottom:6px;
}

.setup-subheading{
text-align:center;
font-size:14px;
color:var(--ink-soft);
margin-bottom:25px;
}

.avatar-upload-wrapper{
display:flex;
flex-direction:column;
align-items:center;
gap:14px;
margin-bottom:25px;
}

.avatar-preview{
width:130px;
height:130px;
border-radius:50%;
object-fit:cover;
border:6px solid white;
outline:3px solid var(--pink);
}

.avatar-upload-btn{
background:var(--blush);
color:var(--pink-deep);
padding:10px 22px;
border-radius:30px;
font-weight:600;
cursor:pointer;
font-size:14px;
transition:.25s;
display:inline-block;
}

.avatar-upload-btn:hover{
background:var(--pink);
color:white;
}

.setup-form textarea{
padding:14px 16px;
border:2px solid var(--blush);
border-radius:14px;
outline:none;
font-family:inherit;
font-size:15px;
resize:vertical;
min-height:90px;
}

.setup-form textarea:focus,
.setup-form select:focus{
border-color:var(--pink);
}

.setup-form select{
padding:14px 16px;
border:2px solid var(--blush);
border-radius:14px;
outline:none;
font-family:inherit;
font-size:15px;
background:white;
color:var(--ink);
}

.setup-skip{
text-align:center;
margin-top:18px;
font-size:14px;
color:var(--ink-soft);
text-decoration:underline;
cursor:pointer;
}

.setup-skip:hover{
color:var(--pink-deep);
}


/* ================================
   PEOPLE DIRECTORY (profiles.html)
   ================================ */

.people-main{
max-width:1100px;
margin:auto;
padding:40px;
}

.people-heading{
text-align:center;
color:white;
font-family:'Fredoka',cursive;
font-size:32px;
margin-bottom:30px;
text-shadow:0 2px 10px rgba(0,0,0,.15);
}

.people-grid{
display:grid;
grid-template-columns:repeat(auto-fill,minmax(250px,1fr));
gap:25px;
}

.person-card{
background:white;
border-radius:24px;
padding:28px 22px;
text-align:center;
box-shadow:0 12px 28px rgba(255,111,168,.18);
}

.person-avatar{
width:90px;
height:90px;
border-radius:50%;
object-fit:cover;
border:4px solid white;
outline:3px solid var(--pink);
cursor:pointer;
margin-bottom:14px;
}

.person-name{
font-family:'Fredoka',cursive;
font-size:18px;
cursor:pointer;
color:var(--ink);
}

.person-name:hover{
color:var(--pink-deep);
}

.person-username{
color:var(--ink-soft);
font-size:13px;
margin-bottom:10px;
}

.person-bio{
font-size:14px;
color:var(--ink-soft);
margin-bottom:6px;
min-height:20px;
}

.person-mood{
font-size:13px;
color:var(--pink-deep);
margin-bottom:8px;
}

.person-follower-count{
font-size:12px;
color:var(--ink-soft);
margin-bottom:16px;
}

.follow-toggle{
width:100%;
padding:11px;
border:none;
border-radius:30px;
background:var(--pink);
color:white;
font-weight:600;
cursor:pointer;
transition:.25s;
}

.follow-toggle:hover{
transform:scale(1.03);
background:var(--pink-deep);
}

.follow-toggle.following{
background:var(--blush);
color:var(--pink-deep);
}


/* ================================
   SINGLE PROFILE VIEW (profile.html)
   ================================ */

.single-profile-main{
max-width:1100px;
margin:auto;
padding:0 40px 40px;
}

#followBtn.following-state{
background:var(--blush);
color:var(--pink-deep);
}


/* ================================
   REAL-DATA SIDEBAR WIDGETS
   ================================ */

.empty-friends-msg{
font-size:14px;
color:var(--ink-soft);
}

.now-playing-text{
font-size:15px;
color:var(--ink);
cursor:pointer;
padding:8px 0;
}

.now-playing-text:hover{
color:var(--pink-deep);
}


/* ================================
   REAL NOTIFICATIONS
   ================================ */

.notification-button{
position:relative;
}

.bell-badge{
position:absolute;
top:-4px;
right:-6px;
background:var(--pink-deep);
color:white;
font-size:11px;
font-weight:700;
min-width:18px;
height:18px;
border-radius:9px;
align-items:center;
justify-content:center;
padding:0 4px;
}

.notif-list{
max-height:320px;
overflow-y:auto;
}

.notif-item{
padding:10px 0;
border-top:1px solid #fbeaf1;
font-size:14px;
cursor:pointer;
transition:.2s;
}

.notif-item:first-child{
border-top:none;
}

.notif-item:hover{
color:var(--pink-deep);
}

.notif-item.unread{
background:var(--blush);
padding:10px;
border-radius:12px;
border-top:none;
margin-bottom:4px;
}

.notif-time{
font-size:12px;
color:var(--ink-soft);
}


/* ================================
   PAGE LOADER (covers stale placeholder content while data loads)
   ================================ */

.page-loader{
position:fixed;
inset:0;
z-index:9999;
background:linear-gradient(135deg,#fff0f6,#ffe1ee,#f3e6ff,#ffe9f0);
display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
gap:25px;
transition:opacity .4s ease;
}

.page-loader.hide{
opacity:0;
pointer-events:none;
}

.loader-logo{
font-family:'Fredoka',cursive;
font-size:36px;
font-weight:600;
color:var(--ink);
display:flex;
align-items:center;
gap:8px;
}

.loader-logo .slap-word{
color:var(--pink-deep);
text-shadow:2px 2px 0 var(--blush);
}

.loader-spinner{
width:40px;
height:40px;
border:5px solid var(--blush);
border-top-color:var(--pink);
border-radius:50%;
animation:spin .8s linear infinite;
}

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


/* ================================
   PROFILE POSTS: masonry-style grid instead of one long column
   ================================ */

#profileFeed{
column-count:2;
column-gap:25px;
display:block;
}

#profileFeed .post{
display:inline-block;
width:100%;
break-inside:avoid;
margin-bottom:25px;
}

@media(max-width:800px){

#profileFeed{
column-count:1;
}

}


/* ================================
   POST PRIVACY BADGE
   ================================ */

.visibility-tag{
display:inline-block;
font-size:13px;
font-weight:600;
color:var(--ink-soft);
background:#f3ecff;
padding:5px 14px;
border-radius:20px;
margin-bottom:14px;
margin-left:8px;
}


/* ================================
   MESSAGES: conversation list (messages.html)
   ================================ */

.conversation-list{
display:flex;
flex-direction:column;
gap:14px;
max-width:700px;
margin:auto;
}

.conversation-card{
background:white;
border-radius:20px;
padding:18px 22px;
display:flex;
align-items:center;
gap:16px;
cursor:pointer;
box-shadow:0 10px 24px rgba(255,111,168,.15);
transition:.2s;
position:relative;
}

.conversation-card:hover{
transform:translateY(-2px);
}

.conversation-card.unread{
border-left:5px solid var(--pink);
}

.conversation-avatar{
width:54px;
height:54px;
border-radius:50%;
object-fit:cover;
flex-shrink:0;
}

.conversation-info{
flex:1;
min-width:0;
}

.conversation-info h3{
font-size:16px;
margin-bottom:3px;
}

.conversation-info p{
font-size:14px;
color:var(--ink-soft);
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}

.conversation-time{
font-size:12px;
color:var(--ink-soft);
flex-shrink:0;
}


/* ================================
   MESSAGES: single conversation (conversation.html)
   ================================ */

.conversation-main{
max-width:700px;
margin:auto;
padding:30px 40px;
display:flex;
flex-direction:column;
height:calc(100vh - 200px);
}

.conversation-header{
display:flex;
align-items:center;
gap:14px;
background:white;
border-radius:20px;
padding:16px 22px;
margin-bottom:20px;
box-shadow:0 10px 24px rgba(255,111,168,.15);
}

.conversation-header img{
width:48px;
height:48px;
border-radius:50%;
object-fit:cover;
}

.conversation-header h2{
font-size:18px;
font-family:'Fredoka',cursive;
}

.conversation-thread{
flex:1;
overflow-y:auto;
background:rgba(255,255,255,.5);
border-radius:20px;
padding:20px;
display:flex;
flex-direction:column;
gap:10px;
margin-bottom:20px;
}

.message-bubble{
max-width:70%;
padding:12px 18px;
border-radius:20px;
font-size:15px;
line-height:1.5;
word-wrap:break-word;
}

.message-bubble.mine{
align-self:flex-end;
background:var(--pink);
color:white;
border-bottom-right-radius:6px;
}

.message-bubble.theirs{
align-self:flex-start;
background:white;
color:var(--ink);
border-bottom-left-radius:6px;
}

.conversation-input-bar{
display:flex;
gap:12px;
}

.conversation-input-bar input{
flex:1;
padding:15px;
border-radius:16px;
border:2px solid var(--blush);
outline:none;
font-family:inherit;
font-size:15px;
}

.conversation-input-bar input:focus{
border-color:var(--pink);
}

.conversation-input-bar button{
padding:15px 28px;
border:none;
border-radius:16px;
background:var(--pink);
color:white;
font-weight:bold;
cursor:pointer;
transition:.25s;
}

.conversation-input-bar button:hover{
background:var(--pink-deep);
}