body {
  margin: 0;
  font-family: 'Baloo 2', cursive;
  background-color: #b3e5fc;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.background-clouds {
  display: block;
  position: fixed;
  top: -5vh;
  left: -5vw;
  width: 110vw;
  height: 110vh;
  z-index: 0;
  background: url('../Sky.png') center center / cover no-repeat;
  pointer-events: none;
}

.sidebar {
  width: 400px;
  background: url('../Sidebar.png') center center / 100% 100% no-repeat;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  height: 88vh;
}

.layout-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 1800px;
  width: 90vw;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.container {
  margin: 20px;
  flex-grow: 1;
  padding: 20px;
  background: url('../Page.png') center center / 100% 100% no-repeat;
  border: none;
  min-height: 90vh;
  display: flex;
}

.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* Changed from center to flex-start */
  text-align: center;
  width: 100%;
  max-height: 90vh; /* Limit height to viewport */
  overflow-y: auto; /* Make it scrollable */
  padding: 20px 0; /* Add some padding for scrolling */
}

.fun-subtitle {
  margin: 6px 0 10px;
  font-size: 1rem;
  color: #0b3d66;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.7);
}

.create-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 16px;
}

.create-steps .step {
  padding: 6px 12px;
  border-radius: 20px;
  background: linear-gradient(#ffffff, #e8f3ff);
  border: 2px solid rgba(0,0,0,0.6);
  box-shadow: 0 2px 0 rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.8);
  font-size: 0.9rem;
  color: #0b3d66;
}

.create-steps .step.active {
  background: linear-gradient(#d4f0ff, #aee1ff);
}

.logo {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
}
.logo-img {
  width: 50px;
  height: 50px;
  margin-right: 10px;
}
.logo-text-img {
  height: 50px;
  width: auto;
}

.nav-buttons {
  width: 80%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.nav-auth-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.nav-auth-buttons .nav-btn {
  width: 100%;
  padding: 8px 45px;
  font-size: 1rem;
}

.nav-btn {
  width: 100%;
  padding: 12px 0; /* Homepage-style compact padding */
  font-size: 1rem; /* Homepage-style font size */
  font-family: 'Baloo 2', cursive;
  border: none;
  border-radius: 8px;
  background: url('../GreyButton.png') center center / 100% 100% no-repeat;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  outline: none;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.nav-btn.active, .nav-btn:hover {
  background: url('../GreenButton.png') center center / 100% 100% no-repeat;
  color: #fff;
  border: none;
  transform: scale(1.05);
}

.nav-auth-buttons .nav-btn:hover {
  background: url('../GreyButton.png') center center / 100% 100% no-repeat;
  filter: brightness(1.2);
}

.greeting-avatar {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-bottom: 40px;
}

.greeting {
  font-size: 2.5rem;
  color: #000;
  margin: 0;
}
.username {
  color: #000;
}

.avatar-edit-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid #000;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1rem;
}
.avatar-img {
  width: 90%;
  height: 90%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar-text {
  position: absolute;
  bottom: 5px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.8);
  padding: 0 4px;
}


.featured-projects h2 {
  font-size: 1.8rem;
  color: #000;
  margin-bottom: 25px;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}
.project-card {
  background: #fff;
  border: 3px solid #000;
  padding: 5px;
}

.project-card img {
  width: 100%;
  height: auto;
  display: block;
}

.project-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 18px;
  margin-top: 14px;
  justify-items: center;
}

.project-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s, filter 0.2s;
  position: relative;
}

.project-btn:hover {
  transform: translateY(-2px) scale(1.04);
  filter: saturate(1.1) drop-shadow(0 6px 10px rgba(0,0,0,0.25));
}

.project-btn img {
  display: block;
  max-width: 220px;
}

/* Removed text labels under project type images */

#upload-form.hidden {
  display: none;
}

.hidden {
  display: none;
}

#upload-form, #article-form {
  display: flex;
  flex-direction: column;
  gap: 20px; /* Increased gap for better spacing */
  width: 100%;
  max-width: 700px; /* Increased max-width for a bigger form */
  margin: 40px auto; /* Centered with more vertical margin */
  padding: 30px; /* Added some padding */
  background-color: rgba(255, 255, 255, 0.7); /* Slightly transparent background */
  border-radius: 15px;
  border: 2px solid #ccc;
}

