/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background-color: #1e88e5;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 a {
    color: white;
    text-decoration: none;

}

p a {
    text-decoration: none;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #bbdefb;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info span {
    margin-right: 0.5rem;
}

/* Button Styles */
button, .btn {
    background-color: #1e88e5;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 1rem;
}

button:hover, .btn:hover {
    background-color: #1565c0;
}

#dark-mode-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #0d47a1;
}

.main-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

h2 {
    font-size: 2rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Post Styles */
.post {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.post-title {
    color: #1e88e5;
    margin-bottom: 0.5rem;
}

.post-meta {
    color: #757575;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-content {
    margin-bottom: 1rem;
}

.post-image {
    max-width: 100%;
    width: 250px;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.single-post-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 4px;
}

/* Footer Styles */

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #1e88e5;
    color: white;
    padding: .60rem 0;
    text-align: center;
}

/* Responsive Styles */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 0.5rem 0;
    }
    
    .user-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #dark-mode-toggle {
        position: static;
        margin-top: 1rem;
    }
}

.panel-container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.profile-section {
  flex: 1 1 350px;
  background: #fff;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
}

.profile-section h3,
.profile-section h4 {
  margin-bottom: 1rem;
  color: #1e88e5;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #555;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group input[type="file"] {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input[disabled] {
  background: #e9ecef;
  cursor: not-allowed;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #1e88e5;
  outline: none;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.profile-section img {
  display: block;
  margin-bottom: 0.7rem;
  border-radius: 6px;
  max-width: 120px;
}

.btn,
button {
  background-color: #1e88e5;
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s;
  display: inline-block;
  text-align: center;
  margin-top: 0.5rem;
}

.btn-danger {
  background-color: #d32f2f;
}

.btn:hover {
  background-color: #1565c0;
}

.btn-danger:hover {
  background-color: #b71c1c;
}

.danger-zone {
  margin-top: 2rem;
  padding: 1rem;
  border: 1px solid #d32f2f;
  border-radius: 6px;
  background: #ffebee;
  color: #b71c1c;
}

.danger-zone h4 {
  margin-bottom: 0.5rem;
}

.posts-section {
  flex: 2 1 600px;
  background: #fff;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
}

.posts-section h3 {
  margin-bottom: 1.2rem;
  color: #1e88e5;
}

.post-list .post-item {
  border-bottom: 1px solid #ddd;
  padding: 0.75rem 0;
}

.post-list .post-item:last-child {
  border-bottom: none;
}

.post-item h4 {
  margin-bottom: 0.3rem;
  font-size: 1.2rem;
}

.post-item h4 a {
  color: #1e88e5;
  text-decoration: none;
  font-weight: 600;
}

.post-item h4 a:hover {
  text-decoration: underline;
}

.post-meta {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 0.5rem;
}

.post-actions a.btn {
  margin-right: 0.5rem;
  font-size: 0.85rem;
  padding: 0.3rem 0.7rem;
}

@media (max-width: 900px) {
  .panel-container {
    flex-direction: column;
    padding: 1rem;
  }

  .profile-section,
  .posts-section {
    flex: 1 1 100%;
    margin-bottom: 2rem;
  }
}

h2 {
  margin-bottom: 1.5rem;
  font-weight: 700;
  font-size: 2rem;
  text-align: center;
}

.intro p {
    text-align: center;
}

.alert {
  padding: 1rem 1.2rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.alert-danger {
  background-color: #ffebee;
  color: #b71c1c;
  border: 1px solid #d32f2f;
}

form {
  background: #fff;
  padding: 1.8rem 2.2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
  max-width: 600px;
  margin: 0 auto 2rem;
}

form .form-group {
  margin-bottom: 1.3rem;
}

form label {
  font-weight: 600;
  color: #555;
  display: block;
  margin-bottom: 0.5rem;
}

form input[type="text"],
form input[type="file"],
form textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

form input[type="text"]:focus,
form input[type="file"]:focus,
form textarea:focus {
  border-color: #1e88e5;
  outline: none;
}

form textarea {
  min-height: 120px;
  resize: vertical;
}

form button.btn {
  margin-top: 1rem;
  padding: 0.7rem 1.4rem;
  font-weight: 700;
  font-size: 1.1rem;
  display: inline-block;
}



/* Public Profile Page */
.public-profile {
  max-width: 900px;
  margin: 3rem auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2rem;
}

.public-profile .profile-info {
  flex: 1 1 250px;
  text-align: center;
}

.public-profile .profile-info img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #1e88e5;
  margin-bottom: 1rem;
}

.public-profile .profile-info h2 {
  color: #1e88e5;
  margin-bottom: 0.5rem;
}

.public-profile .profile-info p {
  color: #555;
  margin-bottom: 0.5rem;
}

.public-profile .bio {
  flex: 2 1 500px;
}

.public-profile .bio h3 {
  color: #1e88e5;
  margin-bottom: 0.8rem;
}

.public-profile .bio p {
  font-size: 1rem;
  color: #444;
  line-height: 1.6;
}

/* Posts list inside public profile */
.public-posts {
  margin-top: 2rem;
}

.public-posts h3 {
  color: #1e88e5;
  margin-bottom: 1rem;
}

.public-posts .post-card {
  background: #fafafa;
  border: 1px solid #ddd;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.public-posts .post-card h4 {
  color: #1e88e5;
  margin-bottom: 0.4rem;
}

.public-posts .post-card a {
  text-decoration: none;
  color: #1e88e5;
}

.public-posts .post-card a:hover {
  text-decoration: underline;
}
