:root {
  --bg-color: #F7F4EC;
  --text-primary: #554264;
  --accent-yellow: #F3D04F;
  --accent-blue: #4488B9;
  
  --shadow-hard: 4px 4px 0px #554264;
  --border-thick: 3px solid #554264;
}

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

body {
  font-family: 'Nunito', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Poppins', sans-serif;
}

/* Header */
.main-header {
  border-bottom: var(--border-thick);
  background-color: var(--bg-color);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1rem;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--text-primary);
  background-color: white;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--text-primary);
  background-color: white;
}

/* Buttons */
.btn {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border: var(--border-thick);
  border-radius: 4px;
  cursor: pointer;
  box-shadow: var(--shadow-hard);
  transition: transform 0.1s, box-shadow 0.1s;
  font-weight: bold;
  text-align: center;
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px var(--text-primary);
}

.btn-primary {
  background-color: var(--text-primary);
  color: var(--bg-color);
}

.btn-accent {
  background-color: var(--accent-yellow);
  color: var(--text-primary);
}

.btn-danger {
  background-color: #ff6b6b;
  color: white;
}

.w-full {
  width: 100%;
}

/* Wall */
.wall-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.stats-container {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px dashed var(--text-primary);
  display: flex;
  align-items: center;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  padding-bottom: 5rem;
}

.sticky-note {
  border: var(--border-thick);
  padding: 1rem;
  height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
}

.sticky-note:hover {
  transform: scale(1.02) !important; /* overrides random rotation slightly for feedback */
}

.note-content {
  font-size: 1.1rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
}

.note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  border-top: 2px dashed rgba(0,0,0,0.1);
  padding-top: 0.5rem;
}

/* Floating Action Button for Mobile */
.fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

/* Music Player */
.music-player {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 100;
}

#musicToggleBtn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background-color: var(--bg-color);
  border: var(--border-thick);
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  box-shadow: 8px 8px 0px var(--text-primary);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-primary);
}

textarea, input[type="text"], input[type="password"] {
  width: 100%;
  border: 2px solid var(--text-primary);
  padding: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 1rem;
  background-color: white;
}

.color-options {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.color-options input[type="radio"] {
  appearance: none;
  width: 30px;
  height: 30px;
  background-color: var(--color);
  border: 2px solid var(--text-primary);
  cursor: pointer;
}

.color-options input[type="radio"]:checked {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

/* Detail Modal specific */
.note-detail-content {
  max-width: 600px;
}

.note-author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
}

.note-body {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px dashed var(--text-primary);
  white-space: pre-wrap;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.comment {
  border: 2px solid var(--text-primary);
  padding: 0.5rem 1rem;
  background-color: white;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.add-comment-form {
  display: flex;
  gap: 10px;
}
.add-comment-form input {
  margin-bottom: 0;
  flex: 1;
}

/* Footer & Admin */
footer {
  text-align: center;
  padding: 2rem;
  margin-top: 2rem;
}

.admin-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--text-primary);
}

.admin-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: white;
  border: var(--border-thick);
  box-shadow: var(--shadow-hard);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.admin-table th, .admin-table td {
  border: 2px solid var(--text-primary);
  padding: 0.5rem;
  text-align: left;
}

/* Responsiveness */
.mobile-only { display: none; }
.desktop-only { display: inline-block; }

@media (max-width: 768px) {
  .mobile-only { display: flex; }
  .desktop-only { display: none; }
  
  .add-comment-form {
    flex-direction: column;
  }
  
  .brand-container h1 {
    font-size: 0.95rem;
  }
  
  .nav-logo {
    width: 48px;
    height: 48px;
  }
}
