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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #fafafa;
  min-height: 100vh;
  padding: 0;
  color: #1d1d1f;
  margin: 0;
  line-height: 1.6;
}

/* Navigation */
.navbar {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid #e5e5e7;
  padding: 16px 20px;
  margin-bottom: 0;
  position: relative;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  position: relative;
}

.nav-brand {
  font-size: 1.25em;
  font-weight: 600;
  color: #1d1d1f;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.2s;
}

.nav-brand:hover {
  opacity: 0.7;
}

.nav-brand.active {
  color: #007aff;
}

.logo-icon {
  width: 24px;
  height: 24px;
  display: block;
  flex-shrink: 0;
  color: inherit;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  color: #6e6e73;
  text-decoration: none;
  font-weight: 400;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-links a:hover {
  color: #1d1d1f;
  background: #f5f5f7;
}

.nav-links a.active {
  color: #007aff;
  background: transparent;
}

/* Hamburger Menu Button */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin: -8px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #1d1d1f;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.page-content {
  padding: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Hero Section */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-title {
  font-size: 3.5em;
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.25em;
  color: #6e6e73;
  margin: 0;
  line-height: 1.5;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.hero-image {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.btn-large {
  padding: 14px 32px;
  font-size: 1.1em;
}

.btn-primary {
  background: #007aff;
  color: white;
}

.btn-primary:hover {
  background: #0051d5;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: #007aff;
  border: 2px solid #007aff;
}

.btn-secondary:hover {
  background: #007aff;
  color: white;
}

/* Page Headers */
.page-header {
  margin-bottom: 32px;
}

h1 {
  color: #1d1d1f;
  margin: 0 0 8px 0;
  font-size: 2.5em;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2 {
  color: #1d1d1f;
  margin-bottom: 20px;
  font-size: 2em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.subtitle {
  color: #6e6e73;
  margin: 0;
  font-size: 1.1em;
  font-weight: 400;
}

/* Breadcrumbs */
.breadcrumbs {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e5e7;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 0.9em;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs a {
  color: #007aff;
  text-decoration: none;
  transition: opacity 0.2s;
}

.breadcrumbs a:hover {
  opacity: 0.7;
}

.breadcrumbs li:last-child a {
  color: #6e6e73;
  pointer-events: none;
}

.breadcrumbs .separator {
  color: #d2d2d7;
}

/* Content Container */
.content-container {
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn {
  background: #007aff;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  display: inline-block;
}

.btn:hover {
  background: #0051d5;
  transform: translateY(-1px);
}

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

.btn:disabled {
  background: #d2d2d7;
  color: #86868b;
  cursor: not-allowed;
  transform: none;
}

.btn-danger {
  background: #ff3b30;
}

.btn-danger:hover {
  background: #d70015;
}

.btn-center {
  display: block;
  margin: 30px auto;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 500;
}

input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 1em;
  transition: border-color 0.3s;
  background: white;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #007aff;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.option-item {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.option-item input {
  flex: 1;
}

.btn-remove {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
}

.btn-remove:hover {
  background: #c0392b;
}

.btn-add {
  background: #27ae60;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95em;
  margin-top: 10px;
}

.btn-add:hover {
  background: #229954;
}

.duration-selector {
  display: flex;
  gap: 15px;
  align-items: center;
}

.duration-selector input {
  width: 100px;
}

.duration-selector select {
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 1em;
}

.question-display {
  font-size: 2em;
  color: #1d1d1f;
  margin-bottom: 32px;
  padding: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.options-list {
  margin-bottom: 30px;
}

.option-button {
  width: 100%;
  padding: 15px 20px;
  margin-bottom: 10px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1.1em;
  cursor: pointer;
  transition: all 0.3s;
  text-align: left;
}

.option-button:hover {
  border-color: #007aff;
  background: #f5f5f7;
  transform: translateX(2px);
}

.option-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.option-button.voted {
  background: #007aff;
  color: white;
  border-color: #007aff;
}

.timer {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 30px;
}

.timer-label {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 5px;
}

.timer-display {
  font-size: 2em;
  font-weight: 600;
  color: #007aff;
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  letter-spacing: -0.02em;
}

.timer-expired {
  color: #e74c3c;
}

.results {
  margin-top: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.results-title {
  font-size: 1.5em;
  margin-bottom: 20px;
  color: #333;
}

.result-item {
  margin-bottom: 15px;
}

.result-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-weight: 500;
}

.result-bar {
  height: 30px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.result-fill {
  height: 100%;
  background: #007aff;
  transition: width 0.5s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.result-percentage {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold;
  color: #333;
}

.share-section {
  margin-top: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  text-align: center;
}

.share-link {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.share-link input {
  flex: 1;
  padding: 10px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 0.9em;
}

.share-link button {
  padding: 10px 20px;
}

.creator-controls {
  margin-top: 20px;
  padding: 20px;
  background: #fff3cd;
  border-radius: 8px;
  border-left: 4px solid #ffc107;
}

.creator-controls h3 {
  color: #856404;
  margin-bottom: 10px;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.error {
  background: #fee;
  color: #c33;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  border-left: 4px solid #c33;
}

.success {
  background: #efe;
  color: #3c3;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  border-left: 4px solid #3c3;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 1001;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-content h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 1.5em;
}

.modal-content p {
  margin: 0 0 25px 0;
  color: #666;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

.modal-actions .btn {
  min-width: 100px;
}

@media (max-width: 600px) {
  .modal-content {
    padding: 20px;
  }

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

  .modal-actions .btn {
    width: 100%;
  }
}

.hidden {
  display: none !important;
}

/* Sessions list styles */
.sessions-list {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.session-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid #e5e5e7;
}

.session-card.expired {
  opacity: 0.7;
}

.session-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.session-question {
  font-size: 1.2em;
  font-weight: 600;
  color: #333;
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.session-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  white-space: nowrap;
}

.session-status.active {
  background: #d4edda;
  color: #155724;
}

.session-status.expired {
  background: #f8f9fa;
  color: #6c757d;
}

.session-meta {
  display: flex;
  gap: 20px;
  color: #666;
  font-size: 0.9em;
  margin-top: 10px;
  flex-wrap: wrap;
}

.session-date {
  display: flex;
  align-items: center;
  gap: 5px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-state h2 {
  color: #999;
  margin-bottom: 10px;
}

/* Footer */
.footer {
  background: #f5f5f7;
  border-top: 1px solid #e5e5e7;
  margin-top: 60px;
  padding: 24px 20px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer p {
  color: #6e6e73;
  font-size: 0.9em;
  margin: 0;
}

.footer a {
  color: #007aff;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer a:hover {
  opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 60px 20px;
    gap: 40px;
  }

  .hero-title {
    font-size: 2.5em;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 20px 16px;
  }

  .content-container {
    padding: 24px;
  }

  h1 {
    font-size: 2em;
  }

  .hero-title {
    font-size: 2em;
  }

  .duration-selector {
    flex-direction: column;
    align-items: flex-start;
  }

  .duration-selector input {
    width: 100%;
  }

  .nav-container {
    flex-wrap: nowrap;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: -20px;
    right: -20px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid #e5e5e7;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
  }

  .nav-links.active {
    max-height: 300px;
    opacity: 1;
    padding: 12px 20px;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    width: 100%;
    text-align: left;
    display: block;
    padding: 12px;
    border-radius: 8px;
  }

  .session-header {
    flex-direction: column;
  }

  .session-meta {
    flex-direction: column;
    gap: 8px;
  }
}
