.profile-btn-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 2.2rem;
}
.profile-btn-row .profile-save-btn {
  margin-right: 1.2rem;
}
  margin-top: 1.5rem;
  justify-self: center;
}

.no-topics-message {
  color: #111;
}

@media (prefers-color-scheme: dark) {
  .no-topics-message {
    color: #fff;
  }
}
body:not(.dark-mode) .modal-close {
  color: #888 !important;
}
body.dark-mode .modal-close {
  color: #fff !important;
}
.input-error {
  border: 2px solid #e53e3e !important;
  background: #fff5f5 !important;
  transition: border 0.2s, background 0.2s;
}
.google-signin-required-modal .modal-content,
body:not(.dark-mode) .google-signin-required-modal .modal-content {
    opacity: 1;
    transform: translateY(0);
}
.google-signin-required-modal.show .modal-content,
body:not(.dark-mode) .google-signin-required-modal.show .modal-content {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.35s cubic-bezier(.4,0,.2,1), transform 0.35s cubic-bezier(.4,0,.2,1);
}

body:not(.dark-mode) .three-dot-menu, 
body:not(.dark-mode) .three-dot-menu i, 
body:not(.dark-mode) .three-dot-menu .fa-ellipsis-h, 
body:not(.dark-mode) .three-dot-menu .fa-ellipsis-v {
    color: #888 !important;
    font-size: 2rem !important;
    opacity: 0.85;
}
body:not(.dark-mode) #profile-view .profile-display .post-card,
body:not(.dark-mode) #profile-view .profile-display .post-card *,
body:not(.dark-mode) #profile-view .profile-display .profile-card,
body:not(.dark-mode) #profile-view .profile-display .profile-card * {
  color: #111 !important;
}
body:not(.dark-mode) #profile-view .profile-preview-box,
body:not(.dark-mode) #profile-view .profile-preview-box *,
body:not(.dark-mode) #profile-view .profile-preview-header,
body:not(.dark-mode) #profile-view .profile-preview-content,
body:not(.dark-mode) #profile-view .profile-preview-grade {
  color: #111 !important;
}
body:not(.dark-mode) #profile-view .profile-preview-box,
body:not(.dark-mode) #profile-view .profile-preview-header,
body:not(.dark-mode) #profile-view .profile-preview-content,
body:not(.dark-mode) #profile-view .profile-preview-grade {
  color: #111 !important;
}
body:not(.dark-mode) #profile-view .profile-preview-header {
  color: #222 !important;
}
body:not(.dark-mode) #profile-view .profile-preview-content {
  color: #111 !important;
}
body:not(.dark-mode) #profile-view .profile-preview-grade {
  color: #444 !important;
}
body.dark-mode #profile-view .profile-preview-box {
  background: linear-gradient(120deg, rgba(35,39,43,0.98) 60%, rgba(45,49,64,0.98) 100%) !important;
  border-radius: 20px !important;
  border: 1.5px solid rgba(120,130,180,0.16) !important;
  box-shadow: 0 8px 40px 0 rgba(80, 80, 160, 0.13), 0 2px 24px rgba(0,0,0,0.13), 0 0 0 1.5px #23272b inset;
  padding: 2.2rem 2.2rem 1.5rem 2.2rem !important;
  margin: 2.5rem 0 2rem 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 320px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
body.dark-mode #profile-view .profile-preview-header {
  color: #6d8cff;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  letter-spacing: 0.01em;
  text-align: center;
  text-shadow: 0 2px 12px rgba(80,80,160,0.10);
}
body.dark-mode #profile-view .profile-preview-content {
  color: #f8f9fa;
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
}
body.dark-mode #profile-view .profile-preview-grade {
  color: #b0b3b8;
  font-size: 1.15rem;
  font-weight: 400;
  text-align: center;
}
body.dark-mode #profile-view > div,
body.dark-mode .profile-box,
body.dark-mode .user-profile-box,
body.dark-mode .profile-card,
body.dark-mode #profile-view > .profile-card,
body.dark-mode #profile-view > .profile-box {
  background: linear-gradient(120deg, rgba(35,39,43,0.92) 60%, rgba(45,49,64,0.92) 100%) !important;
  color: #f2f3fa !important;
  border-radius: 22px !important;
  border: 1.5px solid rgba(120,130,180,0.13) !important;
  box-shadow: 0 8px 40px 0 rgba(80, 80, 160, 0.16), 0 2px 24px rgba(0,0,0,0.16), 0 0 0 1.5px #23272b inset;
  backdrop-filter: blur(7px) saturate(1.2);
  -webkit-backdrop-filter: blur(7px) saturate(1.2);
  transition: box-shadow 0.22s, background 0.22s, border 0.22s;
  padding: 2.2rem 2.2rem 1.5rem 2.2rem !important;
  margin-bottom: 1.5rem;
}
body.dark-mode .profile-box .profile-name,
body.dark-mode .profile-card .profile-name,
body.dark-mode .user-profile-box .profile-name {
  color: #f8f9fa !important;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 12px rgba(80,80,160,0.08);
}
body.dark-mode .profile-box .profile-grade,
body.dark-mode .profile-card .profile-grade,
body.dark-mode .user-profile-box .profile-grade {
  color: #b0b3b8 !important;
  font-size: 1.25rem;
  margin-top: 0.5rem;
}
body.dark-mode .three-dot-menu, 
body.dark-mode .three-dot-menu i, 
body.dark-mode .three-dot-menu .fa-ellipsis-h, 
body.dark-mode .three-dot-menu .fa-ellipsis-v {
    color: #bbb !important;
    font-size: 2rem !important;
    opacity: 0.85;
}
.modal-content,
.modal-content,
.modal-header,
.modal-body,
.modal-footer {
    background: #fff !important;
    color: #333 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}
body.dark-mode .quick-link-modal .modal-content,
body.dark-mode .quick-link-modal .modal-header,
body.dark-mode .quick-link-modal .modal-body,
body.dark-mode .quick-link-modal .modal-footer {
    background: #23272b !important;
    color: #e5e5e5 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid #33384d !important;
    z-index: 99999 !important;
}

.google-signin-required-modal .modal-content,
body:not(.dark-mode) .google-signin-required-modal .modal-content {
    background: #fff !important;
    color: #333 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18) !important;
    border: 1px solid #e9ecef !important;
}
.google-signin-required-modal,
body.dark-mode .google-signin-required-modal,
.google-signin-required-modal .modal-content,
body.dark-mode .google-signin-required-modal .modal-content,
.google-signin-required-modal .modal-header,
body.dark-mode .google-signin-required-modal .modal-header,
.google-signin-required-modal .modal-body,
body.dark-mode .google-signin-required-modal .modal-body,
.google-signin-required-modal .modal-footer,
body.dark-mode .google-signin-required-modal .modal-footer {
    background: #fff !important;
    color: #333 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}
body.dark-mode .google-signin-btn {
    background: #23272b !important;
    color: #e5e5e5 !important;
    border-color: #33384d !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
}
body:not(.dark-mode) input::placeholder,
body:not(.dark-mode) textarea::placeholder {
    color: #222 !important;
    opacity: 1;
}
body:not(.dark-mode) input,
body:not(.dark-mode) textarea {
    color: #222;
}
body.dark-mode .profile-display .post-card {
    background: #23272b !important;
    color: #e5e5e5 !important;
    border-color: #33384d !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
}
body.dark-mode .profile-display .profile-card {
    background: #23272b !important;
    color: #e5e5e5 !important;
    border-color: #33384d !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
}
body.dark-mode .profile-card,
body.dark-mode .profile-display,
body.dark-mode .profile-display .profile-card,
.dark-mode .profile-card,
body.dark-mode .profile-display .profile-card.profile-card,
body.dark-mode .profile-display > .profile-card,
body.dark-mode .profile-display .profile-card[style],
body.dark-mode .profile-card[style] {
    background: #23272b !important;
    color: #e5e5e5 !important;
    border-color: #33384d !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
}
* {
    margin: 0;
    padding: 0; 
    box-sizing: border-box;


body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #fff;
    background-color: #f8f9fa;


.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 20px;


.main-header {
    background: linear-gradient(120deg, #667eea 0%, #764ba2 50%, #ffb347 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem 3rem 2rem;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(102,126,234,0.13);
    animation: headerWave 16s ease-in-out infinite alternate;
    background-size: 200% 200%;
}
@keyframes headerWave {
    0% { background-position: 0% 50%; filter: hue-rotate(0deg);}
    50% { background-position: 100% 50%; filter: hue-rotate(30deg);}
    100% { background-position: 0% 50%; filter: hue-rotate(-30deg);}
}
.main-header::before,
.main-header::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    opacity: 0.28;
    z-index: 0;
    pointer-events: none;
    transition: filter 1s;
    filter: blur(4px) brightness(1.2) saturate(1.3);
    mix-blend-mode: lighten;
}
.main-header::before {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle at 60% 40%, #ffb347 0%, #764ba2 60%, transparent 100%);
    top: -140px;
    left: -140px;
    animation: floatBlob1 12s ease-in-out infinite alternate, blobMorph1 24s ease-in-out infinite alternate;
}
.main-header::after {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle at 40% 60%, #667eea 0%, #764ba2 70%, transparent 100%);
    bottom: -100px;
    right: -100px;
    animation: floatBlob2 15s ease-in-out infinite alternate, blobMorph2 28s ease-in-out infinite alternate;
}
@keyframes blobMorph1 {
    0% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
    25% { border-radius: 60% 40% 55% 45% / 50% 70% 30% 50%; }
    50% { border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%; }
    75% { border-radius: 55% 45% 40% 60% / 60% 50% 50% 40%; }
    100% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
}
@keyframes blobMorph2 {
    0% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
    20% { border-radius: 45% 55% 60% 40% / 55% 65% 35% 45%; }
    50% { border-radius: 60% 40% 40% 60% / 40% 60% 60% 40%; }
    80% { border-radius: 50% 60% 45% 55% / 60% 50% 50% 40%; }
    100% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
}
.header-content {
    position: relative;
    z-index: 1;
}
.header-content h1 {
    font-size: 3rem;
    margin-bottom: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 0 2px 16px rgba(102,126,234,0.13);
    background: linear-gradient(90deg, #fff 10%, #ffb347 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientTextMove 8s linear infinite alternate, colorShift 10s linear infinite alternate;
}
@keyframes gradientTextMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}
@keyframes colorShift {
    0% { filter: hue-rotate(0deg);}
    100% { filter: hue-rotate(30deg);}
}
.header-content p {
    font-size: 1.25rem;
    opacity: 0.95;
    color: #f8f9fa !important;
    text-shadow: none;
    margin-bottom: 0.5rem;
    animation: fadeInUp 2s;
}
.header-content .header-emoji {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
    animation: bounce 2s infinite, emojiColor 8s infinite alternate;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0);}
    50% { transform: translateY(-12px);}
}
@keyframes emojiColor {
    0% { filter: hue-rotate(0deg);}
    100% { filter: hue-rotate(60deg);}
}

.main-nav {
    background: #f3f4f6;
    border-bottom: 2px solid #e9ecef;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    padding: 0 20px;
}

.nav-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    background-color: #f8f9fa;
    color: #667eea;
}

.nav-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background-color: #f8f9fa;
}

.nav-btn i {
    font-size: 1.1rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.main-column {

    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0);}
}

.welcome-section h2 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.welcome-section p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.trending-section h3 {
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
}

.trending-section h3 i {
    color: #ff6b6b;
}

body:not(.dark-mode) .trending-section h3 {
    color: #333 !important;
}

body.dark-mode .trending-section h3 {
    color: #b0b3b8 !important;
}

