body {
  font-family: "Inter", sans-serif;
  padding-bottom: 80px;
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;  /* Chrome, Safari and Opera */
}

/* Week day indicator styling */
#week-days-indicator {
  min-height: 32px;
}

/* Month week indicator styling */
#month-weeks-indicator {
  min-height: 32px;
}

/* Year month indicator styling */
#year-months-indicator {
  min-height: 32px;
}
.timer-glow {
  animation: glow 2s infinite alternate;
}
@keyframes glow {
  from {
    text-shadow: 0 0 5px #4f46e5, 0 0 10px #4f46e5, 0 0 15px #4f46e5;
  }
  to {
    text-shadow: 0 0 10px #6366f1, 0 0 20px #6366f1, 0 0 30px #6366f1;
  }
}
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
}
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 1000;
  background-color: rgba(31, 41, 55, 0.8);
  backdrop-filter: blur(4px);
  border-top: 1px solid #4b5563;
}
.nav-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  color: #9ca3af;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease-in-out;
}
.nav-button .icon {
  width: 28px;
  height: 28px;
  margin-bottom: 2px;
}
.nav-button span {
  font-size: 12px;
}
.nav-button:hover {
  color: #e5e7eb;
}
.nav-button.active {
  color: #6366f1;
}
.lap-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: #374151;
  padding: 16px;
  border-radius: 12px;
}
.lap-item .lap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lap-item .subject-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: #e5e7eb;
  cursor: pointer;
}
.lap-item .subject-input {
  font-size: 1.125rem;
  font-weight: 600;
  background-color: #4b5563;
  color: white;
  border: 1px solid #6b7280;
  border-radius: 6px;
  padding: 4px 8px;
  width: 60%;
}
.lap-item .lap-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.lap-item .duration {
  font-size: 1.125rem;
  font-weight: 600;
  color: #a5b4fc;
}
.lap-item .lap-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #9ca3af;
  font-family: monospace;
}
.lap-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 12px;
}
.add-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 80px;
  margin-top: 12px;
  background-color: #4b5563;
  border: 2px dashed #6b7280;
  border-radius: 8px;
  color: #9ca3af;
  cursor: pointer;
  transition: background-color 0.2s;
}
.add-image-placeholder:hover {
  background-color: #556172;
}
.delete-button {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: background-color 0.2s, color 0.2s;
}
.delete-button:hover {
  background-color: #ef4444;
  color: white;
}
.delete-button svg {
  width: 18px;
  height: 18px;
}
.date-header {
  font-size: 1.125rem;
  font-weight: 700;
  color: #d1d5db;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #4b5563;
  text-align: left;
}
#laps-list-container > .date-header:first-child {
  margin-top: 0;
}
#toast {
  position: fixed;
  top: 20px;
  left: 20px;
  background-color: #22c55e;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease-in-out;
  z-index: 2000;
   pointer-events: none; /* 👈 이 줄 추가: 숨겨져 있을 때 클릭 통과 */
}
#toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto; /* 👈 이 줄 추가: 보일 때 다시 클릭 가능 */
}
.google-icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
}
.community-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #4b5563;
}
.community-header-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #4b5563;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.2s;
}
.community-header-button:hover {
  background-color: #6b7280;
}
.fab {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 60px;
  height: 60px;
  background-color: #4f46e5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.2s;
}
.fab:hover {
  transform: scale(1.05);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%; /* 이 줄 추가 */
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal-content {
  background-color: #1f2937;
  padding: 2rem;
  border-radius: 1rem;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.modal-image-preview {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  margin-top: 1rem;
  border-radius: 0.5rem;
  background-color: #374151;
}
#modal-subject {
  cursor: pointer;
}
.post-textarea {
  /* 신규 */
  width: 100%;
  height: 120px;
  background-color: #374151;
  border: 1px solid #4b5563;
  border-radius: 8px;
  padding: 12px;
  color: white;
  resize: vertical;
}
.post-textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5);
}
/* Community & Comment Styles (신규) */
.post-item,
.comment-original-post-card {
  background-color: #374151;
  border-radius: 12px;
  padding: 1rem;
  text-align: left;
}
.post-item {
  margin-bottom: 1rem;
}
.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.post-body p {
  color: #d1d5db;
  white-space: pre-wrap;
  word-break: break-word;
}
.post-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 12px;
}
.post-footer {
  display: flex;
  justify-content: flex-start; /* 자식 요소들을 왼쪽으로 정렬 */
  gap: 1rem;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid #4b5563;
}
.post-action-button {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: transparent;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #9ca3af;
  border-radius: 9999px;
  transition: background-color 0.2s, color 0.2s;
}
.post-action-button svg {
  width: 20px;
  height: 20px;
}
.post-action-button:hover {
  background-color: #4b5563;
  color: #e5e7eb;
}
.post-action-button.liked {
  color: #ec4899; /* Pink-500 */
}
.post-action-button.liked:hover {
  color: #f9a8d4; /* Pink-300 */
  background-color: rgba(236, 72, 153, 0.1);
}

.post-delete-button { /* 신규 */
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: background-color 0.2s, color 0.2s;
}
.post-delete-button:hover {
  background-color: #ef4444;
  color: white;
}

.comment-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #4b5563;
}
#comment-list-container > .comment-item:last-child {
  border-bottom: none;
}
.comment-form-container {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.5rem;
}
.post-action-button svg {
  pointer-events: none;
}
#portal-root {
  position: relative;
  z-index: 1;
}

/* Breathing Exercise Styles */
.breathing-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(102, 126, 234, 0.6);
  transition: all 0.3s ease;
}

.breathing-circle.inhale {
  animation: breathe-in 4s ease-in-out;
}

.breathing-circle.hold {
  animation: breathe-hold 7s ease-in-out;
}

.breathing-circle.exhale {
  animation: breathe-out 8s ease-in-out;
}

@keyframes breathe-in {
  0% {
    transform: scale(1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.6);
  }
  100% {
    transform: scale(2);
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 0 60px rgba(59, 130, 246, 0.8);
  }
}

@keyframes breathe-hold {
  0%, 100% {
    transform: scale(2);
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    box-shadow: 0 0 60px rgba(168, 85, 247, 0.8);
  }
}

@keyframes breathe-out {
  0% {
    transform: scale(2);
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    box-shadow: 0 0 60px rgba(168, 85, 247, 0.8);
  }
  100% {
    transform: scale(1);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.6);
  }
}

/* Timetable Styles */
.timetable {
  display: flex;
  gap: 8px;
  min-height: 400px;
  max-height: 600px;
  overflow-y: auto;
}

.timetable-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex-shrink: 0;
  padding-top: 4px;
}

.timetable-hour-label {
  height: 60px;
  width: 40px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-right: 8px;
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
}

.timetable-content {
  flex: 1;
  position: relative;
  border-left: 2px solid #4b5563;
  padding-left: 8px;
}

.timetable-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.timetable-grid-line {
  height: 60px;
  border-bottom: 1px solid #374151;
}

.timetable-sessions {
  position: relative;
  height: 100%;
}

.timetable-session {
  position: absolute;
  left: 0;
  right: 0;
  border-radius: 6px;
  min-height: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 4px solid;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.timetable-session:hover {
  transform: translateX(2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Subject Color Picker */
.subject-color-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background-color: #374151;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.subject-color-item:hover {
  background-color: #4b5563;
}

.subject-color-preview {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid #6b7280;
  transition: border-color 0.2s;
}

.subject-color-preview:hover {
  border-color: #9ca3af;
}

.subject-color-name {
  flex: 1;
  font-weight: 500;
  color: #e5e7eb;
}

.color-picker-input {
  width: 50px;
  height: 40px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
}