body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 10px;
  background: linear-gradient(135deg, #8ca19e 0%, #8fb6ab 100%);
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: auto;
  background: #afd69b;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

h1, h2 {
  text-align: center;
  color: #333;
  margin-bottom: 20px;
}

h1 {
  color: #4a5568;
  font-size: 2.5rem;
  margin-bottom: 30px;
}

section {
  margin-bottom: 30px;
  padding: 20px;
  border-radius: 8px;
  background: #b7cc9d;
  border: 1px solid #8ca19e;
}

textarea, input {
  width: 100%;
  margin: 8px 0 15px;
  padding: 12px;
  font-size: 1rem;
  border-radius: 6px;
  border: 2px solid #e2e8f0;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

textarea:focus, input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.input-group label {
  font-weight: 600;
  color: #4a5568;
  min-width: 150px;
}

.input-group input {
  width: auto;
  margin: 0;
}

.search-group, .filter-group {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.search-group input, .filter-group input {
  flex: 1;
  margin: 0;
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

button {
  background: linear-gradient(135deg, #8fb6ab 0%, #8ca19e 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

button:active {
  transform: translateY(0);
}

#loading {
  text-align: center;
  color: #667eea;
  font-weight: 600;
  padding: 20px;
  background: #f0f4ff;
  border-radius: 6px;
  margin-top: 10px;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #e2e8f0;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-note {
  font-size: 0.9rem;
  color: #718096;
  font-style: italic;
}

.info-text {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 15px;
  margin: 15px 0;
}

.info-text p {
  margin: 0 0 10px 0;
  color: #4a5568;
  font-weight: 600;
}

.info-text ul {
  margin: 0;
  padding-left: 20px;
  color: #718096;
}

.info-text li {
  margin-bottom: 5px;
}

.plan-info {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 20px;
}

.plan-info p {
  margin: 0 0 8px 0;
  color: #22543d;
}

.plan-info p:last-child {
  margin-bottom: 0;
  font-size: 0.9rem;
  color: #38a169;
}

#plans-list, #local-plans-list {
  list-style: none;
  padding: 0;
}

#plans-list li, #local-plans-list li {
  border-bottom: 1px solid #8ca19e;
  padding: 15px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border-radius: 6px;
  margin-bottom: 8px;
  background: #a6dbbc;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#plans-list li:hover, #local-plans-list li:hover {
  background: #afd69b;
  transform: translateX(5px);
}

.plan-title {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 5px;
}

.plan-description {
  color: #718096;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.plan-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.tag {
  background: #e2e8f0;
  color: #4a5568;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.plan-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #a0aec0;
}

.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.plan-title {
  font-weight: 600;
  color: #2d3748;
  flex: 1;
  margin-right: 10px;
}

.plan-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.like-btn, .save-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  background: #b7cc9d;
  color: #333;
  transition: background-color 0.2s;
}

.like-btn:hover, .save-btn:hover {
  background: #8fb6ab;
}

.like-btn.liked {
  background: #e53e3e !important;
  color: white;
}

.like-btn.liked:hover {
  background: #c53030 !important;
}

.like-btn:disabled, .save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.plan-type {
  background: #e2e8f0;
  color: #4a5568;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: capitalize;
}

/* Main Navigation */
.main-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.nav-card {
  background: #a6dbbc;
  padding: 25px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.nav-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.15);
  border-color: #8fb6ab;
}

.nav-card h3 {
  margin: 0 0 10px 0;
  color: #2d3748;
  font-size: 1.3rem;
}

.nav-card p {
  margin: 0;
  color: #718096;
  font-size: 0.9rem;
}

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
}

.back-btn {
  background: #b7cc9d;
  color: #4a5568;
  padding: 8px 15px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.back-btn:hover {
  background: #afd69b;
}

/* Tabs */
.create-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 12px;
  border: 2px solid #8ca19e;
  background: #a6dbbc;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.tab-btn.active {
  background: #8fb6ab;
  color: white;
  border-color: #8fb6ab;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.help-text {
  color: #718096;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

/* Clickable Flashcard */
.clickable-flashcard {
  border: 2px solid #8ca19e;
  border-radius: 12px;
  padding: 30px;
  margin: 20px 0;
  min-height: 200px;
  cursor: pointer;
  background: #a6dbbc;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.clickable-flashcard:hover {
  border-color: #8fb6ab;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  transform: scale(1.02);
}

.clickable-flashcard:active {
  transform: scale(0.98);
}

.flashcard-side {
  font-size: 1.4rem;
  line-height: 1.6;
  color: #2d3748;
  font-weight: 500;
  width: 100%;
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  margin: 20px 0;
  overflow: hidden;
}

#progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #8fb6ab 0%, #8ca19e 100%);
  transition: width 0.3s ease;
  width: 0%;
}

#flashcard-front, #flashcard-back {
  font-size: 1.3rem;
  line-height: 1.6;
  color: #2d3748;
  font-weight: 500;
}

.study-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px;
  background: #b7cc9d;
  border-radius: 6px;
  font-weight: 600;
  color: #4a5568;
}

.study-controls, .navigation-controls {
  display: flex;
  gap: 10px;
  margin: 15px 0;
  justify-content: center;
  flex-wrap: wrap;
}

#mark-checked-btn {
  background: linear-gradient(135deg, #8fb6ab 0%, #8ca19e 100%);
}

#mark-failed-btn {
  background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

#speak-btn {
  background: linear-gradient(135deg, #8fb6ab 0%, #8ca19e 100%);
  position: relative;
}

#speak-btn:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #2d3748;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 5px;
}

.delete-btn {
  background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
  font-size: 0.8rem;
  padding: 6px 12px;
  margin-left: 10px;
}

@media (max-width: 768px) {
  body {
    margin: 5px;
  }
  
  .container {
    padding: 15px;
    margin: 5px;
  }
  
  h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }
  
  h2 {
    font-size: 1.4rem;
  }
  
  .main-nav {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .nav-card {
    padding: 20px;
  }
  
  .nav-card h3 {
    font-size: 1.2rem;
  }
  
  .page-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  
  .search-group, .filter-group {
    flex-direction: column;
    gap: 8px;
  }
  
  .input-group {
    flex-direction: column;
    gap: 5px;
  }
  
  .input-group label {
    min-width: auto;
    font-size: 0.9rem;
  }
  
  .button-group {
    flex-direction: column;
    gap: 8px;
  }
  
  button {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
  
  .study-controls, .navigation-controls {
    flex-direction: column;
    gap: 8px;
  }
  
  .clickable-flashcard {
    padding: 20px;
    min-height: 120px;
  }
  
  .flashcard-side {
    font-size: 1.1rem;
  }
  
  #flashcard-front, #flashcard-back {
    font-size: 1.1rem;
  }
  
  .create-tabs {
    flex-direction: column;
    gap: 8px;
  }
  
  .tab-btn {
    padding: 10px;
    font-size: 0.9rem;
  }
  
  textarea, input {
    font-size: 0.9rem;
    padding: 10px;
    min-height: 44px; /* Better touch target */
  }
  
  textarea {
    min-height: 80px; /* More space for textarea */
  }
  
  .info-text {
    padding: 10px;
    font-size: 0.85rem;
  }
  
  .info-text ul {
    padding-left: 12px;
    margin: 5px 0;
  }
  
  .info-text li {
    margin-bottom: 3px;
  }
  
  .plan-info {
    padding: 12px;
  }
  
  #plans-list li, #local-plans-list li {
    padding: 12px;
  }
  
  .plan-title {
    font-size: 1rem;
  }
  
  .plan-header {
    flex-direction: column;
    gap: 8px;
  }
  
  .plan-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .like-btn, .save-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  .delete-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  .plan-description {
    font-size: 0.8rem;
  }
  
  .tag {
    font-size: 0.7rem;
    padding: 3px 6px;
  }
}

@media (max-width: 480px) {
  body {
    margin: 2px;
  }
  
  .container {
    padding: 10px;
    margin: 2px;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.2rem;
  }
  
  .nav-card {
    padding: 15px;
  }
  
  .nav-card h3 {
    font-size: 1.1rem;
  }
  
  .nav-card p {
    font-size: 0.8rem;
  }
  
  button {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  textarea, input {
    font-size: 0.8rem;
    padding: 8px;
    min-height: 44px; /* Better touch target */
  }
  
  textarea {
    min-height: 80px; /* More space for textarea */
  }
  
  .info-text {
    padding: 8px;
    font-size: 0.8rem;
  }
  
  .info-text ul {
    padding-left: 10px;
    margin: 3px 0;
  }
  
  .info-text li {
    margin-bottom: 2px;
  }
  
  .clickable-flashcard {
    padding: 15px;
    min-height: 100px;
  }
  
  .flashcard-side {
    font-size: 1rem;
  }
  
  .study-info {
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }
} 