body:not(.dark-mode) .profile-card {
    background: linear-gradient(120deg, #e3e6e8 0%, #d1d5db 60%, #bfc4cc 100%) !important;
    color: #222 !important;
    padding: 2.2rem 2.2rem 1.5rem 2.2rem;
    border-radius: 22px !important;
    box-shadow: 0 8px 32px rgba(102,126,234,0.13), 0 2px 24px rgba(160,140,209,0.09) !important;
    margin-bottom: 1.5rem;
    border-left: 4px solid #764ba2;
    transition: box-shadow 0.2s, background 0.2s;
}
body:not(.dark-mode) .profile-card .profile-name,
body:not(.dark-mode) .profile-card .profile-grade {
    color: #222 !important;
}
body.dark-mode .profile-card,
body.dark-mode .profile-display .profile-card,
body.dark-mode .profile-display > .profile-card,
body.dark-mode .profile-card[style] {
    background: #181a1b !important;
    color: #e5e5e5 !important;
    border-color: #33384d !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.28), 0 2px 24px rgba(0,0,0,0.18) !important;
}

body.dark-mode .profile-card[style] {
    background: #181a1b !important;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.post-card h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

body.dark-mode .post-card h4 {
    color: #d1d5db !important;
}

.post-card p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.user-badge {
    background: #667eea;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.post-stats {
    color: #666;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-stats i {
    margin-right: 0.3rem;
}

.post-tags {
    margin-top: 1rem;
}

.tag {
    background: #e9ecef;
    color: #495057;
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.post-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.action-btn {
    border: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 500;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.like-btn {
    background: #ff6b81;
    color: white;
    border-color: #ff6b81;
}

.like-btn:hover {
    background: #ff5252;
}

.like-btn.liked {
    background: #d63031;
    border-color: #d63031;
}

.reply-btn {
    background: #4285f4;
    color: white;
    border-color: #4285f4;
}

.reply-btn:hover {
    background: #3367d6;
}

.share-btn {
    background: #34a853;
    color: white;
    border-color: #34a853;
}

.share-btn:hover {
    background: #2d7d3c;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.post-controls {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.control-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
}

.control-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.edit-btn {
    color: #007bff;
    border-color: #007bff;
}

.edit-btn:hover {
    background: #007bff;
    color: white;
}

.delete-btn {
    color: #dc3545;
    border-color: #dc3545;
}

.delete-btn:hover {
    background: #dc3545;
    color: white;
}

.reply-form {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 3px solid #667eea;
}

.reply-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 1rem;
}

.reply-form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.reply-form-actions input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

.submit-reply-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease;
}

.submit-reply-btn:hover {
    background: #764ba2;
}

.replies-container {
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid #e9ecef;
}

.reply-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    border-left: 3px solid #667eea;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.reply-author {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.reply-author-grey {
    color: #333 !important;
}
body.dark-mode .reply-author-grey {
    color: #bbb !important;
}

.reply-time {
    color: #666;
    font-size: 0.8rem;
}

.reply-controls {
    display: flex;
    gap: 0.3rem;
}

.reply-content {
    color: #555;
    line-height: 1.5;
    margin-bottom: 0.8rem;
}

.reply-actions {
    display: flex;
    gap: 0.5rem;
}

.reply-like-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.reply-like-btn:hover {
    background: #ff6b81;
    color: white;
    border-color: #ff6b81;
}

.reply-like-btn.liked {
    background: #d63031;
    color: white;
    border-color: #d63031;
}

.quick-link-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {

    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-header {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 12px 12px 0 0;
    font-size: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 2rem;
    line-height: 1.6;
    font-size: 1.08rem;
    background: #fff;
    color: #222;
    border-radius: 0 0 12px 12px;
}
.modal-body .tos-description {
    margin-bottom: 1.5em;
    font-size: 1.08rem;
    color: #444;
}
.modal-body .privacy-description {
    margin-bottom: 1.5em;
    font-size: 1.08rem;
    color: #444;
}

.resource-section {
    margin-bottom: 2rem;
}

.resource-section h4 {
    background: linear-gradient(90deg, #f3f4f8 80%, #e9ecef 100%);
    border-left: 5px solid #667eea;
    border-radius: 7px 18px 18px 7px;
    padding: 0.6em 1.2em 0.6em 1.1em;
    margin-bottom: 1.1rem;
    margin-top: 0.5rem;
    font-size: 1.18rem;
    font-weight: 700;
    color: #444;
    box-shadow: 0 2px 8px rgba(102,126,234,0.06);
    display: flex;
    align-items: center;
    gap: 0.7em;
    letter-spacing: 0.01em;
    transition: background 0.2s, color 0.2s;
}

body.dark-mode .resource-section h4 {
    background: linear-gradient(90deg, #232b4d 80%, #232b4d 100%);
    border-left: 5px solid #764ba2;
    color: #e5e5e5;
    box-shadow: 0 2px 12px rgba(35,43,77,0.13);
}

.resource-section ul {
    list-style: none;
    padding-left: 0;
}

.resource-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f4;
    padding-left: 1.5rem;
    position: relative;
}

.resource-section li:before {
    content: "•";
    color: #667eea;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.resource-section li:last-child {
    border-bottom: none;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.stats-widget, .categories-widget {

    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stats-widget h3, .categories-widget h3 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f1f3f4;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.category-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.category-name {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 0.2rem;
}

body.dark-mode .category-name {
    color: #bbb !important;
}

.category-count {
    color: #666;
    font-size: 0.85rem;
}


.create-form, #create-post-form {
  margin: 3rem auto 0 auto;
  max-width: 1100px;
  min-width: 420px;
  padding: 2.2rem 2.2rem 1.5rem 2.2rem;
  border-radius: 22px;
  background: linear-gradient(120deg, #f8f9fa 0%, #e9ecef 60%, #e3e6f3 100%);
  box-shadow: 0 8px 32px rgba(102,126,234,0.13), 0 2px 24px rgba(160,140,209,0.09);
  min-height: 80px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s, background 0.2s, transform 0.18s;
  text-align: center;
  gap: 0.3rem;
}
body.dark-mode .create-form, body.dark-mode #create-post-form {
  background: #23272b !important;
  color: #e5e5e5 !important;
  border-color: #33384d !important;
  box-shadow: 0 12px 48px 0 rgba(80, 80, 160, 0.28), 0 2px 24px rgba(0,0,0,0.18), 0 0 0 1.5px #23272b inset;
}
.create-form:hover, #create-post-form:hover {
  box-shadow: 0 16px 48px rgba(80, 80, 160, 0.19), 0 4px 16px rgba(0,0,0,0.11);
}

#create-post-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem 2rem;
  margin-bottom: 1.2rem;
  width: 100%;
}
#create-post-form .form-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-bottom: 0.7rem;
  width: 100%;
}
#create-post-form .form-group:nth-child(3),
#create-post-form .form-group:nth-child(4),
#create-post-form .form-group:nth-child(5),
#create-post-form .form-group:nth-child(6) {
  grid-column: 1 / 3;
}
#create-post-form input,
#create-post-form select,
#create-post-form textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 1.08rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  background: #f8f9fa;
  color: #333;
}
body.dark-mode #create-post-form input,
body.dark-mode #create-post-form select,
body.dark-mode #create-post-form textarea {
  background: #23272b;
  color: #e5e5e5;
  border-color: #33384d;
}
#create-post-form input:focus,
#create-post-form select:focus,
#create-post-form textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.13);
}
#create-post-form label {
  font-weight: 700;
  color: #4a4a7a;
  margin-bottom: 0.4rem;
  text-align: left;
}
body.dark-mode #create-post-form label {
  color: #bbb !important;
}
#create-post-form .submit-btn {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 1.25rem 0;
  font-size: 1.18rem;
  width: 220px;
  margin-top: 1.2rem;
  margin-bottom: 2.2rem;
  box-shadow: 0 4px 16px rgba(160, 140, 209, 0.13);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
  align-self: flex-end;
  text-align: right;
}
#create-post-form .submit-btn:hover {
  background: linear-gradient(90deg, #764ba2 0%, #667eea 100%);
  box-shadow: 0 8px 24px rgba(102,126,234,0.18);
  transform: translateY(-3px) scale(1.035);
  z-index: 1;
}

@media (max-width: 700px) {
  .create-form, #create-post-form {
    min-width: 0;
    padding: 1.2rem 0.5rem 1.2rem 0.5rem;
    max-width: 98vw;
  }
  #create-post-form .form-row {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label,
#profile-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    text-align: left !important;
    width: 100%;
    padding-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

body.dark-mode .main-column,
body.dark-mode .sidebar-section,
body.dark-mode .create-form,
body.dark-mode .dashboard-topic,
body.dark-mode .stats-widget,
body.dark-mode .categories-widget,
body.dark-mode .chart-container,
body.dark-mode .modal-content,
body.dark-mode .filters-section,
body.dark-mode .stat-card,
body.dark-mode .post-preview,
body.dark-mode .add-note-section {
    background: #23272b !important;
    color: #e5e5e5 !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

body.dark-mode .modal-header {
    background: linear-gradient(90deg, #232b4d 0%, #764ba2 100%) !important;
    color: #fff !important;
}

body.dark-mode .post-card,
body.dark-mode .category-item,
body.dark-mode .reply-item,
body.dark-mode .sticky-note,
body.dark-mode .notes-container,
body.dark-mode .activity-item {
    background: #23272b !important;F
    color: #e5e5e5 !important;
    border-color: #33384d !important;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea,
body.dark-mode .filter-select,
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #2d2f31 !important;
    color: #e5e5e5 !important;
    border-color: #33384d !important;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus,
body.dark-mode .filter-select:focus,
body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
    border-color: #764ba2 !important;
    box-shadow: 0 0 0 3px rgba(118,75,162,0.15) !important;
    background: #55585e !important;
}

.filters-section {

    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.filter-select {
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;

    cursor: pointer;
}

.posts-count {
    background: transparent;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #666;
    box-shadow: none;
    border: none;
}

.profile-btn-row {
    display: flex;
    flex-direction: row;
    gap: 0 !important;
    justify-content: flex-start;
    align-items: center;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    width: fit-content;
}
.profile-btn-row .submit-btn,
.profile-btn-row .save-profile-btn,
.profile-btn-row .sign-out-btn {
    margin: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}
.profile-btn-row .submit-btn,
.profile-btn-row .save-profile-btn,
.profile-btn-row .sign-out-btn {
    margin: 0 !important;
}
.submit-btn, .toggle-btn, .save-profile-btn, .post-note-btn,
#create-post-form .submit-btn,
.add-note-section .submit-btn,
#create-topic-form .submit-btn,
#profile-form .submit-btn {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    animation: btnGradientMove 16s linear infinite alternate, btnPulse 16s infinite, btnHue 16s infinite alternate;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(102,126,234,0.13) !important;
    border: none;
}
body.dark-mode .google-signin-btn {
    background: #23272b !important;
    color: #e5e5e5 !important;
    border-color: #33384d !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
}
.submit-btn:hover, .toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}
.submit-btn:active, .toggle-btn:active, .save-profile-btn:active, .post-note-btn:active {
    box-shadow: 0 1.5px 4px rgba(102,126,234,0.18) !important;
    transform: scale(0.97);
}

.create-topic-section {
    margin-bottom: 2rem;
}

.dashboard-topic {

    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border-left: 4px solid #667eea;
}

.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.dashboard-topic h3 {
    color: #fff;
    margin-bottom: 0;
    font-size: 1.3rem;
}

.topic-controls {
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
}

.control-btn:hover {

    border-color: #bbb;
}

.edit-btn {
    color: #007bff;
}

.edit-btn:hover {
    background: #e3f2fd;
    border-color: #007bff;
    color: #0056b3;
}

.delete-btn {
    color: #dc3545;
}

.delete-btn:hover {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.edit-btn:hover {
    color: #007bff;
    border-color: #007bff;
}

.delete-btn:hover {
    color: #dc3545;
    border-color: #dc3545;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.post-header h4 {
    margin: 0;
}

.dashboard-topic p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.topic-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.add-note-section {

    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid #e9ecef;
}

.notes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    background: #fafafa;
    border-radius: 8px;
    margin: 1rem 0;
    min-height: 200px;
}

.sticky-note {

    color: #222 !important;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    width: 200px;
    min-height: 120px;
    position: relative;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.1);
    transform: rotate(-1deg);
    transition: transform 0.2s ease;
}

body.dark-mode .sticky-note {
    background: #23272b !important;
    color: #e5e5e5 !important;
    border-color: #33384d !important;
}

.sticky-note:hover {
    transform: rotate(0deg) scale(1.05);
    z-index: 10;
}

.sticky-note:nth-child(even) {
    background: #d1ecf1;
    border-color: #bee5eb;
    transform: rotate(1deg);
}

.sticky-note:nth-child(3n) {
    background: #d4edda;
    border-color: #c3e6cb;
    transform: rotate(-0.5deg);
}

.sticky-note:nth-child(4n) {
    background: #f5c6cb;
    border-color: #f5c6cb;
    transform: rotate(0.8deg);
}

.sticky-note-text {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: #666;
}

.sticky-note-author {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    font-size: 0.7rem;
    color: #666;
    text-align: right;
}

.sticky-note-animate {
    animation: stickyNotePopIn 0.5s cubic-bezier(.42,0,.58,1.0);
    transition: transform 0.18s cubic-bezier(.42,0,.58,1.0), box-shadow 0.18s;
}
@keyframes stickyNotePopIn {
    0% {
        opacity: 0;
        transform: scale(0.7) rotate(-8deg) translateY(30px);
    }
    60% {
        opacity: 1;
        transform: scale(1.08) rotate(2deg) translateY(-6px);
    }
    80% {
        transform: scale(0.96) rotate(-1deg) translateY(2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg) translateY(0);
    }
}