.helper-tip {
  width: 100%;
  text-align: left;
  font-size: 0.95rem;
  color: #0b3d66;
  background: linear-gradient(#ffffff, #eef8ff);
  border: 2px solid rgba(0,0,0,0.6);
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: 0 2px 0 rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.9);
}

/* Scheduler */
.schedule-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
}

.schedule-toggle label {
  font-weight: bold;
  color: #0b3d66;
}

.schedule-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(#ffffff, #eef8ff);
  border: 2px solid rgba(0,0,0,0.6);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 2px 0 rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.9);
}

.schedule-input-row label.inline {
  margin: 0;
}

.schedule-input-row input[type="datetime-local"] {
  border: 2px solid #999;
  border-radius: 8px;
  padding: 8px 10px;
  font-family: 'Baloo 2', cursive;
}

#upload-form label, #article-form label {
  font-family: 'Baloo 2', cursive;
  font-size: 1.3rem; /* Slightly larger labels */
  text-align: left;
}

/* Custom file input styling inside skeuo drop area */
.file-drop input[type="file"] {
  position: relative;
  cursor: pointer;
  background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 50%, #d0d0d0 100%);
  border: 2px solid #999;
  border-radius: 8px;
  padding: 15px;
  font-family: 'Baloo 2', cursive;
  font-size: 1rem;
  font-weight: bold;
  color: transparent; /* Hide the default text */
  text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.8);
  text-align: center;
  transition: all 0.2s ease;
  overflow: hidden;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.2);
}

.file-drop input[type="file"]:hover {
  transform: translateY(-1px);
  background: linear-gradient(to bottom, #f8f8f8 0%, #e8e8e8 50%, #d8d8d8 100%);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1),
    0 4px 8px rgba(0, 0, 0, 0.3);
}

.file-drop input[type="file"]:active {
  transform: translateY(1px);
  background: linear-gradient(to bottom, #d0d0d0 0%, #c0c0c0 50%, #b0b0b0 100%);
  box-shadow: 
    inset 0 1px 0 rgba(0, 0, 0, 0.1),
    inset 0 -1px 0 rgba(255, 255, 255, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Hide the default file input text */
.file-drop input[type="file"]::before {
  content: attr(data-text, '📁 Choose File');
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  color: #333;
  width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-drop input[type="file"]::-webkit-file-upload-button {
  visibility: hidden;
  width: 0;
}

.file-drop input[type="file"]::file-selector-button {
  visibility: hidden;
  width: 0;
}

.file-drop {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 130px;
  border-radius: 16px;
  border: 2px solid rgba(0,0,0,0.6);
  background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(245,252,255,0.85) 60%, rgba(226,246,255,0.9) 100%);
  box-shadow: 0 8px 18px rgba(0,0,0,0.15), inset 0 2px 0 rgba(255,255,255,0.9);
  padding: 14px;
}

.file-drop .file-drop-message {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.95rem;
  color: #0b3d66;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.7);
  pointer-events: none;
}

.thumb-drop { min-height: 110px; }

.file-drop.dragover {
  outline: 3px dashed #4aa3ff;
  outline-offset: -10px;
  background: linear-gradient(180deg, rgba(230, 246, 255, 0.95), rgba(210, 240, 255, 0.95));
}

#upload-form button[type="submit"], #article-form button[type="submit"] {
  background: url('../GreenButton.png') center center / 100% 100% no-repeat;
  color: #fff;
  font-family: 'Baloo 2', cursive;
  font-size: 1.3rem; /* Larger font */
  font-weight: bold;
  border: none;
  padding: 15px 0;
  cursor: pointer;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
  transition: filter 0.2s, background 0.2s; /* Added background to transition */
  width: 280px; /* Slightly wider button */
  align-self: center;
}

#upload-form button[type="submit"]:hover, #article-form button[type="submit"]:hover {
  filter: brightness(1.1);
}

#upload-form button[type="submit"]:disabled {
  background: url('../GreyButton.png') center center / 100% 100% no-repeat;
  cursor: not-allowed;
  filter: brightness(0.9);
}

#back-btn, .back-link {
  align-self: flex-start;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  color: #000;
}

