@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700;900&display=swap');

:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --bg-dark: #0B1120;
  --bg-gradient: linear-gradient(135deg, #0B1120 0%, #172554 50%, #082f49 100%);
  --text-main: #f8fafc;
  --text-light: #94a3b8;
  --card-bg: rgba(30, 41, 59, 0.4);
  --card-border: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: 'Noto Sans TC', sans-serif;
  background: var(--bg-dark);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
}

/* Header */
.glass-header {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  z-index: 10;
  margin-bottom: 2rem;
}

.header-content h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  background: linear-gradient(to right, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.header-content p {
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--text-light);
}

/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding-bottom: 4rem;
}

/* Glassmorphism Card */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Typography in Cards */
h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #fff;
  border-bottom: 3px solid var(--primary-color);
  display: inline-block;
  padding-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

ul {
  list-style: none;
  font-size: 1.1rem;
  line-height: 1.8;
}

li {
  margin-bottom: 1.5rem;
  position: relative;
  padding-left: 2rem;
}

li::before {
  content: '👉';
  position: absolute;
  left: 0;
  top: 2px;
}

.highlight {
  font-weight: 700;
  color: #60a5fa;
}

/* Buttons */
.btn-group {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid rgba(96, 165, 250, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.4);
}

/* Masonry Photo Grid */
.photo-grid {
  column-count: 3;
  column-gap: 1.5rem;
  margin-top: 1.5rem;
}

.photo-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
}

.photo-item:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.3);
}

.photo-item img {
  width: 100%;
  height: auto;
  display: block;
}

.submission-card {
  padding: 2rem 1rem;
  text-align: center;
}

.submission-card h4 {
  color: #60a5fa;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.submission-card p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Scroll Reveal Animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Modal Lightbox */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  width: 95%;
  max-width: 1200px;
  height: 90vh;
  background: var(--bg-dark);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 40px;
  height: 40px;
  background: #334155;
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s;
  z-index: 10;
}

.modal-close:hover {
  background: #ef4444;
  transform: scale(1.1) rotate(90deg);
}

.modal-body {
  flex: 1;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0f172a;
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

.modal-body img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 4rem 1rem 2rem;
}

.footer h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.footer p {
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--text-light);
  margin-bottom: 3rem;
}

.copyright {
  font-size: 0.9rem;
  color: rgba(148, 163, 184, 0.6);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 1.5rem;
}

/* Responsive Design (RWD) */
@media (max-width: 992px) {
  .photo-grid {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  .glass-card {
    padding: 2rem 1.5rem;
  }
  
  .photo-grid {
    column-count: 1;
  }
  
  ul {
    font-size: 1rem;
  }
  
  .modal-content {
    height: 80vh;
  }
}

/* Timeline CSS */
.timeline-container {
  position: relative;
  max-width: 850px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.timeline-line {
  position: absolute;
  left: 31px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(96, 165, 250, 0.2);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 60px;
}

.timeline-dot {
  position: absolute;
  left: 20px;
  top: 14px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #0f172a;
  border: 4px solid var(--primary-color);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
  z-index: 2;
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot,
.timeline-item.active .timeline-dot {
  background: var(--primary-color);
  transform: scale(1.15);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.7);
}

.timeline-content {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.timeline-content:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(96, 165, 250, 0.3);
  transform: translateY(-2px);
}

.timeline-item.active .timeline-content {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(96, 165, 250, 0.4);
}

.timeline-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.timeline-year {
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.2);
}

.timeline-rank {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fbbf24; /* gold */
  background: rgba(251, 191, 36, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.timeline-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color 0.3s ease;
}

.timeline-content:hover .timeline-title {
  color: #60a5fa;
}

.timeline-title::after {
  content: '▼';
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  transition: transform 0.3s ease, color 0.3s ease;
}

.timeline-item.active .timeline-title::after {
  transform: rotate(180deg);
  color: #60a5fa;
}

.timeline-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), margin-top 0.3s ease;
  margin-top: 0;
}

.timeline-item.active .timeline-detail {
  max-height: 800px;
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
}

.timeline-award {
  font-size: 0.95rem;
  color: #34d399; /* emerald */
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.timeline-summary {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-light);
}

@media (max-width: 768px) {
  .timeline-container {
    padding: 0;
  }
  .timeline-line {
    left: 21px;
  }
  .timeline-item {
    padding-left: 45px;
    margin-bottom: 1.2rem;
  }
  .timeline-dot {
    left: 10px;
    top: 15px;
    width: 20px;
    height: 20px;
    border-width: 3px;
  }
  .timeline-content {
    padding: 1rem;
  }
  .timeline-title {
    font-size: 1.1rem;
  }
}
