* { margin:0; padding:0; box-sizing:border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; transition: all 0.3s ease; }

body.light { background:#f0f2f5; color:#262626; }
body.dark { background:#121212; color:#e0e0e0; }

header {
  position: sticky;
  top:0;
  background:#fff;
  border-bottom:1px solid #dbdbdb;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 50px;
  z-index:100;
}
body.dark header { background:#1f1f1f; border-color:#333; }
.logo { font-weight:bold; font-size:28px; color:#e1306c; }
.search-bar { border:1px solid #dbdbdb; border-radius:20px; padding:6px 15px; width:300px; outline:none; }
body.dark .search-bar { background:#2b2b2b; border-color:#555; color:#e0e0e0; }
.header-icons { display:flex; gap:20px; align-items:center; }
.header-icons img { width:30px; height:30px; border-radius:50%; cursor:pointer; }

/* Main container */
.main { display:flex; justify-content:center; gap:30px; margin-top:20px; }

/* Feed */
.feed-container { width:600px; display:flex; flex-direction:column; align-items:center; }

/* Stories */
.stories { display:flex; gap:20px; padding:10px 0; background:#fff; margin-bottom:20px; border:1px solid #ddd; border-radius:20px; justify-content:center; }
body.dark .stories { background:#1f1f1f; border-color:#333; }
.story { width:70px; text-align:center; cursor:pointer; }
.story img { width:70px; height:70px; border-radius:50%; border:2px solid #e1306c; object-fit:cover; transition: transform 0.3s; }
.story span { display:block; font-size:12px; margin-top:5px; color:#333; }
body.dark .story span { color:#e0e0e0; }
.story:hover img { transform: scale(1.2); }

/* New Post */
.new-post { background:#fff; border:1px solid #ddd; border-radius:20px; padding:20px; margin-bottom:20px; box-shadow:0 5px 15px rgba(0,0,0,0.1); width:100%; }
body.dark .new-post { background:#1f1f1f; border-color:#333; }
.new-post input, .new-post textarea { width:100%; padding:10px; margin-bottom:10px; border:1px solid #dbdbdb; border-radius:12px; outline:none; }
body.dark .new-post input, body.dark .new-post textarea { background:#2b2b2b; border-color:#555; color:#e0e0e0; }
.new-post button { width:100%; padding:10px; border:none; background:#0095f6; color:#fff; border-radius:20px; cursor:pointer; font-weight:bold; }
.new-post button:hover { background:#0077cc; }

/* Post card */
.post { background:#fff; border:1px solid #dbdbdb; border-radius:20px; margin-bottom:20px; overflow:hidden; box-shadow:0 5px 15px rgba(0,0,0,0.1); width:100%; }
body.dark .post { background:#1f1f1f; border-color:#333; }
.post .meta { display:flex; align-items:center; gap:10px; padding:10px; }
.post .avatar { width:40px; height:40px; border-radius:50%; overflow:hidden; }
.post .avatar img { width:100%; height:100%; object-fit:cover; }
.post .username { font-weight:bold; font-size:14px; }
.post img { width:100%; display:block; border-radius:0; }
.actions { padding:10px; display:flex; align-items:center; gap:10px; }
.like-btn { cursor:pointer; font-size:22px; border:none; background:none; transition: transform 0.2s; }
.like-btn:hover { transform: scale(1.2); }
.like-btn.liked { color:#e1306c; }
.caption { padding:0 10px 10px; font-size:14px; }
.comments { padding:0 10px 10px; font-size:13px; color:#555; max-height:80px; overflow-y:auto; }
body.dark .comments { color:#ccc; }
.add-comment { display:flex; padding:0 10px 10px; gap:5px; }
.add-comment input { flex:1; padding:6px; border:1px solid #dbdbdb; border-radius:20px; outline:none; }
body.dark .add-comment input { background:#2b2b2b; border-color:#555; color:#e0e0e0; }
.add-comment button { padding:6px 12px; border:none; background:#0095f6; color:#fff; border-radius:20px; cursor:pointer; }
.add-comment button:hover { background:#0077cc; }
.timestamp { padding:0 10px 10px; font-size:11px; color:#999; }
body.dark .timestamp { color:#aaa; }

/* Sidebar */
.sidebar { width:250px; background:#fff; border:1px solid #ddd; border-radius:20px; padding:15px; height:min-content; box-shadow:0 5px 15px rgba(0,0,0,0.1); }
body.dark .sidebar { background:#1f1f1f; border-color:#333; }
.sidebar h3 { margin-bottom:10px; font-size:16px; }
.sidebar .profile { display:flex; align-items:center; gap:10px; margin-bottom:15px; }
.sidebar .profile .avatar { width:50px; height:50px; border-radius:50%; overflow:hidden; }
.sidebar .profile .avatar img { width:100%; height:100%; object-fit:cover; }
.sidebar .profile .username { font-weight:bold; }

/* Footer */
footer { background:#fff; border-top:1px solid #dbdbdb; text-align:center; padding:20px 0; font-size:14px; color:#555; margin-top:50px; }
body.dark footer { background:#1f1f1f; border-color:#333; color:#ccc; }
footer a { color:#555; margin:0 8px; text-decoration:none; }
body.dark footer a { color:#ccc; }
footer a:hover { text-decoration:underline; }

/* Dark mode toggle */
#toggleMode { position:fixed; top:80px; right:20px; padding:10px 15px; background:#0095f6; color:#fff; border:none; border-radius:20px; cursor:pointer; z-index:200; font-weight:bold; }



.insta-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}


/* Left Sidebar */
.left-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 230px;
  background-color: #fff;
  border-right: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 10px;
  font-family: 'Poppins', sans-serif;
  z-index: 1000;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.left-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.left-sidebar ul li {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.left-sidebar ul li:hover {
  background-color: #f3f3f3;
}

.meta-footer {
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  border-top: 1px solid #eee;
  padding-top: 15px;
}

/* Dark Mode for Sidebar */
body.dark .left-sidebar {
  background-color: #121212;
  border-right: 1px solid #333;
  color: #f1f1f1;
}

body.dark .left-sidebar ul li:hover {
  background-color: #222;
}

body.dark .meta-footer {
  color: #aaa;
  border-top: 1px solid #333;
}

/* Adjust layout to fit sidebar */
header,
.main,
footer {
  margin-left: 250px;
}

/* Button styling */
#toggleMode {
  position: fixed;
  top: 15px;
  right: 15px;
  background: #000;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

#toggleMode:hover {
  background: #444;
}

body.light #toggleMode {
  background: #eee;
  color: #000;
}


/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Logo left, icons right */
  padding: 10px 20px;
  border-bottom: 1px solid #dbdbdb;
  position: sticky; /* Stays at top */
  top: 0;
  width: 100%;
  background-color: inherit;
  z-index: 100;
}

/* Logo */
header .logo img {
  height: 35px;
}

/* Search bar centered in available space */
header .search-bar {
  flex: 1; /* Fills space between logo and icons */
  max-width: 400px;
  margin: 0 20px; /* Space from logo and icons */
  padding: 6px 15px;
  border-radius: 20px;
  border: 1px solid #dbdbdb;
  outline: none;
  text-align: center;
  z-index: 1; /* Make sure it's above background */
}

/* Header icons */
.header-icons {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Emoji icons */
.header-icons .icon {
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.header-icons .icon:hover {
  transform: scale(1.3);
}

/* Dark/light toggle */
.toggle-theme {
  font-size: 1.5rem;
  cursor: pointer;
}

/* Push content below header */
.main {
  margin-top: 80px; /* Space so header doesn't overlap stories/feed */
}

.sidebar .profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 5px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.sidebar .profile:hover {
  background-color: #f0f0f0; /* light hover for light mode */
  transform: scale(1.02);     /* slight zoom */
}

body.dark .sidebar .profile:hover {
  background-color: #2b2b2b; /* dark mode hover */
}

/* LOGIN SCREEN EXTRA */
#loginScreen input {
  font-size: 15px;
}

#loginScreen button:hover {
  opacity: 0.8;
}

#loginScreen{
  position: fixed;
  top:0;left:0;
  width:100%;height:100%;
  background:#111111cc;
  display:flex;
  justify-content:center;
  align-items:center;
  backdrop-filter: blur(5px);
  z-index:9999;
}

.login-box{
  width:320px;
  background:white;
  padding:25px 30px;
  border-radius:10px;
  text-align:center;
  box-shadow:0 0 30px rgba(0,0,0,0.4);
}

.login-box h2{
  margin-bottom:15px;
  font-size:26px;
}

.login-box input{
  width:100%;
  padding:12px 15px;
  margin:10px 0;
  border-radius:8px;
  border:1px solid #ccc;
  font-size:16px;
  outline:none;
}

.login-box button{
  width:100%;
  padding:12px;
  margin-top:10px;
  background:black;
  color:white;
  border:none;
  border-radius:8px;
  cursor:pointer;
  font-size:17px;
}

.login-box .change-btn{
  background:#444;
}



