/* ==========================================================================
   Countdown Edu - Modern Dark Glassmorphism Stylesheet
   ========================================================================== */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --card-bg: rgba(17, 24, 39, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(255, 255, 255, 0.16);
  
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-indigo: #6366f1;
  --accent-purple: #8b5cf6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --glow-active: 0 0 35px rgba(59, 130, 246, 0.35);
  --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  --radius-lg: 1.25rem;
  --radius-md: 0.875rem;
  --radius-sm: 0.5rem;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background Lights */
.bg-glow-1 {
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 650px;
  height: 450px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, rgba(99, 102, 241, 0.08) 50%, transparent 75%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow-2 {
  position: fixed;
  bottom: -100px;
  right: -100px;
  width: 500px;
  height: 400px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

/* Container */
.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
  position: relative;
  z-index: 1;
}

/* Header & Status Badge */
.header-section {
  text-align: center;
  margin-bottom: 2rem;
}

.org-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.875rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
  transition: var(--transition);
  margin-bottom: 1.25rem;
}

.status-badge.waiting {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #fbbf24;
}

.status-badge.ready {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  animation: pulse-border 2s infinite;
}

.status-badge.ended {
  background: rgba(107, 114, 128, 0.15);
  border: 1px solid rgba(107, 114, 128, 0.3);
  color: #9ca3af;
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: currentColor;
}

.status-badge.ready .status-dot {
  animation: blink 1.2s infinite ease-in-out;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-desc {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto;
  word-break: keep-all;
}

/* Main Card */
.main-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}

/* Platform & Date Meta */
.meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--card-border);
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
}

.platform-pill.zoom {
  background: rgba(45, 140, 255, 0.15);
  border: 1px solid rgba(45, 140, 255, 0.35);
  color: #60a5fa;
}

.platform-pill.bigmarker {
  background: rgba(13, 148, 136, 0.15);
  border: 1px solid rgba(13, 148, 136, 0.35);
  color: #2dd4bf;
}

.platform-pill.meet {
  background: rgba(234, 67, 53, 0.12);
  border: 1px solid rgba(234, 67, 53, 0.3);
  color: #f87171;
}

.platform-pill.youtube {
  background: rgba(255, 0, 0, 0.12);
  border: 1px solid rgba(255, 0, 0, 0.3);
  color: #fca5a5;
}

.platform-icon {
  width: 1rem;
  height: 1rem;
}

.date-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.date-info svg {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--accent-blue);
}

/* Countdown Grid */
.countdown-container {
  margin-bottom: 2rem;
}

.countdown-label {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 1rem;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.875rem;
}

.time-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 1.125rem 0.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.time-box::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
  pointer-events: none;
}

.time-value {
  font-size: 2.375rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  letter-spacing: -0.03em;
  margin-bottom: 0.375rem;
}

.time-unit {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Action Section & CTA Button */
.cta-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.btn-cta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 1.125rem 1.75rem;
  border-radius: var(--radius-md);
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

/* Waiting Button State */
.btn-cta.btn-waiting {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d1d5db;
  cursor: pointer;
}

.btn-cta.btn-waiting:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Ready / Live Button State */
.btn-cta.btn-ready {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100%);
  color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.5), 0 0 20px rgba(59, 130, 246, 0.3);
  animation: pulse-glow 2.5s infinite;
}

.btn-cta.btn-ready:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(79, 70, 229, 0.65), 0 0 30px rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, #1d4ed8 0%, #4338ca 50%, #6d28d9 100%);
}

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

/* Ended State */
.btn-cta.btn-ended {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  cursor: not-allowed;
}

.cta-tip {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  line-height: 1.5;
  word-break: keep-all;
}

.short-url-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.short-url-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--accent-cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-copy-url {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8125rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-copy-url:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* Secondary Tools (Calendar, Guide, Share) */
.secondary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.875rem;
  margin-bottom: 2rem;
}

.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.125rem 0.875rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  text-decoration: none;
  backdrop-filter: blur(12px);
}

.tool-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--card-border-hover);
  transform: translateY(-2px);
}

.tool-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--accent-blue);
  transition: var(--transition);
}

.tool-card:hover .tool-icon {
  transform: scale(1.1);
}

.tool-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.tool-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Notice Box */
.notice-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.notice-box svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--accent-blue);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.notice-text {
  font-size: 0.875rem;
  color: #cbd5e1;
  line-height: 1.5;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

footer a:hover {
  color: var(--accent-blue);
}

/* Modal Window */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.modal-content {
  background: #151c2c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

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

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

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
}

.modal-close:hover {
  color: #fff;
}

.guide-step-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.guide-step-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.guide-step-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-step-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.guide-btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.625rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

.guide-btn-download:hover {
  background: rgba(59, 130, 246, 0.25);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Keyframe Animations */
@keyframes pulse-border {
  0%, 100% {
    border-color: rgba(16, 185, 129, 0.35);
  }
  50% {
    border-color: rgba(16, 185, 129, 0.8);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.5), 0 0 20px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 12px 30px -5px rgba(79, 70, 229, 0.75), 0 0 35px rgba(59, 130, 246, 0.6);
  }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Generator Form Styles */
.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.form-sublabel {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.result-card {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.result-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #34d399;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.result-url-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-family: ui-monospace, monospace;
  font-size: 0.8125rem;
  color: #a7f3d0;
  word-break: break-all;
  margin-bottom: 1rem;
}

.btn-group {
  display: flex;
  gap: 0.75rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .btn-group {
    flex-direction: column;
  }
}
  .container {
    padding: 1.75rem 1rem;
  }
  
  .page-title {
    font-size: 1.5rem;
  }
  
  .main-card {
    padding: 1.5rem 1.125rem;
  }
  
  .time-value {
    font-size: 1.75rem;
  }
  
  .time-box {
    padding: 0.875rem 0.25rem;
  }
  
  .countdown-grid {
    gap: 0.5rem;
  }
  
  .btn-cta {
    font-size: 1rem;
    padding: 1rem 1.25rem;
  }
  
  .secondary-grid {
    grid-template-columns: 1fr;
    gap: 0.625rem;
  }
  
  .tool-card {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 0.875rem 1.25rem;
  }
}
