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

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background-color: #1a2b4c; /* Deep Navy */
    color: white;
    padding: clamp(0.7rem, 16px, 2.7rem) clamp(1.3rem, 32px, 5.3rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.language-switcher {
    background: white;
    color: #1a2b4c;
    border: none;
    padding: clamp(0.3rem, 8px, 1.3rem) clamp(0.7rem, 16px, 2.7rem);
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    font-size: clamp(0.7rem, 16px, 2.7rem);
    width: auto;
}

.log-btns a {
    color: white;
    background-color: #3a86ff;
    padding: clamp(0.3rem, 8px, 1.3rem) clamp(0.8rem, 19px, 3.2rem);
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.5rem;
    transition: background-color 0.2s;
}

.log-btns a:hover {
    background-color: #1e5bbf;
}

/* Main content */
main {
    flex: 1;
    max-width: 100%;
    width: 100%;
    margin: 2rem auto;
    padding: 0 clamp(1rem, 24px, 4rem);
}

/* Footer */
.footer {
    background-color: #1a2b4c;
    color: white;
    text-align: center;
    padding: clamp(1.3rem, 32px, 5.3rem) clamp(0.7rem, 16px, 2.7rem);
    position: sticky;
    overflow: hidden;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: clamp(0.6rem, 15px, 2.5rem);
    background: repeating-linear-gradient(
        45deg,
        #ffbe0b 0px,
        #ffbe0b 10px,
        transparent 10px,
        transparent 20px
    );
    opacity: 0.3;
}

.foot-txt {
    position: relative;
    z-index: 1;
    font-size: clamp(1.3rem, 32px, 5.3rem);
}

.footer a {
  color: white;
  text-decoration: none;
  text-align: center;
  position: block;
  margin: 30px;
  font-size: clamp(1.3rem, 32px, 5.3rem);
}

/* Cards (Home page) */
.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-top: 3rem;
}

.cards div {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 1) 40%);
  /* Fallback for older browsers */
  background-color: #1a2b4c; /* dark navy, shown if image fails */
  
  /* Keep existing styles */
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  width: clamp(21rem, 500px, 83rem);
  height: clamp(31rem, 750px, 125rem);
  padding: clamp(1.3rem, 32px, 5.3rem) clamp(0.7rem, 16px, 2.7rem);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  border-top: clamp(21rem, 500px, 83rem) solid transparent;

  /* Ensure text is readable */
  color: white;
  position: relative;
  overflow: hidden;
}

.cards div:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

/* Make the link text white and add a subtle text shadow */
.cards div a {
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(1rem, 35px, 5.5rem);
  display: block;
  position: relative;
  z-index: 2;
}

/* Home page avatar */
.kazuma {
    border-radius: 50%;
    width: clamp(12.5rem, 300px, 50rem);
    height: auto;
    aspect-ratio: 1/1;
    border: 5px solid #ffbe0b;
    display: block;
    margin: 0 auto 2rem;
    object-fit: cover;
}

/* ---------- Post / Card Common Styles ---------- */
.post-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.post-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    padding: clamp(1.2rem, 29px, 4.8rem);
    transition: box-shadow 0.2s;
    border-top: 5px solid transparent; /* will be overridden per page */
}

.post-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.post-profile-pic {
    width: clamp(2.1rem, 50px, 8.3rem);
    height: clamp(2.1rem, 50px, 8.3rem);
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eee;
}

.post-author {
    flex: 1;
    font-size: clamp(0.7rem, 16px, 2.7rem);
}

.post-author strong {
    color: #1a2b4c;
}

.post-date {
    color: #666;
    font-size: clamp(0.6rem, 14.4px, 2.4rem);
    margin-left: auto;
}

.post-body {
    font-size: clamp(0.7rem, 16px, 2.7rem);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Media gallery */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 1.5rem 0;
}

.media-item {
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #f0f0f0;
}

.media-item img, .media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.media-item:hover img, .media-item:hover video {
    transform: scale(1.05);
}

.video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    color: white;
    font-size: clamp(1.3rem, 32px, 5.3rem);
    pointer-events: none;
}

/* Post actions */
.post-actions {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: clamp(0.7rem, 16px, 2.7rem);
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.like-btn, .dislike-btn, .comment-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #666;
    font-size: clamp(0.7rem, 16px, 2.7rem);
    padding: clamp(0.2rem, 4.8px, 0.8rem) clamp(0.7rem, 16px, 2.7rem);
    border-radius: 30px;
    transition: all 0.2s;
}

.like-btn:hover, .dislike-btn:hover, .comment-btn:hover {
    background-color: #f0f0f0;
}

.like-btn.active {
    color: #3a86ff;
    font-weight: 600;
}

.dislike-btn.active {
    color: #e63946;
    font-weight: 600;
}

/* Comments */
.comments-section {
    margin-top: 2rem;
    padding-top: clamp(0.7rem, 16px, 2.7rem);
    border-top: 2px dashed #ddd;
}