.sticky-note-animate:hover {
    transform: scale(1.06) rotate(2deg) translateY(-4px);
    box-shadow: 0 6px 24px rgba(102,126,234,0.18), 0 1.5px 6px rgba(0,0,0,0.10);
    z-index: 10;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {

    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sidebar-section h3 {
    color: #b0b3b8 !important;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.quick-stats {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.quick-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.quick-stat + .sidebar-divider {
    border: none;
    border-bottom: 1.5px solid #e9ecef;
    margin: 1rem 0;
    width: 100%;
}

.sidebar-section .quick-stats {
    margin-bottom: 0;
    padding-bottom: 0;
}

}

.quick-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.stat-name {
    color: #666;
    font-size: 0.9rem;
}

.recent-activity {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.activity-item {

    padding: 0.8rem;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.activity-title {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    display: block;
}

.activity-meta {
    color: #666;
    font-size: 0.8rem;
}

.guidelines-list {
    list-style: none;
}

.guidelines-list li {
    padding: 0.5rem 0;
    color: #666;
    border-bottom: 1px solid #f1f3f4;
    position: relative;
    padding-left: 1.5rem;
}

.guidelines-list li:before {
    content: "•";
    color: #667eea;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.guidelines-list li:last-child {
    border-bottom: none;
}

.quick-links {
    list-style: none;
}

.quick-links li {
    margin-bottom: 0.5rem;
}

.quick-links a {
    color: #111 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.quick-links a:hover {
    color: #764ba2 !important;
    text-decoration: underline;
}

.quick-links-color {
    color: #888 !important;
}
body.dark-mode .quick-links-color {
    color: #bbb !important;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {

    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    border-top: 4px solid #667eea;
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    color: #666;
    font-size: 1rem;
}

.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.chart-container {

    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chart-container h3 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
}

.chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chart-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chart-label {
    min-width: 120px;
    font-size: 0.9rem;
    color: #666;
}

.chart-progress {
    flex: 1;
    height: 20px;
    background: #f1f3f4;
    border-radius: 10px;
    overflow: hidden;
}

.chart-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.8s ease;
}

.chart-value {
    color: #444;
}
body.dark-mode .chart-value {
    color: #bbb !important;
}

.chart-title {
    color: #333;
}
body.dark-mode .chart-title {
    color: #d1d5db !important;
}

.profile-display {
    margin-top: 2rem;
}

.profile-display h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.post-preview {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

.post-preview h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.footer-content small {
    opacity: 0.8;
}

.site-footer {
    background: transparent;
    color: #888;
    text-align: center;
    padding: 1.5rem 0 1.2rem 0;
    margin-top: 3rem;
    width: 100%;
    font-size: 1.1em;
    letter-spacing: 0.01em;
    position: relative;
    z-index: 10;
    box-shadow: none;
}
.site-footer .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    opacity: 1;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.site-footer, .site-footer .footer-content {
    background: none !important;
}

.notification {
    position: fixed;
    top: 90px;
    right: 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
    max-width: 400px;
}

.notification.show {
    display: flex;
    animation: slideIn 0.3s ease;
}

.notification.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    padding: 0;
    margin: 0;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.balloon-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.balloon {
    position: absolute;
    width: 50px;
    height: 70px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: floatUp 4s ease-out forwards;
       opacity: 0.9;
}

.balloon::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 20px;
    background: #333;
}

.balloon.red {
    background: linear-gradient(45deg, #ff6b6b, #ff5252);
}

.balloon.blue {
    background: linear-gradient(45deg, #4285f4, #3367d6);
}

.balloon.green {
    background: linear-gradient(45deg, #34a853, #2d7d3c);
}

.balloon.yellow {
    background: linear-gradient(45deg, #fbbc05, #f9ab00);
}

.balloon.purple {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.balloon.pink {
    background: linear-gradient(45deg, #ff6b81, #ff5252);
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0.9;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.balloon-success {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    font-size: 1.2rem;
    font-weight: 600;
    z-index: 10000;
    text-align: center;
    animation: balloonSuccessAnimation 3s ease-out forwards;
    pointer-events: none;
}

@keyframes balloonSuccessAnimation {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    15% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
    25% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    90% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}

.theme-toggle-btn {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 2000;
    background: #fff;
    color: #333;
    border: 1.5px solid #e9ecef;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-color: #667eea;
    transition: transform 0.18s cubic-bezier(.42,0,.58,1.0), box-shadow 0.18s;
}
.theme-toggle-btn:hover {
    box-shadow: 0 4px 16px rgba(102,126,234,0.18);
    transform: scale(1.08) rotate(-10deg);
}
.theme-toggle-btn:active {
    animation: themeToggleSpin 0.4s cubic-bezier(.42,0,.58,1.0);
}
@keyframes themeToggleSpin {
    0% { transform: scale(1) rotate(0deg);}
    40% { transform: scale(1.15) rotate(120deg);}
    70% { transform: scale(0.95) rotate(240deg);}
    100% { transform: scale(1) rotate(360deg);}
}

body.dark-mode {
    background-color: #181a1b;
    color: #e5e5e5;
}
body.dark-mode .main-header {
    background: linear-gradient(120deg, #232b4d 0%, #3a2e4d 50%, #a67c3d 100%);
    color: #fff;
    box-shadow: 0 8px 32px rgba(35,43,77,0.18);
    animation: headerWaveDark 16s ease-in-out infinite alternate;
    background-size: 200% 200%;
}
@keyframes headerWaveDark {
    0% { background-position: 0% 50%; filter: hue-rotate(0deg);}
    50% { background-position: 100% 50%; filter: hue-rotate(20deg);}
    100% { background-position: 0% 50%; filter: hue-rotate(-20deg);}
}
body.dark-mode .main-header::before {
    background: radial-gradient(circle at 60% 40%, #a67c3d 0%, #3a2e4d 60%, transparent 100%);
    animation: floatBlob1Dark 12s ease-in-out infinite alternate, blobMorph1Dark 24s ease-in-out infinite alternate;
}
body.dark-mode .main-header::after {
    background: radial-gradient(circle at 40% 60%, #232b4d 0%, #3a2e4d 70%, transparent 100%);
    animation: floatBlob2Dark 15s ease-in-out infinite alternate, blobMorph2Dark 28s ease-in-out infinite alternate;
}
@keyframes floatBlob1Dark {
    0% { transform: scale(1) translateY(0) rotate(0deg);}
    50% { transform: scale(1.08) translateY(30px) rotate(10deg);}
    100% { transform: scale(1.04) translateY(10px) rotate(-10deg);}
}
@keyframes floatBlob2Dark {
    0% { transform: scale(1) translateY(0) rotate(0deg);}
    50% { transform: scale(0.95) translateY(-20px) rotate(-8deg);}
    100% { transform: scale(1.02) translateY(10px) rotate(8deg);}
}
@keyframes blobMorph1Dark {
    0% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
    25% { border-radius: 60% 40% 55% 45% / 50% 70% 30% 50%; }
    50% { border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%; }
    75% { border-radius: 55% 45% 40% 60% / 60% 50% 50% 40%; }
    100% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
}
@keyframes blobMorph2Dark {
    0% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
    20% { border-radius: 45% 55% 60% 40% / 55% 65% 35% 45%; }
    50% { border-radius: 60% 40% 40% 60% / 40% 60% 60% 40%; }
    80% { border-radius: 50% 60% 45% 55% / 60% 50% 50% 40%; }
    100% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
}
body.dark-mode .header-content h1 {
    background: linear-gradient(90deg, #fff 10%, #a67c3d 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientTextMoveDark 8s linear infinite alternate, colorShiftDark 10s linear infinite alternate;
}
@keyframes gradientTextMoveDark {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}
@keyframes colorShiftDark {
    0% { filter: hue-rotate(0deg);}
    100% { filter: hue-rotate(20deg);}
}
body.dark-mode .header-content .header-emoji {
    animation: bounce 2s infinite, emojiColorDark 8s infinite alternate;
}
@keyframes emojiColorDark {
    0% { filter: hue-rotate(0deg);}
    100% { filter: hue-rotate(40deg);}
}

body:not(.dark-mode) .sidebar-section h3,
body:not(.dark-mode) .stats-widget h3,
body:not(.dark-mode) .categories-widget h3,
body:not(.dark-mode) .quick-links-title,
body:not(.dark-mode) .recent-activity-title,
body:not(.dark-mode) .guidelines-title,
body:not(.dark-mode) .browse-posts-title,
body:not(.dark-mode) .create-post-title,
body:not(.dark-mode) .dashboard-title,
body:not(.dark-mode) .profile-title,
body:not(.dark-mode) .community-stats-title {
    color: #111 !important;
}
body:not(.dark-mode) .browse-posts-title {
    color: #000 !important;
}

body.dark-mode .browse-posts-title {
    color: #fff !important;
}

body:not(.dark-mode) .community-stats-title,
body:not(.dark-mode) .categories-widget h3 {
    color: #111 !important;
}

body.dark-mode .community-stats-title,
body.dark-mode .categories-widget h3 {
    color: #b0b3b8 !important;
}
body:not(.dark-mode) .categories-widget h3 {
    color: #111 !important;
}

body.dark-mode .community-stats-title {
    color: #bbb !important;
}

body:not(.dark-mode) .dashboard-topic h3 {
    color: #111 !important;
}

body:not(.dark-mode) .topic-meta {
    color: #111 !important;
}

body.dark-mode .main-nav {
    background: #23272b !important;
    border-bottom: 2px solid #33384d !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
}

body.dark-mode .nav-btn {
    color: #b0b3b8 !important;
}

body.dark-mode .nav-btn.active,
body.dark-mode .nav-btn:active,
body.dark-mode .nav-btn:focus {
    color: #fff !important;
    background-color: #23272b !important;
    border-bottom-color: #667eea !important;
    outline: none !important;
}

.desc-color {
    color: #222;
}
body.dark-mode .desc-color {
    color: #bbb;
}

body.dark-mode .quick-link-modal .modal-body,
body.dark-mode .quick-link-modal .modal-body ul li,
body.dark-mode .quick-link-modal .modal-body span,
body.dark-mode .quick-link-modal .modal-body p {
    color: #bbb !important;
}

body.dark-mode .quick-link-modal .modal-body strong {
    color: #bbb !important;
    font-weight: bold !important;
}

.quick-link-modal h2,
.quick-link-modal .modal-header h2,
.quick-link-modal .modal-body h2 {
    color: #888 !important;
}
body.dark-mode .quick-link-modal h2,
body.dark-mode .quick-link-modal .modal-header h2,
body.dark-mode .quick-link-modal .modal-body h2 {
    color: #bbb !important;
}

.section-title {
    color: #888 !important;
    font-weight: 700;
}
body.dark-mode .section-title {
    color: #bbb !important;
}

.topics-count-grey {
    color: #888 !important;
}
body.dark-mode .topics-count-grey {
    color: #bbb !important;
}

.sticky-notes-title-grey {
    color: #888 !important;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}
body.dark-mode .sticky-notes-title-grey {
    color: #bbb !important;
}

.add-note-title-grey {
    color: #888 !important;
}
body.dark-mode .add-note-title-grey {
    color: #d1d5db !important;
}

.sticky-notes-btn {
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 0.5rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
}
.sticky-notes-desc {
    background: #f7f7fa;
    color: #444;
    border-radius: 7px;
    padding: 0.7em 1em;
    font-size: 0.98rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 6px rgba(0,126,234,0.06);
    transition: all 0.18s;
}
body.dark-mode .sticky-notes-desc {
    background: #23272f;
    color: #ccc;
    border: 1px solid #444;
}
.sticky-notes-desc-text {
    margin: 0;
    padding: 0;
    font-size: 0.98rem;
    line-height: 1.6;
}


.tos-privacy-btn {
    position: fixed;
    right: 32px;
    bottom: 32px;
    z-index: 10010;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 0.35rem 0.9rem; 
    border-radius: 14px;     
    font-weight: 700;
    font-size: 0.89rem;      
    box-shadow: 0 4px 16px rgba(102,126,234,0.18);
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.12s;
    display: none; 
    outline: none;
}
.tos-privacy-btn:hover {
    background: linear-gradient(90deg, #764ba2 0%, #667eea 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(102,126,234,0.22);
    transform: translateY(-2px) scale(1.04);
}
body.dark-mode .tos-privacy-btn {
    position: fixed;
    right: 32px;
    bottom: 32px;
    background: linear-gradient(90deg, #232b4d 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 0.35rem 0.9rem;
    border-radius: 14px;
    font-size: 0.89rem;
}
body.dark-mode .tos-privacy-btn:hover {
    background: linear-gradient(90deg, #764ba2 0%, #232b4d 100%);
    color: #fff;
}

.tos-privacy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.tos-privacy-modal .modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}
.tos-privacy-modal .modal-header {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 1.5rem 2rem;
    border-radius: 12px 12px 0 0;
    font-size: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tos-privacy-modal .modal-body {
    padding: 2rem;
    line-height: 1.6;
    font-size: 1.08rem;
    background: #fff;
    color: #222;
    border-radius: 0 0 12px 12px;
}
body.dark-mode .tos-privacy-modal .modal-body {
    background: #23272f;
    color: #eee;
}
@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
        gap: 0;
        margin-top: 0;
        padding: 0 5px;
        padding-bottom: 0;
    }
}

body.dark-mode .quick-link-modal .modal-content,
body.dark-mode .quick-link-modal .modal-body {
    background: #23272f !important;
    color: #e5e5e5 !important;
}

.sidebar-section.active-description {
    background: #f1f3f4 !important;
    transition: background 0.2s;
}
body.dark-mode .sidebar-section.active-description {
    background: #23272f !important;
}

.section-title-card {
    display: flex;
    align-items: center;
    gap: 0.6em;
    background: #f7f7fa;
    color: #667eea;
    padding: 0.7em 1.2em;
    border-radius: 10px;
    margin-bottom: 1.2em;
    font-size: 1.13rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(102,126,234,0.07);
    border: 1px solid #e9ecef;
    width: fit-content;
}
body.dark-mode .section-title-card {
    background: #23272f;
    color: #b0b3b8;
    border: 1px solid #33384d;
    box-shadow: 0 2px 12px rgba(35,43,77,0.13);
}

.section-title-card h4, .section-title-card h3, .section-title-card h2 {
    margin: 0;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
}
.profile-prompt-message {
    color: #000 !important;
}
body.dark-mode .profile-prompt-message {
    color: #bbb !important;
}

body.dark-mode .profile-display label,
body.dark-mode .profile-section label,
body.dark-mode .profile-form label {
    color: #bbb !important;
}


.submit-btn,
#toggle-create-topic,
.save-profile-btn,
.post-note-btn {
    font-size: 1.08rem !important;
    font-weight: 600;
}

body.dark-mode #create-post-form label,
body.dark-mode #create-post-form input,
body.dark-mode #create-post-form select,
body.dark-mode #create-post-form textarea,
body.dark-mode #create-post-form input::placeholder,
body.dark-mode #create-post-form textarea::placeholder,
body.dark-mode #create-post-form option {
    color: #888 !important;
}

body.dark-mode #create-post-form label {
    color: #bbb !important;
}

body.dark-mode #profile-form label {
    color: #000000 !important;
}
body.dark-mode #profile-form input,
body.dark-mode #profile-form select,
body.dark-mode #profile-form textarea,
body.dark-mode #profile-form input::placeholder,
body.dark-mode #profile-form textarea::placeholder,
body.dark-mode #profile-form option {
    color: #888 !important;
}


body.dark-mode .profile-section,
body.dark-mode .profile-form {
    background: #23272b !important;
    color: #e5e5e5 !important;
    border-color: #33384d !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
}

.profile-section {
  margin: 3rem auto 0 auto;
  max-width: 1100px;
  min-width: 420px;
  padding: 0.5rem 2.2rem 0.5rem 2.2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px 0 rgba(40, 40, 60, 0.18);
  min-height: 80px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s, background 0.2s;
  text-align: center;
  gap: 0.3rem;
  border: 1.5px solid #e9ecef;
}
body.dark-mode .profile-section {
  background: #23272b !important;
  color: #e5e5e5 !important;
  border-color: #33384d !important;
  box-shadow: 0 12px 48px 0 rgba(80, 80, 160, 0.28), 0 2px 24px rgba(0,0,0,0.18), 0 0 0 1.5px #23272b inset;
}
.profile-section:hover {
  box-shadow: 0 16px 48px rgba(80, 80, 160, 0.19), 0 4px 16px rgba(0,0,0,0.11);
}
.profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  color: #fff;
  margin: 0 auto 1.5rem auto;
  box-shadow: 0 4px 16px rgba(160, 140, 209, 0.13);
  border: 5px solid #fff;
  outline: 3px solid #a18cd1;
  outline-offset: 2px;
  transition: transform 0.18s;
}
.profile-avatar:hover {
  transform: scale(1.04) rotate(-2deg);
  box-shadow: 0 8px 32px rgba(160, 140, 209, 0.18);
}
.profile-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: #4a4a7a;
  margin-bottom: 0.3rem;
  text-align: center;
  letter-spacing: 0.01em;
}
.profile-desc {
  color: #888;
  font-size: 1.08rem;
  margin-bottom: 1.7rem;
  text-align: center;
  font-weight: 500;
}
.profile-form {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 1.2rem;
  margin-bottom: 0.7rem;
  align-items: end;
}
.profile-form .form-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-bottom: 0.2rem;
}
.profile-form .form-group:nth-child(3) {
  grid-column: 1 / 3;
}
.profile-form .form-group:nth-child(4) {
  grid-column: 1 / 3;
}
.profile-form .form-group:nth-child(5) {
  grid-column: 1 / 3;
}

.profile-form .profile-btn-row {
  grid-column: 1 / 3;
  justify-self: center;
}
}
form#profile-form .form-actions {
  grid-column: 1 / 3;
  display: flex;
  gap: 1.5rem;
  margin-top: 1.2rem;
  margin-bottom: 0;
  width: 100%;
  justify-content: center;
  background: linear-gradient(90deg, #23272b 60%, #2d2f31 100%);
  border-radius: 16px;
  box-shadow: 0 6px 32px 0 rgba(80, 80, 160, 0.13);
  padding: 1.2rem 1.2rem 1.4rem 1.2rem;
  border: 1.5px solid #3a3a4d;
}
.profile-signout-btn {
  background: linear-gradient(90deg, #f857a6 0%, #ff5858 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 1.25rem 0;
  font-size: 1.18rem;
  width: 220px;
  min-width: 120px;
  margin-top: 1.2rem;
  margin-bottom: 2.2rem;
  box-shadow: 0 4px 16px rgba(248, 87, 166, 0.13);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
  align-self: flex-end;
  text-align: center;
}
.profile-signout-btn:hover {
  background: linear-gradient(90deg, #ff5858 0%, #f857a6 100%);
  box-shadow: 0 8px 24px rgba(248,87,166,0.18);
  transform: translateY(-3px) scale(1.035);
  z-index: 1;
}
.profile-save-btn {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 1.25rem 0;
  font-size: 1.18rem;
  width: 220px;
  margin-top: 1.2rem;
  margin-bottom: 2.2rem;
  box-shadow: 0 4px 16px rgba(160, 140, 209, 0.13);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
  align-self: flex-start;
}
.profile-save-btn:hover {
  background: linear-gradient(90deg, #764ba2 0%, #667eea 100%);
  box-shadow: 0 8px 24px rgba(102,126,234,0.18);
  transform: translateY(-3px) scale(1.035);
  z-index: 1;
}
.profile-display-card {
  background: linear-gradient(90deg, #f8f9fa 60%, #e9ecef 100%);
  color: #333;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(102,126,234,0.09);
  padding: 1.2rem 2.5rem;
  margin-top: 1.2rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  border: 1.5px solid #e9ecef;
  max-width: 700px;
  min-width: 320px;
  width: 100%;
}
body.dark-mode .profile-display-card {
  background: #23272b !important;
  color: #e5e5e5 !important;
  border-color: #33384d !important;
}
.profile-display-card strong {
  color: #764ba2;
  font-weight: 700;
}

.profile-signin-btn {
  background: linear-gradient(90deg, #fff 0%, #f8f9fa 100%);
  color: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 1.5px solid #e0e3e7;
  border-radius: 12px;
  padding: 1.25rem 0;
  font-size: 1.18rem;
  width: 240px;
  margin: 1.2rem auto 2.2rem auto;
  box-shadow: 0 4px 24px 0 rgba(66, 133, 244, 0.10), 0 1.5px 8px 0 rgba(0,0,0,0.04);
  cursor: pointer;
  font-size: 1.18rem;
  width: 240px;
  margin: 1.2rem auto 2.2rem auto;
  box-shadow: 0 4px 24px 0 rgba(66, 133, 244, 0.10), 0 1.5px 8px 0 rgba(0,0,0,0.04);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s, border-color 0.18s, color 0.18s;
  letter-spacing: 0.01em;
  align-self: center;
  gap: 0.7em;
  outline: none;
}
.profile-signin-btn i {
  color: #4285f4;
  font-size: 1.25em;
  margin-right: 0.6em;
}
.profile-signin-btn:hover, .profile-signin-btn:focus {
  background: linear-gradient(90deg, #f8f9fa 0%, #fff 100%);
  box-shadow: 0 8px 32px rgba(66,133,244,0.16), 0 2px 12px rgba(0,0,0,0.07);
  transform: translateY(-3px) scale(1.045);
  color: #1967d2;
  border-color: #4285f4;
  z-index: 1;
}
.profile-signin-btn:active {
  background: #e8f0fe;
  color: #174ea6;
  border-color: #4285f4;
  box-shadow: 0 2px 8px rgba(66,133,244,0.10);
}

body:not(.dark-mode) .profile-signin-btn {
  background: linear-gradient(90deg, #fff 0%, #f8f9fa 100%);
  color: #4285f4;
  border: 1.5px solid #c6dafc;
}
body:not(.dark-mode) .profile-signin-btn i {
  color: #4285f4;
}
body:not(.dark-mode) .profile-signin-btn:hover, 
body:not(.dark-mode) .profile-signin-btn:focus {
  color: #174ea6;
  border-color: #4285f4;
  background: #f1f8ff;
}
body:not(.dark-mode) .profile-signin-btn:active {
  color: #174ea6;
  background: #e8f0fe;
  border-color: #4285f4;
}

.main-header {
    background: linear-gradient(120deg, #667eea 0%, #764ba2 50%, #ffb347 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem 3rem 2rem;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(102,126,234,0.13);
    animation: headerWave 16s ease-in-out infinite alternate;
    background-size: 200% 200%;
}
@keyframes headerWave {
    0% { background-position: 0% 50%; filter: hue-rotate(0deg);}
    50% { background-position: 100% 50%; filter: hue-rotate(30deg);}
    100% { background-position: 0% 50%; filter: hue-rotate(-30deg);}
}
.main-header::before,
.main-header::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    opacity: 0.28;
    z-index: 0;
    pointer-events: none;
    transition: filter 1s;
    filter: blur(4px) brightness(1.2) saturate(1.3);
    mix-blend-mode: lighten;
}
.main-header::before {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle at 60% 40%, #ffb347 0%, #764ba2 60%, transparent 100%);
    top: -140px;
    left: -140px;
    animation: floatBlob1 12s ease-in-out infinite alternate, blobMorph1 24s ease-in-out infinite alternate;
}
.main-header::after {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle at 40% 60%, #667eea 0%, #764ba2 70%, transparent 100%);
    bottom: -100px;
    right: -100px;
    animation: floatBlob2 15s ease-in-out infinite alternate, blobMorph2 28s ease-in-out infinite alternate;
}
@keyframes blobMorph1 {
    0% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
    25% { border-radius: 60% 40% 55% 45% / 50% 70% 30% 50%; }
    50% { border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%; }
    75% { border-radius: 55% 45% 40% 60% / 60% 50% 50% 40%; }
    100% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
}
@keyframes blobMorph2 {
    0% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
    20% { border-radius: 45% 55% 60% 40% / 55% 65% 35% 45%; }
    50% { border-radius: 60% 40% 40% 60% / 40% 60% 60% 40%; }
    80% { border-radius: 50% 60% 45% 55% / 60% 50% 50% 40%; }
    100% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
}
.header-content {
    position: relative;
    z-index: 1;
}
.header-content h1 {
    font-size: 3rem;
    margin-bottom: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 0 2px 16px rgba(102,126,234,0.13);
    background: linear-gradient(90deg, #fff 10%, #ffb347 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientTextMove 8s linear infinite alternate, colorShift 10s linear infinite alternate;
}
@keyframes gradientTextMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}
@keyframes colorShift {
    0% { filter: hue-rotate(0deg);}
    100% { filter: hue-rotate(30deg);}
}
.header-content p {
    font-size: 1.25rem;
    opacity: 0.95;
    color: #f8f9fa !important;
    text-shadow: none;
    margin-bottom: 0.5rem;
    animation: fadeInUp 2s;
}
.header-content .header-emoji {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
    animation: bounce 2s infinite, emojiColor 8s infinite alternate;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0);}
    50% { transform: translateY(-12px);}
}
@keyframes emojiColor {
    0% { filter: hue-rotate(0deg);}
    100% { filter: hue-rotate(60deg);}
}

.main-nav {
    background: #f3f4f6;
    border-bottom: 2px solid #e9ecef;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    padding: 0 20px;
}

.nav-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    background-color: #f8f9fa;
    color: #667eea;
}

.nav-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background-color: #f8f9fa;
}

.nav-btn i {
    font-size: 1.1rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.main-column {

    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0);}
}

.welcome-section h2 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.welcome-section p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.trending-section h3 {
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
}

.trending-section h3 i {
    color: #ff6b6b;
}

body:not(.dark-mode) .trending-section h3 {
    color: #333 !important;
}

body.dark-mode .trending-section h3 {
    color: #b0b3b8 !important;
}

.post-card {

    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    border-left: 4px solid #764ba2;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.post-card h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

body.dark-mode .post-card h4 {
    color: #d1d5db !important;
}

.post-card p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.user-badge {
    background: #667eea;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.post-stats {
    color: #666;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-stats i {
    margin-right: 0.3rem;
}

.post-tags {
    margin-top: 1rem;
}

.tag {
    background: #e9ecef;
    color: #495057;
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.post-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.action-btn {
    border: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 500;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.like-btn {
    background: #ff6b81;
    color: white;
    border-color: #ff6b81;
}

.like-btn:hover {
    background: #ff5252;
}

.like-btn.liked {
    background: #d63031;
    border-color: #d63031;
}

.reply-btn {
    background: #4285f4;
    color: white;
    border-color: #4285f4;
}

.reply-btn:hover {
    background: #3367d6;
}

.share-btn {
    background: #34a853;
    color: white;
    border-color: #34a853;
}

.share-btn:hover {
    background: #2d7d3c;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.post-controls {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.control-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
}

.control-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.edit-btn {
    color: #007bff;
    border-color: #007bff;
}

.edit-btn:hover {
    background: #007bff;
    color: white;
}

.delete-btn {
    color: #dc3545;
    border-color: #dc3545;
}

.delete-btn:hover {
    background: #dc3545;
    color: white;
}

.reply-form {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 3px solid #667eea;
}

.reply-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 1rem;
}

.reply-form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.reply-form-actions input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

.submit-reply-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease;
}

.submit-reply-btn:hover {
    background: #764ba2;
}

.replies-container {
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid #e9ecef;
}

.reply-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    border-left: 3px solid #667eea;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.reply-author {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.reply-author-grey {
    color: #333 !important;
}
body.dark-mode .reply-author-grey {
    color: #bbb !important;
}

.reply-time {
    color: #666;
    font-size: 0.8rem;
}

.reply-controls {
    display: flex;
    gap: 0.3rem;
}

.reply-content {
    color: #555;
    line-height: 1.5;
    margin-bottom: 0.8rem;
}

.reply-actions {
    display: flex;
    gap: 0.5rem;
}

.reply-like-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.reply-like-btn:hover {
    background: #ff6b81;
    color: white;
    border-color: #ff6b81;
}

.reply-like-btn.liked {
    background: #d63031;
    color: white;
    border-color: #d63031;
}

.quick-link-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {

    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-header {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 12px 12px 0 0;
    font-size: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 2rem;
    line-height: 1.6;
    font-size: 1.08rem;

    color: #222;
    border-radius: 0 0 12px 12px;
}
.modal-body .tos-description {
    margin-bottom: 1.5em;
    font-size: 1.08rem;
    color: #444;
}
.modal-body .privacy-description {
    margin-bottom: 1.5em;
    font-size: 1.08rem;
    color: #444;
}

.resource-section {
    margin-bottom: 2rem;
}

.resource-section h4 {

    border-left: 5px solid #667eea;
    border-radius: 7px 18px 18px 7px;
    padding: 0.6em 1.2em 0.6em 1.1em;
    margin-bottom: 1.1rem;
    margin-top: 0.5rem;
    font-size: 1.18rem;
    font-weight: 700;
    color: #444;
    box-shadow: 0 2px 8px rgba(102,126,234,0.06);
    display: flex;
    align-items: center;
    gap: 0.7em;
    letter-spacing: 0.01em;
    transition: background 0.2s, color 0.2s;
}

body.dark-mode .resource-section h4 {
    background: linear-gradient(90deg, #232b4d 80%, #232b4d 100%);
    border-left: 5px solid #764ba2;
    color: #e5e5e5;
    box-shadow: 0 2px 12px rgba(35,43,77,0.13);
}

.resource-section ul {
    list-style: none;
    padding-left: 0;
}

.resource-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f4;
    padding-left: 1.5rem;
    position: relative;
}

.resource-section li:before {
    content: "•";
    color: #667eea;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.resource-section li:last-child {
    border-bottom: none;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.stats-widget, .categories-widget {

    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stats-widget h3, .categories-widget h3 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f1f3f4;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.category-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.category-name {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 0.2rem;
}

body.dark-mode .category-name {
    color: #bbb !important;
}

.category-count {
    color: #666;
    font-size: 0.85rem;
}

.create-form {

    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

body.dark-mode .main-column,
body.dark-mode .sidebar-section,
body.dark-mode .create-form,
body.dark-mode .dashboard-topic,
body.dark-mode .stats-widget,
body.dark-mode .categories-widget,
body.dark-mode .chart-container,
body.dark-mode .modal-content,
body.dark-mode .filters-section,
body.dark-mode .stat-card,
body.dark-mode .post-preview,
body.dark-mode .add-note-section {
    background: #23272b !important;
    color: #e5e5e5 !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

body.dark-mode .modal-header {
    background: linear-gradient(90deg, #232b4d 0%, #764ba2 100%) !important;
    color: #fff !important;
}

body.dark-mode .post-card,
body.dark-mode .category-item,
body.dark-mode .reply-item,
body.dark-mode .sticky-note,
body.dark-mode .notes-container,
body.dark-mode .activity-item {
    background: #23272b !important;
    color: #e5e5e5 !important;
    border-color: #33384d !important;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea,
body.dark-mode .filter-select,
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #2d2f31 !important; 
    color: #e5e5e5 !important;
    border-color: #33384d !important;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus,
body.dark-mode .filter-select:focus,
body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
    border-color: #764ba2 !important;
    box-shadow: 0 0 0 3px rgba(118,75,162,0.15) !important;
    background: #55585e !important;
}

.filters-section {

    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.filter-select {
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;

    cursor: pointer;
}

.posts-count {
    background: transparent;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #666;
    box-shadow: none;
    border: none;
}

.submit-btn, .toggle-btn, .save-profile-btn, .post-note-btn,
#create-post-form .submit-btn,
.add-note-section .submit-btn,
#create-topic-form .submit-btn,
#profile-form .submit-btn {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    animation: btnGradientMove 16s linear infinite alternate, btnPulse 16s infinite, btnHue 16s infinite alternate;
}

.submit-btn, .toggle-btn, .save-profile-btn, .post-note-btn,
#create-post-form .submit-btn,
.add-note-section .submit-btn,
#create-topic-form .submit-btn,
#profile-form .submit-btn {
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(102,126,234,0.13) !important;
    border: none;
}

.submit-btn:hover, .toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.submit-btn:active, .toggle-btn:active, .save-profile-btn:active, .post-note-btn:active {
    box-shadow: 0 1.5px 4px rgba(102,126,234,0.18) !important;
    transform: scale(0.97);
}

.create-topic-section {
    margin-bottom: 2rem;
}

.dashboard-topic {

    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border-left: 4px solid #667eea;
}

.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.dashboard-topic h3 {
    color: #fff;
    margin-bottom: 0;
    font-size: 1.3rem;
}

.topic-controls {
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
}

.control-btn:hover {
    background: #f8f9fa;
    border-color: #bbb;
}

.edit-btn {
    color: #007bff;
}

.edit-btn:hover {
    background: #e3f2fd;
    border-color: #007bff;
    color: #0056b3;
}

.delete-btn {
    color: #dc3545;
}

.delete-btn:hover {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.edit-btn:hover {
    color: #007bff;
    border-color: #007bff;
}

.delete-btn:hover {
    color: #dc3545;
    border-color: #dc3545;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.post-header h4 {
    margin: 0;
}

.dashboard-topic p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.topic-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.add-note-section {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid #e9ecef;
}

.notes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    background: #fafafa;
    border-radius: 8px;
    margin: 1rem 0;
    min-height: 200px;
}

.sticky-note {
    background: #f8f9fa !important;
    color: #222 !important;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    width: 200px;
    min-height: 120px;
    position: relative;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.1);
    transform: rotate(-1deg);
    transition: transform 0.2s ease;
}

body.dark-mode .sticky-note {
    background: #23272b !important;
    color: #e5e5e5 !important;
    border-color: #33384d !important;
}

.sticky-note:hover {
    transform: rotate(0deg) scale(1.05);
    z-index: 10;
}

.sticky-note:nth-child(even) {
    background: #d1ecf1;
    border-color: #bee5eb;
    transform: rotate(1deg);
}

.sticky-note:nth-child(3n) {
    background: #d4edda;
    border-color: #c3e6cb;
    transform: rotate(-0.5deg);
}

.sticky-note:nth-child(4n) {
    background: #f5c6cb;
    border-color: #f5c6cb;
    transform: rotate(0.8deg);
}

.sticky-note-text {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: #666;
}

.sticky-note-author {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    font-size: 0.7rem;
    color: #666;
    text-align: right;
}

.sticky-note-animate {
    animation: stickyNotePopIn 0.5s cubic-bezier(.42,0,.58,1.0);
    transition: transform 0.18s cubic-bezier(.42,0,.58,1.0), box-shadow 0.18s;
}
@keyframes stickyNotePopIn {
    0% {
        opacity: 0;
        transform: scale(0.7) rotate(-8deg) translateY(30px);
    }
    60% {
        opacity: 1;
        transform: scale(1.08) rotate(2deg) translateY(-6px);
    }
    80% {
        transform: scale(0.96) rotate(-1deg) translateY(2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg) translateY(0);
    }
}

.sticky-note-animate:hover {
    transform: scale(1.06) rotate(2deg) translateY(-4px);
    box-shadow: 0 6px 24px rgba(102,126,234,0.18), 0 1.5px 6px rgba(0,0,0,0.10);
    z-index: 10;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {

    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sidebar-section h3 {
    color: #b0b3b8 !important;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.quick-stats {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.quick-stat {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.quick-stat + .sidebar-divider {
    border: none;
    border-bottom: 1.5px solid #e9ecef;
    margin: 1rem 0;
    width: 100%;
}

.sidebar-section .quick-stats {
    margin-bottom: 0;
    padding-bottom: 0;
}

}

.quick-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.stat-name {
    color: #666;
    font-size: 0.9rem;
}

.recent-activity {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.activity-item {
    background: #f8f9fa;
    padding: 0.8rem;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.activity-title {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    display: block;
}

.activity-meta {
    color: #666;
    font-size: 0.8rem;
}

.guidelines-list {
    list-style: none;
}

.guidelines-list li {
    padding: 0.5rem 0;
    color: #666;
    border-bottom: 1px solid #f1f3f4;
    position: relative;
    padding-left: 1.5rem;
}

.guidelines-list li:before {
    content: "•";
    color: #667eea;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.guidelines-list li:last-child {
    border-bottom: none;
}

.quick-links {
    list-style: none;
}

.quick-links li {
    margin-bottom: 0.5rem;
}

.quick-links a {
    color: #111 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.quick-links a:hover {
    color: #764ba2 !important;
    text-decoration: underline;
}

.quick-links-color {
    color: #888 !important;
}
body.dark-mode .quick-links-color {
    color: #bbb !important;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {

    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    border-top: 4px solid #667eea;
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    color: #666;
    font-size: 1rem;
}

.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.chart-container {

    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chart-container h3 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
}

.chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chart-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chart-label {
    min-width: 120px;
    font-size: 0.9rem;
    color: #666;
}

.chart-progress {
    flex: 1;
    height: 20px;
    background: #f1f3f4;
    border-radius: 10px;
    overflow: hidden;
}

.chart-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.8s ease;
}

.chart-value {
    color: #444;
}
body.dark-mode .chart-value {
    color: #bbb !important;
}

.chart-title {
    color: #333;
}
body.dark-mode .chart-title {
    color: #d1d5db !important;
}

.profile-display {
    margin-top: 2rem;
}

.profile-display h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.post-preview {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

.post-preview h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.footer-content small {
    opacity: 0.8;
}

.site-footer {
    background: transparent;
    color: #888;
    text-align: center;
    padding: 1.5rem 0 1.2rem 0;
    margin-top: 3rem;
    width: 100%;
    font-size: 1.1em;
    letter-spacing: 0.01em;
    position: relative;
    z-index: 10;
    box-shadow: none;
}
.site-footer .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    opacity: 1;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.site-footer, .site-footer .footer-content {
    background: none !important;
}

.notification {
    position: fixed;
    top: 90px; 
    right: 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
    max-width: 400px;
}

.notification.show {
    display: flex;
    animation: slideIn 0.3s ease;
}

.notification.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    padding: 0;
    margin: 0;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.balloon-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.balloon {
    position: absolute;
    width: 50px;
    height: 70px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: floatUp 4s ease-out forwards;
       opacity: 0.9;
}

.balloon::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 20px;
    background: #333;
}

.balloon.red {
    background: linear-gradient(45deg, #ff6b6b, #ff5252);
}

.balloon.blue {
    background: linear-gradient(45deg, #4285f4, #3367d6);
}

.balloon.green {
    background: linear-gradient(45deg, #34a853, #2d7d3c);
}

.balloon.yellow {
    background: linear-gradient(45deg, #fbbc05, #f9ab00);
}

.balloon.purple {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.balloon.pink {
    background: linear-gradient(45deg, #ff6b81, #ff5252);
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0.9;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.balloon-success {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    font-size: 1.2rem;
    font-weight: 600;
    z-index: 10000;
    text-align: center;
    animation: balloonSuccessAnimation 3s ease-out forwards;
    pointer-events: none;
}

@keyframes balloonSuccessAnimation {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    15% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
    25% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    90% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}

.theme-toggle-btn {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 2000;

    color: #333;
    border: 1.5px solid #e9ecef;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-color: #667eea;
    transition: transform 0.18s cubic-bezier(.42,0,.58,1.0), box-shadow 0.18s;
}
.theme-toggle-btn:hover {
    box-shadow: 0 4px 16px rgba(102,126,234,0.18);
    transform: scale(1.08) rotate(-10deg);
}
.theme-toggle-btn:active {
    animation: themeToggleSpin 0.4s cubic-bezier(.42,0,.58,1.0);
}
@keyframes themeToggleSpin {
    0% { transform: scale(1) rotate(0deg);}
    40% { transform: scale(1.15) rotate(120deg);}
    70% { transform: scale(0.95) rotate(240deg);}
    100% { transform: scale(1) rotate(360deg);}
}

body.dark-mode {
    background-color: #181a1b;
    color: #e5e5e5;
}
body.dark-mode .main-header {
    background: linear-gradient(120deg, #232b4d 0%, #3a2e4d 50%, #a67c3d 100%);
    color: #fff;
    box-shadow: 0 8px 32px rgba(35,43,77,0.18);
    animation: headerWaveDark 16s ease-in-out infinite alternate;
    background-size: 200% 200%;
}
@keyframes headerWaveDark {
    0% { background-position: 0% 50%; filter: hue-rotate(0deg);}
    50% { background-position: 100% 50%; filter: hue-rotate(20deg);}
    100% { background-position: 0% 50%; filter: hue-rotate(-20deg);}
}
body.dark-mode .main-header::before {
    background: radial-gradient(circle at 60% 40%, #a67c3d 0%, #3a2e4d 60%, transparent 100%);
    animation: floatBlob1Dark 12s ease-in-out infinite alternate, blobMorph1Dark 24s ease-in-out infinite alternate;
}
body.dark-mode .main-header::after {
    background: radial-gradient(circle at 40% 60%, #232b4d 0%, #3a2e4d 70%, transparent 100%);
    animation: floatBlob2Dark 15s ease-in-out infinite alternate, blobMorph2Dark 28s ease-in-out infinite alternate;
}
@keyframes floatBlob1Dark {
    0% { transform: scale(1) translateY(0) rotate(0deg);}
    50% { transform: scale(1.08) translateY(30px) rotate(10deg);}
    100% { transform: scale(1.04) translateY(10px) rotate(-10deg);}
}
@keyframes floatBlob2Dark {
    0% { transform: scale(1) translateY(0) rotate(0deg);}
    50% { transform: scale(0.95) translateY(-20px) rotate(-8deg);}
    100% { transform: scale(1.02) translateY(10px) rotate(8deg);}
}
@keyframes blobMorph1Dark {
    0% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
    25% { border-radius: 60% 40% 55% 45% / 50% 70% 30% 50%; }
    50% { border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%; }
    75% { border-radius: 55% 45% 40% 60% / 60% 50% 50% 40%; }
    100% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
}
@keyframes blobMorph2Dark {
    0% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
    20% { border-radius: 45% 55% 60% 40% / 55% 65% 35% 45%; }
    50% { border-radius: 60% 40% 40% 60% / 40% 60% 60% 40%; }
    80% { border-radius: 50% 60% 45% 55% / 60% 50% 50% 40%; }
    100% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
}
body.dark-mode .header-content h1 {
    background: linear-gradient(90deg, #fff 10%, #a67c3d 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientTextMoveDark 8s linear infinite alternate, colorShiftDark 10s linear infinite alternate;
}
@keyframes gradientTextMoveDark {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}
@keyframes colorShiftDark {
    0% { filter: hue-rotate(0deg);}
    100% { filter: hue-rotate(20deg);}
}
body.dark-mode .header-content .header-emoji {
    animation: bounce 2s infinite, emojiColorDark 8s infinite alternate;
}
@keyframes emojiColorDark {
    0% { filter: hue-rotate(0deg);}
    100% { filter: hue-rotate(40deg);}
}

body:not(.dark-mode) .sidebar-section h3,
body:not(.dark-mode) .stats-widget h3,
body:not(.dark-mode) .categories-widget h3,
body:not(.dark-mode) .quick-links-title,
body:not(.dark-mode) .recent-activity-title,
body:not(.dark-mode) .guidelines-title,
body:not(.dark-mode) .browse-posts-title,
body:not(.dark-mode) .create-post-title,
body:not(.dark-mode) .dashboard-title,
body:not(.dark-mode) .profile-title,
body:not(.dark-mode) .community-stats-title {
    color: #111 !important;
}
body:not(.dark-mode) .browse-posts-title {
    color: #000 !important;
}

body.dark-mode .browse-posts-title {
    color: #fff !important;
}

body:not(.dark-mode) .community-stats-title,
body:not(.dark-mode) .categories-widget h3 {
    color: #111 !important;
}

body.dark-mode .community-stats-title,
body.dark-mode .categories-widget h3 {
    color: #b0b3b8 !important;
}
body:not(.dark-mode) .categories-widget h3 {
    color: #111 !important;
}

body.dark-mode .community-stats-title {
    color: #bbb !important;
}

body:not(.dark-mode) .dashboard-topic h3 {
    color: #111 !important;
}

body:not(.dark-mode) .topic-meta {
    color: #111 !important;
}

body.dark-mode .main-nav {
    background: #23272b !important;
    border-bottom: 2px solid #33384d !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
}

body.dark-mode .nav-btn {
    color: #b0b3b8 !important;
}

body.dark-mode .nav-btn.active,
body.dark-mode .nav-btn:active,
body.dark-mode .nav-btn:focus {
    color: #fff !important;
    background-color: #23272b !important;
    border-bottom-color: #667eea !important;
    outline: none !important;
}

.desc-color {
    color: #222;
}
body.dark-mode .desc-color {
    color: #bbb;
}

body.dark-mode .quick-link-modal .modal-body,
body.dark-mode .quick-link-modal .modal-body ul li,
body.dark-mode .quick-link-modal .modal-body span,
body.dark-mode .quick-link-modal .modal-body p {
    color: #bbb !important;
}

body.dark-mode .quick-link-modal .modal-body strong {
    color: #bbb !important;
    font-weight: bold !important;
}

.quick-link-modal h2,
.quick-link-modal .modal-header h2,
.quick-link-modal .modal-body h2 {
    color: #888 !important;
}
body.dark-mode .quick-link-modal h2,
body.dark-mode .quick-link-modal .modal-header h2,
body.dark-mode .quick-link-modal .modal-body h2 {
    color: #bbb !important;
}

.section-title {
    color: #888 !important;
    font-weight: 700;
}
body.dark-mode .section-title {
    color: #bbb !important;
}

.topics-count-grey {
    color: #888 !important;
}
body.dark-mode .topics-count-grey {
    color: #bbb !important;
}

.sticky-notes-title-grey {
    color: #888 !important;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}
body.dark-mode .sticky-notes-title-grey {
    color: #bbb !important;
}

.add-note-title-grey {
    color: #888 !important;
}
body.dark-mode .add-note-title-grey {
    color: #d1d5db !important;
}

.sticky-notes-btn {
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 0.5rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
}
.sticky-notes-desc {
    background: #f7f7fa;
    color: #444;
    border-radius: 7px;
    padding: 0.7em 1em;
    font-size: 0.98rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 6px rgba(0,126,234,0.06);
    transition: all 0.18s;
}
body.dark-mode .sticky-notes-desc {
    background: #23272f;
    color: #ccc;
    border: 1px solid #444;
}
.sticky-notes-desc-text {
    margin: 0;
    padding: 0;
    font-size: 0.98rem;
    line-height: 1.6;
}


.tos-privacy-btn {
    position: fixed;
    right: 32px;
    bottom: 32px;
    z-index: 10010;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 0.35rem 0.9rem; 
    border-radius: 14px;     
    font-weight: 700;
    font-size: 0.89rem;      
    box-shadow: 0 4px 16px rgba(102,126,234,0.18);
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.12s;
    display: none;
    outline: none;
}
.tos-privacy-btn:hover {
    background: linear-gradient(90deg, #764ba2 0%, #667eea 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(102,126,234,0.22);
    transform: translateY(-2px) scale(1.04);
}
body.dark-mode .tos-privacy-btn {
    position: fixed;
    right: 32px;
    bottom: 32px;
    background: linear-gradient(90deg, #232b4d 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 0.35rem 0.9rem;
    border-radius: 14px;
    font-size: 0.89rem;
}
body.dark-mode .tos-privacy-btn:hover {
    background: linear-gradient(90deg, #764ba2 0%, #232b4d 100%);
    color: #fff;
}

.tos-privacy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.tos-privacy-modal .modal-content {

    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}
.tos-privacy-modal .modal-header {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 1.5rem 2rem;
    border-radius: 12px 12px 0 0;
    font-size: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tos-privacy-modal .modal-body {
    padding: 2rem;
    line-height: 1.6;
    font-size: 1.08rem;
    background: #fff;
    color: #222;
    border-radius: 0 0 12px 12px;
}
body.dark-mode .tos-privacy-modal .modal-body {
    background: #23272f;
    color: #eee;
}
@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
        gap: 0;
        margin-top: 0;
        padding: 0 5px;
        padding-bottom: 0;
    }
}

body.dark-mode .quick-link-modal .modal-content,
body.dark-mode .quick-link-modal .modal-body {
    background: #23272f !important;
    color: #e5e5e5 !important;
}

.sidebar-section.active-description {
    background: #f1f3f4 !important;
    transition: background 0.2s;
}
body.dark-mode .sidebar-section.active-description {
    background: #23272f !important;
}

.section-title-card {
    display: flex;
    align-items: center;
    gap: 0.6em;
    background: #f7f7fa;
    color: #667eea;
    padding: 0.7em 1.2em;
    border-radius: 10px;
    margin-bottom: 1.2em;
    font-size: 1.13rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(102,126,234,0.07);
    border: 1px solid #e9ecef;
    width: fit-content;
}
body.dark-mode .section-title-card {
    background: #23272f;
    color: #b0b3b8;
    border: 1px solid #33384d;
    box-shadow: 0 2px 12px rgba(35,43,77,0.13);
}

.section-title-card h4, .section-title-card h3, .section-title-card h2 {
    margin: 0;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
}
.profile-prompt-message {
    color: #000 !important;
}
body.dark-mode .profile-prompt-message {
    color: #bbb !important;
}

body.dark-mode .profile-display label,
body.dark-mode .profile-section label,
body.dark-mode .profile-form label {
    color: #bbb !important;
}


    .submit-btn,
#toggle-create-topic,
.save-profile-btn,
.post-note-btn {
    font-size: 1.08rem !important;
    font-weight: 600;
}

body.dark-mode #create-post-form label,
body.dark-mode #create-post-form input,
body.dark-mode #create-post-form select,
body.dark-mode #create-post-form textarea,
body.dark-mode #create-post-form input::placeholder,
body.dark-mode #create-post-form textarea::placeholder,
body.dark-mode #create-post-form option {
    color: #888 !important;
}

body.dark-mode #create-post-form label {
    color: #bbb !important;
}

body.dark-mode #profile-form label {
    color: #bbb !important;
}
body.dark-mode #profile-form input,
body.dark-mode #profile-form select,
body.dark-mode #profile-form textarea,
body.dark-mode #profile-form input::placeholder,
body.dark-mode #profile-form textarea::placeholder,
body.dark-mode #profile-form option {
    color: #888 !important;
}

body:not(.dark-mode) .section-title {
    color: #222 !important;
}

#reset-demo-btn {
  display: none !important;
}

.notes-container .sticky-note {
    background: #f8f9fa !important;
    color: #222 !important;
}
body.dark-mode .notes-container .sticky-note {
    background: #23272b !important;
    color: #e5e5e5 !important;
}

#admin-mode-banner {
  background: linear-gradient(90deg, orange, #ff9800, #ffb300);
  color: #fff;
  font-weight: bold;
  font-size: 1.3rem;
  text-align: center;
  padding: 0.7rem 0;
  width: 100%;
  margin: 0;
  letter-spacing: 2px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  z-index: 10000;
  position: relative;
  border-bottom: 3px solid #fff3e0;
  border-top: none;
  display: block !important;
}
body.dark-mode #admin-mode-banner {
  background: linear-gradient(90deg, #ff9800, #ffb300, #ff9800);
  color: #222;
  border-bottom: 3px solid #ffb347;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 20px;
}

.main-header {
    background: linear-gradient(120deg, #667eea 0%, #764ba2 50%, #ffb347 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem 3rem 2rem;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(102,126,234,0.13);
    animation: headerWave 16s ease-in-out infinite alternate;
    background-size: 200% 200%;
}
@keyframes headerWave {
    0% { background-position: 0% 50%; filter: hue-rotate(0deg);}
    50% { background-position: 100% 50%; filter: hue-rotate(30deg);}
    100% { background-position: 0% 50%; filter: hue-rotate(-30deg);}
}
.main-header::before,
.main-header::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    opacity: 0.28;
    z-index: 0;
    pointer-events: none;
    transition: filter 1s;
    filter: blur(4px) brightness(1.2) saturate(1.3);
    mix-blend-mode: lighten;
}
.main-header::before {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle at 60% 40%, #ffb347 0%, #764ba2 60%, transparent 100%);
    top: -140px;
    left: -140px;
    animation: floatBlob1 12s ease-in-out infinite alternate, blobMorph1 24s ease-in-out infinite alternate;
}
.main-header::after {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle at 40% 60%, #667eea 0%, #764ba2 70%, transparent 100%);
    bottom: -100px;
    right: -100px;
    animation: floatBlob2 15s ease-in-out infinite alternate, blobMorph2 28s ease-in-out infinite alternate;
}
@keyframes blobMorph1 {
    0% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
    25% { border-radius: 60% 40% 55% 45% / 50% 70% 30% 50%; }
    50% { border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%; }
    75% { border-radius: 55% 45% 40% 60% / 60% 50% 50% 40%; }
    100% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
}
@keyframes blobMorph2 {
    0% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
    20% { border-radius: 45% 55% 60% 40% / 55% 65% 35% 45%; }
    50% { border-radius: 60% 40% 40% 60% / 40% 60% 60% 40%; }
    80% { border-radius: 50% 60% 45% 55% / 60% 50% 50% 40%; }
    100% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
}
.header-content {
    position: relative;
    z-index: 1;
}
.header-content h1 {
    font-size: 3rem;
    margin-bottom: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 0 2px 16px rgba(102,126,234,0.13);
    background: linear-gradient(90deg, #fff 10%, #ffb347 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientTextMove 8s linear infinite alternate, colorShift 10s linear infinite alternate;
}
@keyframes gradientTextMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}
@keyframes colorShift {
    0% { filter: hue-rotate(0deg);}
    100% { filter: hue-rotate(30deg);}
}
.header-content p {
    font-size: 1.25rem;
    opacity: 0.95;
    color: #f8f9fa !important;
    text-shadow: none;
    margin-bottom: 0.5rem;
    animation: fadeInUp 2s;
}
.header-content .header-emoji {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
    animation: bounce 2s infinite, emojiColor 8s infinite alternate;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0);}
    50% { transform: translateY(-12px);}
}
@keyframes emojiColor {
    0% { filter: hue-rotate(0deg);}
    100% { filter: hue-rotate(60deg);}
}

.main-nav {
    background: #f3f4f6;
    border-bottom: 2px solid #e9ecef;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    padding: 0 20px;
}

.nav-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    background-color: #f8f9fa;
    color: #667eea;
}

.nav-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background-color: #f8f9fa;
}

.nav-btn i {
    font-size: 1.1rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.main-column {

    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0);}
}

.welcome-section h2 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.welcome-section p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.trending-section h3 {
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
}

.trending-section h3 i {
    color: #ff6b6b;
}

body:not(.dark-mode) .trending-section h3 {
    color: #333 !important;
}

body.dark-mode .trending-section h3 {
    color: #b0b3b8 !important;
}

.post-card {

    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    border-left: 4px solid #764ba2;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.post-card h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

body.dark-mode .post-card h4 {
    color: #d1d5db !important;
}

.post-card p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.user-badge {
    background: #667eea;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.post-stats {
    color: #666;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-stats i {
    margin-right: 0.3rem;
}

.post-tags {
    margin-top: 1rem;
}

.tag {
    background: #e9ecef;
    color: #495057;
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.post-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.action-btn {
    border: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 500;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.like-btn {
    background: #ff6b81;
    color: white;
    border-color: #ff6b81;
}

.like-btn:hover {
    background: #ff5252;
}

.like-btn.liked {
    background: #d63031;
    border-color: #d63031;
}

.reply-btn {
    background: #4285f4;
    color: white;
    border-color: #4285f4;
}

.reply-btn:hover {
    background: #3367d6;
}

.share-btn {
    background: #34a853;
    color: white;
    border-color: #34a853;
}

.share-btn:hover {
    background: #2d7d3c;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.post-controls {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.control-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
}

.control-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.edit-btn {
    color: #007bff;
    border-color: #007bff;
}

.edit-btn:hover {
    background: #007bff;
    color: white;
}

.delete-btn {
    color: #dc3545;
    border-color: #dc3545;
}

.delete-btn:hover {
    background: #dc3545;
    color: white;
}

.reply-form {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 3px solid #667eea;
}

.reply-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 1rem;
}

.reply-form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.reply-form-actions input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

.submit-reply-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease;
}

.submit-reply-btn:hover {
    background: #764ba2;
}

.replies-container {
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid #e9ecef;
}

.reply-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    border-left: 3px solid #667eea;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.reply-author {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.reply-author-grey {
    color: #333 !important;
}
body.dark-mode .reply-author-grey {
    color: #bbb !important;
}

.reply-time {
    color: #666;
    font-size: 0.8rem;
}

.reply-controls {
    display: flex;
    gap: 0.3rem;
}

.reply-content {
    color: #555;
    line-height: 1.5;
    margin-bottom: 0.8rem;
}

.reply-actions {
    display: flex;
    gap: 0.5rem;
}

.reply-like-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.reply-like-btn:hover {
    background: #ff6b81;
    color: white;
    border-color: #ff6b81;
}

.reply-like-btn.liked {
    background: #d63031;
    color: white;
    border-color: #d63031;
}

.quick-link-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {

    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-header {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 12px 12px 0 0;
    font-size: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 2rem;
    line-height: 1.6;
    font-size: 1.08rem;
    background: #fff;
    color: #222;
    border-radius: 0 0 12px 12px;
}
.modal-body .tos-description {
    margin-bottom: 1.5em;
    font-size: 1.08rem;
    color: #444;
}
.modal-body .privacy-description {
    margin-bottom: 1.5em;
    font-size: 1.08rem;
    color: #444;
}

.resource-section {
    margin-bottom: 2rem;
}

.resource-section h4 {
    background: linear-gradient(90deg, #f3f4f8 80%, #e9ecef 100%);
    border-left: 5px solid #667eea;
    border-radius: 7px 18px 18px 7px;
    padding: 0.6em 1.2em 0.6em 1.1em;
    margin-bottom: 1.1rem;
    margin-top: 0.5rem;
    font-size: 1.18rem;
    font-weight: 700;
    color: #444;
    box-shadow: 0 2px 8px rgba(102,126,234,0.06);
    display: flex;
    align-items: center;
    gap: 0.7em;
    letter-spacing: 0.01em;
    transition: background 0.2s, color 0.2s;
}

body.dark-mode .resource-section h4 {
    background: linear-gradient(90deg, #232b4d 80%, #232b4d 100%);
    border-left: 5px solid #764ba2;
    color: #e5e5e5;
    box-shadow: 0 2px 12px rgba(35,43,77,0.13);
}

.resource-section ul {
    list-style: none;
    padding-left: 0;
}

.resource-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f4;
    padding-left: 1.5rem;
    position: relative;
}

.resource-section li:before {
    content: "•";
    color: #667eea;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.resource-section li:last-child {
    border-bottom: none;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.stats-widget, .categories-widget {

    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stats-widget h3, .categories-widget h3 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f1f3f4;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.category-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.category-name {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 0.2rem;
}

body.dark-mode .category-name {
    color: #bbb !important;
}

.category-count {
    color: #666;
    font-size: 0.85rem;
}

.create-form {

    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

body.dark-mode .main-column,
body.dark-mode .sidebar-section,
body.dark-mode .create-form,
body.dark-mode .dashboard-topic,
body.dark-mode .stats-widget,
body.dark-mode .categories-widget,
body.dark-mode .chart-container,
body.dark-mode .modal-content,
body.dark-mode .filters-section,
body.dark-mode .stat-card,
body.dark-mode .post-preview,
body.dark-mode .add-note-section {
    background: #23272b !important;
    color: #e5e5e5 !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

body.dark-mode .modal-header {
    background: linear-gradient(90deg, #232b4d 0%, #764ba2 100%) !important;
    color: #fff !important;
}

body.dark-mode .post-card,
body.dark-mode .category-item,
body.dark-mode .reply-item,
body.dark-mode .sticky-note,
body.dark-mode .notes-container,
body.dark-mode .activity-item {
    background: #23272b !important;
    color: #e5e5e5 !important;
    border-color: #33384d !important;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea,
body.dark-mode .filter-select,
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #2d2f31 !important; 
    color: #e5e5e5 !important;
    border-color: #33384d !important;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus,
body.dark-mode .filter-select:focus,
body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
    border-color: #764ba2 !important;
    box-shadow: 0 0 0 3px rgba(118,75,162,0.15) !important;
    background: #55585e !important;
}

.filters-section {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.filter-select {
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.posts-count {
    background: transparent;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #666;
    box-shadow: none;
    border: none;
}

.submit-btn, .toggle-btn, .save-profile-btn, .post-note-btn,
#create-post-form .submit-btn,
.add-note-section .submit-btn,
#create-topic-form .submit-btn,
#profile-form .submit-btn {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    animation: btnGradientMove 16s linear infinite alternate, btnPulse 16s infinite, btnHue 16s infinite alternate;
}

.submit-btn, .toggle-btn, .save-profile-btn, .post-note-btn,
#create-post-form .submit-btn,
.add-note-section .submit-btn,
#create-topic-form .submit-btn,
#profile-form .submit-btn {
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(102,126,234,0.13) !important;
    border: none;
}

.submit-btn:hover, .toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.submit-btn:active, .toggle-btn:active, .save-profile-btn:active, .post-note-btn:active {
    box-shadow: 0 1.5px 4px rgba(102,126,234,0.18) !important;
    transform: scale(0.97);
}

.create-topic-section {
    margin-bottom: 2rem;
}

.dashboard-topic {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border-left: 4px solid #667eea;
}

.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.dashboard-topic h3 {
    color: #fff;
    margin-bottom: 0;
    font-size: 1.3rem;
}

.topic-controls {
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
}

.control-btn:hover {
    background: #f8f9fa;
    border-color: #bbb;
}

.edit-btn {
    color: #007bff;
}

.edit-btn:hover {
    background: #e3f2fd;
    border-color: #007bff;
    color: #0056b3;
}

.delete-btn {
    color: #dc3545;
}

.delete-btn:hover {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.edit-btn:hover {
    color: #007bff;
    border-color: #007bff;
}

.delete-btn:hover {
    color: #dc3545;
    border-color: #dc3545;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.post-header h4 {
    margin: 0;
}

.dashboard-topic p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.topic-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.add-note-section {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid #e9ecef;
}

.notes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    background: #fafafa;
    border-radius: 8px;
    margin: 1rem 0;
    min-height: 200px;
}

.sticky-note {
    background: #f8f9fa !important;
    color: #222 !important;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    width: 200px;
    min-height: 120px;
    position: relative;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.1);
    transform: rotate(-1deg);
    transition: transform 0.2s ease;
}

body.dark-mode .sticky-note {
    background: #23272b !important;
    color: #e5e5e5 !important;
    border-color: #33384d !important;
}

.sticky-note:hover {
    transform: rotate(0deg) scale(1.05);
    z-index: 10;
}

.sticky-note:nth-child(even) {
    background: #d1ecf1;
    border-color: #bee5eb;
    transform: rotate(1deg);
}

.sticky-note:nth-child(3n) {
    background: #d4edda;
    border-color: #c3e6cb;
    transform: rotate(-0.5deg);
}

.sticky-note:nth-child(4n) {
    background: #f5c6cb;
    border-color: #f5c6cb;
    transform: rotate(0.8deg);
}

.sticky-note-text {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: #666;
}

.sticky-note-author {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    font-size: 0.7rem;
    color: #666;
    text-align: right;
}

.sticky-note-animate {
    animation: stickyNotePopIn 0.5s cubic-bezier(.42,0,.58,1.0);
    transition: transform 0.18s cubic-bezier(.42,0,.58,1.0), box-shadow 0.18s;
}
@keyframes stickyNotePopIn {
    0% {
        opacity: 0;
        transform: scale(0.7) rotate(-8deg) translateY(30px);
    }
    60% {
        opacity: 1;
        transform: scale(1.08) rotate(2deg) translateY(-6px);
    }
    80% {
        transform: scale(0.96) rotate(-1deg) translateY(2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg) translateY(0);
    }
}

.sticky-note-animate:hover {
    transform: scale(1.06) rotate(2deg) translateY(-4px);
    box-shadow: 0 6px 24px rgba(102,126,234,0.18), 0 1.5px 6px rgba(0,0,0,0.10);
    z-index: 10;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sidebar-section h3 {
    color: #b0b3b8 !important;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.quick-stats {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.quick-stat {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.quick-stat + .sidebar-divider {
    border: none;
    border-bottom: 1.5px solid #e9ecef;
    margin: 1rem 0;
    width: 100%;
}

.sidebar-section .quick-stats {
    margin-bottom: 0;
    padding-bottom: 0;
}

}

.quick-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.stat-name {
    color: #666;
    font-size: 0.9rem;
}

.recent-activity {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.activity-item {
    background: #f8f9fa;
    padding: 0.8rem;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.activity-title {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    display: block;
}

.activity-meta {
    color: #666;
    font-size: 0.8rem;
}

.guidelines-list {
    list-style: none;
}

.guidelines-list li {
    padding: 0.5rem 0;
    color: #666;
    border-bottom: 1px solid #f1f3f4;
    position: relative;
    padding-left: 1.5rem;
}

.guidelines-list li:before {
    content: "•";
    color: #667eea;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.guidelines-list li:last-child {
    border-bottom: none;
}

.quick-links {
    list-style: none;
}

.quick-links li {
    margin-bottom: 0.5rem;
}

.quick-links a {
    color: #111 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.quick-links a:hover {
    color: #764ba2 !important;
    text-decoration: underline;
}

.quick-links-color {
    color: #888 !important;
}
body.dark-mode .quick-links-color {
    color: #bbb !important;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    border-top: 4px solid #667eea;
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    color: #666;
    font-size: 1rem;
}

.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.chart-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chart-container h3 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
}

.chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chart-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chart-label {
    min-width: 120px;
    font-size: 0.9rem;
    color: #666;
}

.chart-progress {
    flex: 1;
    height: 20px;
    background: #f1f3f4;
    border-radius: 10px;
    overflow: hidden;
}

.chart-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.8s ease;
}

.chart-value {
    color: #444;
}
body.dark-mode .chart-value {
    color: #bbb !important;
}

.chart-title {
    color: #333;
}
body.dark-mode .chart-title {
    color: #d1d5db !important;
}

.profile-display {
    margin-top: 2rem;
}

.profile-display h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.post-preview {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

.post-preview h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.footer-content small {
    opacity: 0.8;
}

.site-footer {
    background: transparent;
    color: #888;
    text-align: center;
    padding: 1.5rem 0 1.2rem 0;
    margin-top: 3rem;
    width: 100%;
    font-size: 1.1em;
    letter-spacing: 0.01em;
    position: relative;
    z-index: 10;
    box-shadow: none;
}
.site-footer .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    opacity: 1;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.site-footer, .site-footer .footer-content {
    background: none !important;
}

.notification {
    position: fixed;
    top: 90px; 
    right: 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
    max-width: 400px;
}

.notification.show {
    display: flex;
    animation: slideIn 0.3s ease;
}

.notification.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    padding: 0;
    margin: 0;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.balloon-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.balloon {
    position: absolute;
    width: 50px;
    height: 70px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: floatUp 4s ease-out forwards;
       opacity: 0.9;
}

.balloon::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 20px;
    background: #333;
}

.balloon.red {
    background: linear-gradient(45deg, #ff6b6b, #ff5252);
}

.balloon.blue {
    background: linear-gradient(45deg, #4285f4, #3367d6);
}

.balloon.green {
    background: linear-gradient(45deg, #34a853, #2d7d3c);
}

.balloon.yellow {
    background: linear-gradient(45deg, #fbbc05, #f9ab00);
}

.balloon.purple {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.balloon.pink {
    background: linear-gradient(45deg, #ff6b81, #ff5252);
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0.9;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.balloon-success {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    font-size: 1.2rem;
    font-weight: 600;
    z-index: 10000;
    text-align: center;
    animation: balloonSuccessAnimation 3s ease-out forwards;
    pointer-events: none;
}

@keyframes balloonSuccessAnimation {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    15% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
    25% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    90% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}

.theme-toggle-btn {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 2000;
    background: #fff;
    color: #333;
    border: 1.5px solid #e9ecef;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-color: #667eea;
    transition: transform 0.18s cubic-bezier(.42,0,.58,1.0), box-shadow 0.18s;
}
.theme-toggle-btn:hover {
    box-shadow: 0 4px 16px rgba(102,126,234,0.18);
    transform: scale(1.08) rotate(-10deg);
}
.theme-toggle-btn:active {
    animation: themeToggleSpin 0.4s cubic-bezier(.42,0,.58,1.0);
}
@keyframes themeToggleSpin {
    0% { transform: scale(1) rotate(0deg);}
    40% { transform: scale(1.15) rotate(120deg);}
    70% { transform: scale(0.95) rotate(240deg);}
    100% { transform: scale(1) rotate(360deg);}
}

body.dark-mode {
    background-color: #181a1b;
    color: #e5e5e5;
}
body.dark-mode .main-header {
    background: linear-gradient(120deg, #232b4d 0%, #3a2e4d 50%, #a67c3d 100%);
    color: #fff;
    box-shadow: 0 8px 32px rgba(35,43,77,0.18);
    animation: headerWaveDark 16s ease-in-out infinite alternate;
    background-size: 200% 200%;
}
@keyframes headerWaveDark {
    0% { background-position: 0% 50%; filter: hue-rotate(0deg);}
    50% { background-position: 100% 50%; filter: hue-rotate(20deg);}
    100% { background-position: 0% 50%; filter: hue-rotate(-20deg);}
}
body.dark-mode .main-header::before {
    background: radial-gradient(circle at 60% 40%, #a67c3d 0%, #3a2e4d 60%, transparent 100%);
    animation: floatBlob1Dark 12s ease-in-out infinite alternate, blobMorph1Dark 24s ease-in-out infinite alternate;
}
body.dark-mode .main-header::after {
    background: radial-gradient(circle at 40% 60%, #232b4d 0%, #3a2e4d 70%, transparent 100%);
    animation: floatBlob2Dark 15s ease-in-out infinite alternate, blobMorph2Dark 28s ease-in-out infinite alternate;
}
@keyframes floatBlob1Dark {
    0% { transform: scale(1) translateY(0) rotate(0deg);}
    50% { transform: scale(1.08) translateY(30px) rotate(10deg);}
    100% { transform: scale(1.04) translateY(10px) rotate(-10deg);}
}
@keyframes floatBlob2Dark {
    0% { transform: scale(1) translateY(0) rotate(0deg);}
    50% { transform: scale(0.95) translateY(-20px) rotate(-8deg);}
    100% { transform: scale(1.02) translateY(10px) rotate(8deg);}
}
@keyframes blobMorph1Dark {
    0% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
    25% { border-radius: 60% 40% 55% 45% / 50% 70% 30% 50%; }
    50% { border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%; }
    75% { border-radius: 55% 45% 40% 60% / 60% 50% 50% 40%; }
    100% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
}
@keyframes blobMorph2Dark {
    0% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
    20% { border-radius: 45% 55% 60% 40% / 55% 65% 35% 45%; }
    50% { border-radius: 60% 40% 40% 60% / 40% 60% 60% 40%; }
    80% { border-radius: 50% 60% 45% 55% / 60% 50% 50% 40%; }
    100% { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
}
body.dark-mode .header-content h1 {
    background: linear-gradient(90deg, #fff 10%, #a67c3d 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientTextMoveDark 8s linear infinite alternate, colorShiftDark 10s linear infinite alternate;
}
@keyframes gradientTextMoveDark {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}
@keyframes colorShiftDark {
    0% { filter: hue-rotate(0deg);}
    100% { filter: hue-rotate(20deg);}
}
body.dark-mode .header-content .header-emoji {
    animation: bounce 2s infinite, emojiColorDark 8s infinite alternate;
}
@keyframes emojiColorDark {
    0% { filter: hue-rotate(0deg);}
    100% { filter: hue-rotate(40deg);}
}

body:not(.dark-mode) .sidebar-section h3,
body:not(.dark-mode) .stats-widget h3,
body:not(.dark-mode) .categories-widget h3,
body:not(.dark-mode) .quick-links-title,
body:not(.dark-mode) .recent-activity-title,
body:not(.dark-mode) .guidelines-title,
body:not(.dark-mode) .browse-posts-title,
body:not(.dark-mode) .create-post-title,
body:not(.dark-mode) .dashboard-title,
body:not(.dark-mode) .profile-title,
body:not(.dark-mode) .community-stats-title {
    color: #111 !important;
}
body:not(.dark-mode) .browse-posts-title {
    color: #000 !important;
}

body.dark-mode .browse-posts-title {
    color: #fff !important;
}

body:not(.dark-mode) .community-stats-title,
body:not(.dark-mode) .categories-widget h3 {
    color: #111 !important;
}

body.dark-mode .community-stats-title,
body.dark-mode .categories-widget h3 {
    color: #b0b3b8 !important;
}
body:not(.dark-mode) .categories-widget h3 {
    color: #111 !important;
}

body.dark-mode .community-stats-title {
    color: #bbb !important;
}

body:not(.dark-mode) .dashboard-topic h3 {
    color: #111 !important;
}

body:not(.dark-mode) .topic-meta {
    color: #111 !important;
}

body.dark-mode .main-nav {
    background: #23272b !important;
    border-bottom: 2px solid #33384d !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
}

body.dark-mode .nav-btn {
    color: #b0b3b8 !important;
}

body.dark-mode .nav-btn.active,
body.dark-mode .nav-btn:active,
body.dark-mode .nav-btn:focus {
    color: #fff !important;
    background-color: #23272b !important;
    border-bottom-color: #667eea !important;
    outline: none !important;
}

.desc-color {
    color: #222;
}
body.dark-mode .desc-color {
    color: #bbb;
}

body.dark-mode .quick-link-modal .modal-body,
body.dark-mode .quick-link-modal .modal-body ul li,
body.dark-mode .quick-link-modal .modal-body span,
body.dark-mode .quick-link-modal .modal-body p {
    color: #bbb !important;
}

body.dark-mode .quick-link-modal .modal-body strong {
    color: #bbb !important;
    font-weight: bold !important;
}

.quick-link-modal h2,
.quick-link-modal .modal-header h2,
.quick-link-modal .modal-body h2 {
    color: #888 !important;
}
body.dark-mode .quick-link-modal h2,
body.dark-mode .quick-link-modal .modal-header h2,
body.dark-mode .quick-link-modal .modal-body h2 {
    color: #bbb !important;
}

.section-title {
    color: #888 !important;
    font-weight: 700;
}
body.dark-mode .section-title {
    color: #bbb !important;
}

.topics-count-grey {
    color: #888 !important;
}
body.dark-mode .topics-count-grey {
    color: #bbb !important;
}

.sticky-notes-title-grey {
    color: #888 !important;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}
body.dark-mode .sticky-notes-title-grey {
    color: #bbb !important;
}

.add-note-title-grey {
    color: #888 !important;
}
body.dark-mode .add-note-title-grey {
    color: #d1d5db !important;
}

.sticky-notes-btn {
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 0.5rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
}
.sticky-notes-desc {
    background: #f7f7fa;
    color: #444;
    border-radius: 7px;
    padding: 0.7em 1em;
    font-size: 0.98rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 6px rgba(0,126,234,0.06);
    transition: all 0.18s;
}
body.dark-mode .sticky-notes-desc {
    background: #23272f;
    color: #ccc;
    border: 1px solid #444;
}
.sticky-notes-desc-text {
    margin: 0;
    padding: 0;
    font-size: 0.98rem;
    line-height: 1.6;
}

.tos-privacy-btn {
    position: fixed;
    right: 32px;
    bottom: 32px;
    z-index: 10010;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 0.35rem 0.9rem; 
    border-radius: 14px;     
    font-weight: 700;
    font-size: 0.89rem;     
    box-shadow: 0 4px 16px rgba(102,126,234,0.18);
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.12s;
    display: none; 
    outline: none;
}
.tos-privacy-btn:hover {
    background: linear-gradient(90deg, #764ba2 0%, #667eea 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(102,126,234,0.22);
    transform: translateY(-2px) scale(1.04);
}
body.dark-mode .tos-privacy-btn {
    position: fixed;
    right: 32px;
    bottom: 32px;
    background: linear-gradient(90deg, #232b4d 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 0.35rem 0.9rem;
    border-radius: 14px;
    font-size: 0.89rem;
}
body.dark-mode .tos-privacy-btn:hover {
    background: linear-gradient(90deg, #764ba2 0%, #232b4d 100%);
    color: #fff;
}

.tos-privacy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.tos-privacy-modal .modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}
.tos-privacy-modal .modal-header {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 1.5rem 2rem;
    border-radius: 12px 12px 0 0;
    font-size: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tos-privacy-modal .modal-body {
    padding: 2rem;
    line-height: 1.6;
    font-size: 1.08rem;
    background: #fff;
    color: #222;
    border-radius: 0 0 12px 12px;
}
body.dark-mode .tos-privacy-modal .modal-body {
    background: #23272f;
    color: #eee;
}
@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
        gap: 0;
        margin-top: 0;
        padding: 0 5px;
        padding-bottom: 0;
    }
}

body.dark-mode .quick-link-modal .modal-content,
body.dark-mode .quick-link-modal .modal-body {
    background: #23272f !important;
    color: #e5e5e5 !important;
}

.sidebar-section.active-description {
    background: #f1f3f4 !important;
    transition: background 0.2s;
}
body.dark-mode .sidebar-section.active-description {
    background: #23272f !important;
}

.section-title-card {
    display: flex;
    align-items: center;
    gap: 0.6em;
    background: #f7f7fa;
    color: #667eea;
    padding: 0.7em 1.2em;
    border-radius: 10px;
    margin-bottom: 1.2em;
    font-size: 1.13rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(102,126,234,0.07);
    border: 1px solid #e9ecef;
    width: fit-content;
}
body.dark-mode .section-title-card {
    background: #23272f;
    color: #b0b3b8;
    border: 1px solid #33384d;
    box-shadow: 0 2px 12px rgba(35,43,77,0.13);
}

.section-title-card h4, .section-title-card h3, .section-title-card h2 {
    margin: 0;
    font-weight: inherit;
    font-size: inherit;
    color: inherit;
}
.profile-prompt-message {
    color: #000 !important;
}
body.dark-mode .profile-prompt-message {
    color: #bbb !important;
}

body.dark-mode .profile-display label,
body.dark-mode .profile-section label,
body.dark-mode .profile-form label {
    color: #bbb !important;
}


.submit-btn,
#toggle-create-topic,
.save-profile-btn,
.post-note-btn {
    font-size: 1.08rem !important;
    font-weight: 600;
}

body.dark-mode #create-post-form label,
body.dark-mode #create-post-form input,
body.dark-mode #create-post-form select,
body.dark-mode #create-post-form textarea,
body.dark-mode #create-post-form input::placeholder,
body.dark-mode #create-post-form textarea::placeholder,
body.dark-mode #create-post-form option {
    color: #888 !important;
}

body.dark-mode #create-post-form label {
    color: #bbb !important;
}

body.dark-mode #profile-form label {
    color: #bbb !important;
}
body.dark-mode #profile-form input,
body.dark-mode #profile-form select,
body.dark-mode #profile-form textarea,
body.dark-mode #profile-form input::placeholder,
body.dark-mode #profile-form textarea::placeholder,
body.dark-mode #profile-form option {
    color: #888 !important;
}

body:not(.dark-mode) .section-title {
    color: #222 !important;
}

#reset-demo-btn {
  display: none !important;
}

.notes-container .sticky-note {
    background: #f8f9fa !important;
    color: #222 !important;
}
body.dark-mode .notes-container .sticky-note {
    background: #23272b !important;
    color: #e5e5e5 !important;
}

#admin-mode-banner {
  background: linear-gradient(90deg, orange, #ff9800, #ffb300);
  color: #fff;
  font-weight: bold;
  font-size: 1.3rem;
  text-align: center;
  padding: 0.7rem 0;
  width: 100%;
  margin: 0;
  letter-spacing: 2px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  z-index: 10000;
  position: relative;
  border-bottom: 3px solid #fff3e0;
  border-top: none;
  display: block !important;
}
body.dark-mode #admin-mode-banner {
  background: linear-gradient(90deg, #ff9800, #ffb300, #ff9800);
  color: #222;
  border-bottom: 3px solid #ffb347;
}