@media (max-width: 1200px) {
  .sidebar {
    width: 300px;
  }
  .greeting {
    font-size: 2.2rem;
  }
  .featured-projects h2 {
    font-size: 1.6rem;
  }
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 992px) {
  .layout-wrapper {
    flex-direction: column;
    height: auto;
    width: 100%;
    gap: 0;
  }
  .sidebar {
    width: 100%;
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 20px;
    box-sizing: border-box;
  }
  .logo {
    margin-bottom: 0;
  }
  .logo-text {
    font-size: 1.5rem;
  }
  .nav-buttons {
    flex-direction: row;
    width: auto;
    gap: 8px;
    align-items: center;
  }
  .nav-btn {
    padding: 10px 15px;
    font-size: 1rem;
    white-space: nowrap;
  }
  .nav-auth-buttons {
    display: contents;
  }
  .container {
    width: 100%;
    min-height: auto;
    border-radius: 0;
  }
  .main-content {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .greeting-avatar {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
  }
  .greeting {
    font-size: 1.8rem;
  }
  .sidebar {
    padding: 10px;
  }
  .logo-img {
      display: none;
  }
  .nav-buttons {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    scrollbar-width: none; /* Firefox */
  }
  .nav-buttons::-webkit-scrollbar { 
    display: none; /* Safari and Chrome */
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 15px;
  }
  .greeting {
    font-size: 1.5rem;
  }
  .featured-projects h2 {
    font-size: 1.3rem;
  }
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .project-buttons {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .project-btn img {
    max-width: 200px;
  }
}

.success-message {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
}

.success-message h1 {
  font-size: 3rem;
  color: #2e7d32;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.success-message p {
  font-size: 1.2rem;
  color: #000;
  margin-bottom: 20px;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

/* Copyright Agreement Checkbox Styles */
.copyright-agreement {
  margin: 20px 0;
  text-align: left;
  width: 100%;
  max-width: 500px;
}

/* Preview area */
.preview-area {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.preview {
  border-radius: 14px;
  border: 2px solid rgba(0,0,0,0.6);
  background: linear-gradient(#ffffff, #f3fbff);
  box-shadow: 0 2px 0 rgba(0,0,0,0.25), inset 0 1px rgba(255,255,255,0.9);
  padding: 10px;
}

.preview img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}

.preview-label {
  font-size: 0.9rem;
  color: #0b3d66;
  margin-bottom: 6px;
  text-align: left;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-family: 'Baloo 2', cursive;
  font-size: 0.6rem;
  line-height: 1.2;
  color: #000;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  background: url('../GreyButton.png') center center / 100% 100% no-repeat;
  border: 2px solid #000;
  border-radius: 4px;
  flex-shrink: 0;
  position: relative;
  margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.checkbox-label:hover .checkmark {
  background: url('../GreenButton.png') center center / 100% 100% no-repeat;
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: url('../GreenButton.png') center center / 100% 100% no-repeat;
}

/* Responsive design for checkbox */
@media (max-width: 768px) {
  .copyright-agreement {
    margin: 15px 0;
  }
  
  .checkbox-label {
    font-size: 0.8rem;
  }
  
  .checkmark {
    width: 18px;
    height: 18px;
  }
  
  .checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .checkbox-label {
    font-size: 0.75rem;
  }
  
  .checkmark {
    width: 16px;
    height: 16px;
  }
  
  .checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    font-size: 11px;
  }
}

/* Tagify Styles - Ensure proper display */
.tagify {
    --tag-bg: #e3f2fd;
    --tag-hover: #bbdefb;
    --tag-text-color: #1976d2;
    --tag-remove-bg: #f44336;
    --tag-remove-btn-bg: transparent;
    --tag-inset-shadow-size: 0;
    --placeholder-color: rgba(0,0,0,0.5);
    --input-color: #000;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    min-height: 40px !important;
    padding: 5px !important;
    font-family: inherit !important;
}

.tagify__input {
    color: var(--input-color) !important;
    font-family: inherit !important;
}

.tagify__tag {
    background: var(--tag-bg) !important;
    color: var(--tag-text-color) !important;
    border-radius: 4px !important;
    margin: 2px !important;
    padding: 4px 8px !important;
}

.tagify__tag:hover {
    background: var(--tag-hover) !important;
}

.tagify__dropdown {
    background: white !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    z-index: 9999 !important;
}

.tagify__dropdown__item {
    padding: 8px 12px !important;
    color: #333 !important;
}

.tagify__dropdown__item:hover,
.tagify__dropdown__item--active {
    background: #e3f2fd !important;
    color: #1976d2 !important;
}

/* Fix any potential conflicts with existing styles */
#tags {
    display: block !important;
    width: 100% !important;
}

/* Hide the original input when Tagify is active */
.tagify + input[type="text"] {
    display: none !important;
} 