*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Base styles */
a {
  color: inherit;
  text-decoration: none;
}

p, h1, h2, h3, h4, h5, h6 {
  margin: 0;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "avenir next", avenir,
    "segoe ui", "helvetica neue", helvetica, Cantarell, Ubuntu, roboto,
    noto, arial, sans-serif;
  color: #1c1e21;
  background-color: #fff;
  opacity: 0;
  transition: background-color 0.3s, color 0.3s, opacity 0.1s;
}

body::-webkit-scrollbar {
  display: none;
}

/* Windows 7 Aero styling */
body {
  font-family: 'Roblox', 'Comic Sans MS', cursive;
  color: #1a1a1a;
  background: linear-gradient(to bottom, #4A90E2, #1E3A8A);
  background-attachment: fixed;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(74, 144, 226, 0.3) 0%, transparent 50%);
  pointer-events: none;
}

/* Dark mode - Windows 7 Aero Dark */
.dark body {
  font-family: 'Roblox', 'Comic Sans MS', cursive;
  color: #e5e5e5;
  background: linear-gradient(to bottom, #2A2A2A, #111827);
}

/* Layout */
.container {
  max-width: 935px;
  margin: 0 auto;
  padding: 30px 20px;
  width: 100%;
  position: relative;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  box-shadow: 
    0 4px 30px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.dark .container {
  background: rgba(40, 40, 40, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.customize-banner {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 6px 12px;
  color: #2563eb;
  font-weight: 500;
  text-decoration: none;
  transform: rotate(5deg);
  transition: transform 0.2s;
  cursor: pointer;
  opacity: 0.8;
  background: transparent;
}

.customize-banner:hover {
  transform: rotate(5deg) scale(1.05);
  opacity: 1;
  text-decoration: underline;
}

.dark .customize-banner {
  color: #3b82f6;
  background: transparent;
}

.profile-header {
  display: flex;
}

.profile-picture {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 2px solid #4A90E2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-info {
  margin-left: 1em;
  text-align: left;
}

.profile-username {
  font-size: 28px;
  font-weight: 300;
  line-height: 32px;
  margin-bottom: 12px;
}

.profile-meta {
  color: #8e8e8e;
  font-size: 14px;
}

.profile-stats {
  display: flex;
  flex-direction: row;
  gap: 16px;
  margin-top: 8px;
  color: #6b7280;
  font-size: 14px;
}

.profile-stat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-stat-text {
  cursor: default;
}

.profile-stat-text[data-clickable="true"] {
  cursor: pointer;
}

.profile-stat-text[data-clickable="true"]:hover {
  text-decoration: underline; 
}

.profile-stat-text:hover {
  text-decoration: none;
}

.avatar-stack {
  display: flex;
  align-items: center;
  margin-left: auto;
  cursor: pointer;
  transition: opacity 0.2s;
}

.avatar-stack:hover {
  opacity: 0.8;
}

.avatar-stack img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -12px;
  pointer-events: none;
}

.dark .avatar-stack img {
  border-color: #171717;
}

.content {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
  max-width: 935px;
  width: 100%;
  margin: 0 auto;
}

.content.guestbook {
  display: block;
}

.content.small {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .content.small {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .content {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .content.small {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .content {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .content.small {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

.feed-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
  border: 1px solid #dee2e6;
  border-radius: 4px;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.08);
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.dark .feed-item {
  background: linear-gradient(to bottom, #3a3a3a, #2a2a2a);
  border: 1px solid #555;
}

.feed-item:hover {
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.feed-image {
  width: 100%;
}

.feed-image img {
  display: block;
  width: 100%;
  height: auto;
}

.feed-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0.5rem;
}

.feed-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #1f2937;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.feed-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 0;
}

.dark .feed-description {
  color: #9ca3af;
}

.feed-stats {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: auto;
}

.feed-stat {
  display: flex;
  align-items: center;
}

.stat-icon {
  width: 12px;
  height: 12px;
}

.dark .feed-title {
  color: #f3f4f6;
}

.dark .feed-avatar {
  color: #f3f4f6;
}

.feed-avatar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.feed-avatar img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.feed-avatar-name {
  font-size: 14px;
  color: #6b7280;
}

.dark .feed-avatar-name {
  color: #9ca3af;
}

.comment-section {
  margin: 20px auto;
  display: none;
}

.comments {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.comment {
  display: flex;
  align-items: flex-start;
  padding: 12px;
  gap: 8px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  transition: background-color 0.2s;
}

.dark .comment {
  background: rgba(40, 40, 40, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.comment:hover {
  background: #e5e7eb;
}

.dark .comment:hover {
  background: #262626;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
}

.comment-content {
  flex: 1;
  min-width: 0;
}

.username {
  font-weight: 600;
  margin-bottom: 2px;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.username:hover {
  text-decoration: underline;
}

.message {
  color: inherit;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.new-comment {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  margin-bottom: 8px;
}

.dark .new-comment {
  background: rgba(40, 40, 40, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.comment-input-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.comment-input-wrapper {
  position: relative;
  flex: 1;
}

.comment-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  resize: none;
  height: 80px;
  background: white;
  color: #1f2937;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  transition: border-color 0.2s, background-color 0.2s;
}

.dark .comment-input {
  background: #262626;
  border-color: #404040;
  color: #f3f4f6;
}

.comment-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.dark .comment-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.character-count {
  position: absolute;
  bottom: -20px;
  right: 0;
  font-size: 12px;
  color: #6b7280;
}

.character-count.warning {
  color: #ef4444;
}

.dark .character-count {
  color: #9ca3af;
}

.dark .character-count.warning {
  color: #f87171;
}

.button-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.submit-btn {
  padding: 8px 16px;
  font-family: 'Roblox', 'Comic Sans MS', cursive;
  border-radius: 3px;
  border: 1px solid #0078D4;
  background: linear-gradient(to bottom, #0078D4, #106EBE);
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.submit-btn:hover {
  background: #1d4ed8;
}

.submit-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.dark .submit-btn:disabled {
  background: #4b5563;
}

.reminder-text {
  color: #6b7280;
  font-size: 12px;
  margin-top: 8px;
  margin-right: 12px;
  text-align: right;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.comment-metadata {
  display: flex;
  align-items: center;
  gap: 6px;
}

.timestamp {
  color: #6b7280;
  font-size: 12px;
}

.heart-button {
  padding: 2px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.heart-button:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.heart-button.liked {
  color: #ef4444;
  border-color: #ef4444;
}

.dark .heart-button {
  border-color: #404040;
}

.dark .heart-button:hover {
  background: #262626;
  border-color: #6b7280;
}

.dark .timestamp {
  color: #9ca3af;
}

.comment-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.delete-button {
  padding: 2px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #ef4444;
  border-radius: 4px;
  background: transparent;
  color: #ef4444;
  cursor: pointer;
  transition: all 0.2s;
}

.delete-button:hover {
  background: #fee2e2;
  border-color: #dc2626;
}

.dark .delete-button:hover {
  background: rgba(239, 68, 68, 0.1);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  padding: 24px;
  position: relative;
}

.dark .modal {
  background: rgba(40, 40, 40, 0.95);
}

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

.modal-title {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: inherit;
  padding: 4px;
}

.modal-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.customize-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.customize-option {
  padding: 16px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.dark .customize-option {
  background: #262626;
  border-color: #404040;
}

.customize-option:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
  transform: translateX(4px);
}

.dark .customize-option:hover {
  background: #1e1e1e;
  border-color: #6b7280;
}

.customize-modal {
  width: 90%;
  max-width: 600px;
}

.dark .customize-modal {
  background: #1e1e1e !important;
  border: 1px solid #404040 !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
}

.dark .modal-title {
  color: #f3f4f6;
}

.dark .modal-close {
  color: #f3f4f6;
}

.dark .customize-modal a {
  color: #3b82f6;
}

.dark .customize-modal .customize-options > div {
  color: #f3f4f6;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
}

.page-button {
  padding: 4px 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.page-button:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.page-button.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.dark .page-button {
  border-color: #404040;
  color: #9ca3af;
}

.dark .page-button:hover {
  background: #262626;
  border-color: #6b7280;
}

.dark .page-button.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

.tab-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #d1d5db;
}

.tab {
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: #6b7280;
  font-weight: 500;
  background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
  border: 1px solid #dee2e6;
  border-bottom: none;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  color: #1a1a1a;
}

.tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  background: linear-gradient(to bottom, #ffffff, #f8f9fa);
  border-color: #4A90E2;
}

.dark .tab-container {
  border-bottom-color: #404040;
}

.dark .tab {
  background: linear-gradient(to bottom, #3a3a3a, #2a2a2a);
  border-color: #555;
  color: #e5e5e5;
}

.dark .tab.active {
  background: linear-gradient(to bottom, #4a4a4a, #3a3a3a);
  border-color: #6BA6ED;
  color: #e5e5e5;
}

@media (max-width: 640px) {
  .customize-banner {
    padding: 4px 8px;
    font-size: 14px;
    top: 10px;
    right: 10px;
    transform: rotate(3deg);
  }

  .customize-banner:hover {
    transform: rotate(3deg) scale(1.05);
  }
}

/* Windows notification style */
.admin-badge {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #FF6B35, #F7931E);
  color: white;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: bold;
  margin-left: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Microsoft-style buttons */
.submit-btn, .heart-button, .delete-button, .page-button {
  font-family: 'Roblox', 'Comic Sans MS', cursive;
  border-radius: 3px;
  border: 1px solid #0078D4;
  background: linear-gradient(to bottom, #0078D4, #106EBE);
  color: white;
  font-weight: bold;
}

.dark .submit-btn, 
.dark .heart-button, 
.dark .delete-button, 
.dark .page-button {
  border-color: #0078D4;
  background: linear-gradient(to bottom, #0078D4, #106EBE);
}

/* Glass panels */
.comment, .new-comment {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .comment, .dark .new-comment {
  background: rgba(40, 40, 40, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.comment > a {
  display: block;
  text-decoration: none;
}

.comment > a:hover {
  opacity: 0.8;
}

.discord-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #5865F2;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background-color 0.2s;
  font-size: 14px;
}

.discord-link:hover {
  background-color: rgba(88, 101, 242, 0.1);
}

.dark .discord-link {
  color: #7289DA;
}

.dark .discord-link:hover {
  background-color: rgba(114, 137, 218, 0.1);
}

.discord-logo {
  width: 16px;
  height: 16px;
}