.comment-input-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.comment-profile-pic {
    width: clamp(1.7rem, 40px, 6.7rem);
    height: clamp(1.7rem, 40px, 6.7rem);
    border-radius: 50%;
    object-fit: cover;
}

.comment-input, .reply-input {
    flex: 1;
    padding: clamp(0.5rem, 13px, 2.1rem) clamp(0.8rem, 19px, 3.2rem);
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: clamp(0.6rem, 15px, 2.5rem);
    transition: border-color 0.2s;
}

.comment-input:focus, .reply-input:focus {
    outline: none;
    border-color: #3a86ff;
}

.comment-submit, .reply-submit {
    background-color: #3a86ff;
    color: white;
    border: none;
    padding: clamp(0.4rem, 0.6px, 1.6rem) clamp(1rem, 24px, 4rem);
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.comment-submit:hover, .reply-submit:hover {
    background-color: #1e5bbf;
}

.comment {
    background: #f8f9fa;
    border-radius: 12px;
    padding: clamp(0.7rem, 16px, 2.7rem);
    margin-bottom: 1rem;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

.comment-author {
    flex: 1;
    font-size: clamp(0.6rem, 15px, 2.5rem);
}

.comment-date {
    font-size: clamp(0.5rem, 13px, 2.1rem);
    color: #888;
}

.delete-comment-btn {
    background: none;
    border: none;
    color: #e63946;
    cursor: pointer;
    font-size: clamp(0.7rem, 16px, 2.7rem);
}

.replies {
    margin-left: 2rem;
    margin-top: 1rem;
    border-left: 2px solid #ddd;
    padding-left: clamp(0.7rem, 16px, 2.7rem);
}

.reply-form {
    margin-top: 1rem;
    margin-left: 2rem;
}

/* No posts / comments */
.no-posts, .no-comments {
    text-align: center;
    padding: clamp(2rem, 48px, 8rem);
    background: #f8f9fa;
    border-radius: 16px;
    color: #666;
    font-size: clamp(0.7rem, 18px, 2.9rem);
    border: 2px dashed #ddd;
}

/* Profile section */
.profile-section {
    margin: 2rem 0;
    text-align: center;
}

.profile-pic-container {
    position: relative;
    display: inline-block;
}

.profile-pic {
    width: clamp(5rem, 120px, 20rem);
    height: clamp(5rem, 120px, 20rem);
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #3a86ff;
}

.upload-label {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #3a86ff;
    color: white;
    padding: clamp(0.3rem, 8px, 1.3rem) clamp(0.7rem, 16px, 2.7rem);
    border-radius: 30px;
    font-size: clamp(0.5rem, 13px, 2.1rem);
    cursor: pointer;
    transition: background 0.2s;
}

.upload-label:hover {
    background: #1e5bbf;
}

/* Search bar */
.search-container {
    max-width: 600px;
    margin: 2rem auto;
}

.search-form {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.search-input {
    flex: 1;
    padding: clamp(0.5rem, 13px, 2.1rem) clamp(1rem, 24px, 4rem);
    border: none;
    outline: none;
    font-size: clamp(0.7rem, 16px, 2.7rem);
}

.search-btn {
    background: none;
    border: none;
    padding: clamp(0.5rem, 13px, 2.1rem) clamp(0.8rem, 19px, 3.2rem);
    cursor: pointer;
    color: #666;
    font-size: clamp(0.8rem, 19px, 3.2rem);
}

.search-btn:hover {
    color: #3a86ff;
}

.clear-search {
    padding: clamp(0.5rem, 13px, 2.1rem) clamp(0.8rem, 19px, 3.2rem);
    color: #999;
    text-decoration: none;
}

.clear-search:hover {
    color: #e63946;
}

/* Notification bell */
.notification-bell {
    display: inline-block;
    margin-left: 1rem;
}

.bell-icon {
    padding: clamp(0.3rem, 6.4px, 1.1rem) clamp(0.7rem, 16px, 2.7rem);
    background: #f0f0f0;
    border-radius: 30px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(0.6rem, 14.4px, 2.4rem);
    transition: background 0.2s;
}

.bell-icon:hover {
    background: #e0e0e0;
}

/* Admin buttons (ban, pin) */
.ban-btn, .pin-btn {
    background: #e63946;
    color: white;
    border: none;
    border-radius: 20px;
    padding: clamp(0.1rem, 3.2px, 0.5rem) clamp(0.7rem, 16px, 2.7rem);
    font-size: clamp(0.5rem, 13px, 2.1rem);
    margin-left: 0.8rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.pin-btn {
    background: #ffbe0b;
    color: #1a2b4c;
}

.ban-btn:hover, .pin-btn:hover {
    opacity: 0.9;
}

.banned-badge {
    color: #e63946;
    font-size: clamp(0.5rem, 13px, 2.1rem);
    margin-left: 0.5rem;
}

/* ---------- Page‑Specific Accent Colors ---------- */
/* MyBlog – Electric Blue */
.myblog .post-card {
    border-top-color: #3a86ff;
}
.myblog .like-btn.active {
    color: #3a86ff;
}
.myblog .comment-submit, .myblog .reply-submit {
    background-color: #3a86ff;
}
.myblog .profile-pic {
    border-color: #3a86ff;
}

/* YourBlog – Fresh Green */
.yourblog .post-card {
    border-top-color: #2dc653;
}
.yourblog .like-btn.active {
    color: #2dc653;
}
.yourblog .comment-submit, .yourblog .reply-submit {
    background-color: #2dc653;
}
.yourblog .profile-pic {
    border-color: #2dc653;
}
.yourblog .ban-btn {
    background: #e63946; /* keep red for ban */
}

/* Projects – Gold */
.projects .post-card {
    border-top-color: #ffbe0b;
}
.projects .star.active {
    color: #ffbe0b;
}
.projects .comment-submit, .projects .reply-submit {
    background-color: #ffbe0b;
    color: #1a2b4c;
}
.projects .profile-pic {
    border-color: #ffbe0b;
}
.projects .post-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}
.projects .comment-btn {
    align-self: flex-end;
}

/* ---------- Media Modal ---------- */
.media-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
}

.modal-media {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
}

.close-modal {
    position: absolute;
    top: 20px; right: 30px;
    color: white;
    font-size: clamp(2rem, 48px, 8rem);
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #ffbe0b;
}

/* ---------- Statistics Page ---------- */
.statistics-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(0.8rem, 20px, 3.3rem);
}
.stat-section {
    background: white;
    border-radius: 16px;
    padding: clamp(1.3rem, 32px, 5.3rem);
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.stat-section h2 {
    color: #1a2b4c;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 1.5rem;
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}
.stat-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: clamp(1rem, 24px, 4rem);
    text-align: center;
    border: 1px solid #eee;
}
.stat-label {
    display: block;
    font-size: clamp(0.6rem, 14.4px, 2.4rem);
    color: #666;
    margin-bottom: 0.5rem;
}
.stat-number {
    font-size: clamp(1.5rem, 35px, 5.9rem);
    font-weight: 700;
    color: #3a86ff;
}
.stat-table {
    width: 100%;
    border-collapse: collapse;
}
.stat-table th,
.stat-table td {
    padding: clamp(0.7rem, 16px, 2.7rem);
    text-align: left;
    border-bottom: 1px solid #eee;
}
.stat-table th {
    background: #f1f1f1;
    font-weight: 600;
}
.stat-table tr.combined {
    background: #e9ecef;
    font-weight: 700;
}

/* ---------- Unban Page ---------- */
.unban-container {
    max-width: clamp(21rem, 500px, 83rem);
    margin: 2rem auto;
    background: white;
    border-radius: 16px;
    padding: clamp(1.3rem, 32px, 5.3rem);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.unban-container h2 {
    color: #1a2b4c;
    margin-bottom: 1.5rem;
    font-family: 'Poppins', sans-serif;
}
.unban-container input {
    width: 100%;
    padding: clamp(0.5rem, 13px, 2.1rem) clamp(0.8rem, 19px, 3.2rem);
    border: 1px solid #ddd;
    border-radius: 30px;
    margin-bottom: 1rem;
}
.unban-container button {
    width: 100%;
    padding: clamp(0.5rem, 13px, 2.1rem);
    background: #3a86ff;
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
}
.unban-container button:hover {
    background: #1e5bbf;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .log-btns {
        margin-left: 0;
    }
    .post-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .post-date {
        margin-left: 0;
    }
    .media-gallery {
        grid-template-columns: 1fr;
    }
    .cards div {
        width: 100%;
    }
}

.notifications-dropdown-container {
  position: relative;
  display: inline-block;
}
.notifications-bell {
  background: none;
  border: none;
  font-size: clamp(1rem, 24px, 4rem);
  cursor: pointer;
  position: relative;
}
.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: red;
  color: white;
  border-radius: 50%;
  padding: clamp(0.1rem, 2px, 0.3rem) clamp(0.3rem, 6px, 1rem);
  font-size: clamp(0.5rem, 11px, 1.9rem);
}
.notifications-dropdown {
  position: absolute;
  right: 0;
  top: 40px;
  width: clamp(12.5rem, 300px, 50rem);
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  max-height: clamp(17rem, 400px, 67rem);
  overflow-y: auto;
}
.notifications-header, .notifications-footer {
  padding: clamp(0.4rem, 10px, 1.7rem);
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
}
.notifications-footer {
  border-top: 1px solid #eee;
  border-bottom: none;
}
.notifications-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.notification-item {
  padding: clamp(0.4rem, 10px, 1.7rem);
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}
.notification-item.unread {
  background: #f0f7ff;
}
.notification-item:hover {
  background: #f5f5f5;
}
.notification-item a {
  text-decoration: none;
  color: inherit;
}
.notification-actor {
  font-weight: bold;
}
.notification-time {
  font-size: clamp(0.5rem, 13px, 2.1rem);
  color: #888;
}

.alert { padding: clamp(0.4rem, 10px, 1.7rem); margin: 10px 0; border-radius: 4px; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }