/* CSS 변수 설정 */
:root {
  --primary-blue: #4285f4;
  --light-blue: #6fa8f5;
  --lighter-blue: #a0c4ff;
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #e0e0e0;
  --gray-400: #bdbdbd;
  --gray-500: #9e9e9e;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;
  --font-primary: "Noto Sans KR", "Heebo", sans-serif;
  --font-heading: "Noto Sans KR", "Heebo", sans-serif;
}

/* 기본 스타일 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background-color: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
}

/* Header 스타일 */
.header {
  background: linear-gradient(135deg, #4a90e2 0%, #7bb3f0 100%);
  color: var(--white);
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(74, 144, 226, 0.15);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  font-size: 1.5rem;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
}

.header-nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.1) 100%
  );
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.nav-link:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.2) 100%
  );
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.nav-link:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.5s ease;
}

.nav-link:hover::before {
  left: 100%;
}

/* 로그아웃 버튼 스타일 - 구독 버튼과 동일한 디자인, 호버 시 빨간색 */
.logout-btn {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.1) 100%
  );
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-primary);
  margin-right: 1rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.logout-btn:hover {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  border-color: rgba(239, 68, 68, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(239, 68, 68, 0.3);
}

.logout-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.logout-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.5s ease;
}

.logout-btn:hover::before {
  left: 100%;
}

.logout-icon {
  font-size: 1rem;
}

.logout-text {
  font-weight: 600;
}

/* Container 레이아웃 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  min-height: calc(100vh - 80px);
}

/* Sidebar 스타일 */
.sidebar {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  height: fit-content;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sidebar-logo .logo-icon {
  color: #4285f4;
  font-size: 1.5rem;
}

.sidebar-logo .logo-text {
  color: #4285f4;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

/* 프로젝트 생성 버튼 */
.main-action {
  margin-top: 1rem;
}

.project-create-btn {
  width: 100%;
  background: #4285f4;
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(66, 133, 244, 0.2);
}

.project-create-btn:hover {
  background: #6fa8f5;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(66, 133, 244, 0.3);
}

.project-create-btn:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 1.25rem;
}

.btn-text {
  font-weight: 600;
}

/* Main Content 스타일 */
.main-content {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

.page-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

.about-btn {
  background: #a0c4ff;
  color: var(--white);
  border: none;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-family: var(--font-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.about-btn:hover {
  background: #6fa8f5;
  transform: translateY(-1px);
}

/* 푸터 */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  margin-top: 2rem;
  padding: 1.5rem 1rem;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
}

.site-footer .footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
  color: var(--gray-600);
  font-size: 0.9rem;
}

.site-footer .footer-company-name {
  font-weight: 700;
  color: var(--gray-800);
}

.site-footer .footer-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
}

.site-footer .footer-details span {
  white-space: pre-wrap;
}

/* 로딩 컨테이너 */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

/* 로딩 스피너 */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
}

.spinner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #4285f4;
  margin: 0 3px;
  animation: spin 1.4s infinite ease-in-out both;
}

.spinner-dot:nth-child(1) {
  animation-delay: -0.32s;
}
.spinner-dot:nth-child(2) {
  animation-delay: -0.16s;
}
.spinner-dot:nth-child(3) {
  animation-delay: 0s;
}
.spinner-dot:nth-child(4) {
  animation-delay: 0.16s;
}
.spinner-dot:nth-child(5) {
  animation-delay: 0.32s;
}
.spinner-dot:nth-child(6) {
  animation-delay: 0.48s;
}
.spinner-dot:nth-child(7) {
  animation-delay: 0.64s;
}
.spinner-dot:nth-child(8) {
  animation-delay: 0.8s;
}

@keyframes spin {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.loading-text {
  color: #4285f4;
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.loading-subtext {
  color: var(--gray-600);
  font-size: 0.875rem;
  text-align: center;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1rem;
  }

  .sidebar {
    order: 2;
    padding: 1.5rem;
  }

  .main-content {
    order: 1;
    padding: 1.5rem;
  }

  .header-content {
    padding: 0 1rem;
    flex-direction: column;
    gap: 1rem;
  }

  .header-nav {
    gap: 1rem;
    display: flex;
    align-items: center;
  }

  .logout-btn {
    font-size: 0.8rem;
    padding: 0.6rem 1rem;
    margin-right: 0.5rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .header-nav {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.875rem;
  }

  .logo-text {
    font-size: 1.25rem;
  }

  .sidebar-logo .logo-text {
    font-size: 1.125rem;
  }

  .site-footer .footer-details {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ===== 학생 정보 입력 UI ===== */

/* 학생 정보 섹션 */
.student-info-section {
  margin-top: 0.5rem;
}

/* 학생 정보 버튼 */
.student-info-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  font-family: var(--font-primary);
}

.student-info-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #7c92f0 0%, #8a5fb8 100%);
}

.student-info-btn:active {
  transform: translateY(0);
}

.student-info-btn .btn-icon {
  font-size: 1.1rem;
}

/* 모달 오버레이 */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

/* 모달 컨텐츠 */
.modal-content {
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 모달 헤더 */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-600);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

/* 모달 바디 */
.modal-body {
  padding: 2rem 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--gray-300);
  border-radius: 10px;
  transition: all 0.3s ease;
  font-family: var(--font-primary);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.1);
}

.form-hint {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin: 0;
}

/* 모달 푸터 */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

.btn-secondary {
  padding: 0.75rem 1.5rem;
  background: var(--gray-200);
  color: var(--gray-800);
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--gray-300);
}

.btn-primary {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(
    135deg,
    var(--primary-blue) 0%,
    var(--light-blue) 100%
  );
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(66, 133, 244, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* 반응형 모달 */
@media (max-width: 768px) {
  .modal-content {
    max-width: 90%;
  }

  .modal-title {
    font-size: 1.25rem;
  }

  .modal-body {
    padding: 1.5rem 1rem;
  }

  .modal-footer {
    flex-direction: column-reverse;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}

/* ===== 프로젝트 옵션 모달 ===== */

.modal-description {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.project-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-option-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border: 2px solid var(--gray-300);
  border-radius: 10px;
  background: var(--white);
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.project-option-btn:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.refund-policy-list {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--gray-700);
  font-size: 0.95rem;
  line-height: 1.5;
}

.refund-policy-list a {
  color: var(--primary-blue);
  text-decoration: underline;
}

.option-icon {
  font-size: 1.5rem;
  width: 2rem;
  text-align: center;
}

.option-text {
  flex: 1;
}

/* 열기 버튼 */
.open-project-btn {
  border-color: #4285f4;
  color: #4285f4;
}

.open-project-btn:hover {
  background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
  border-color: #3b7ae4;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

/* 삭제 버튼 */
.delete-project-btn {
  border-color: #ef4444;
  color: #ef4444;
}

.delete-project-btn:hover {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* 프로젝트 옵션 모달 반응형 */
@media (max-width: 768px) {
  .project-option-btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
  }

  .option-icon {
    font-size: 1.25rem;
    width: 1.75rem;
  }
}
