/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Nunito", "Noto Sans Devanagari", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
.title {
  font-family: "Fredoka One", "Noto Sans Devanagari", cursive;
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 10px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 30px;
  opacity: 0.9;
}

/* Home Page Logo */
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 5px;
}

.home-logo {
  height: 60px;
  width: auto;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.2s ease;
}

.home-logo:hover {
  transform: scale(1.05);
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 20px;
}

.nav-back {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.back-btn,
.settings-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 25px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  font-weight: 600;
}

.back-btn:hover,
.settings-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Welcome Card */
.welcome-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  margin-bottom: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.pet-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.pet-icon {
  font-size: 3rem;
  animation: bounce 2s infinite;
}

.pet-icon:nth-child(2) {
  animation-delay: 0.5s;
}

.pet-icon:nth-child(3) {
  animation-delay: 1s;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Navigation Cards */
.navigation-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.nav-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

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

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

.nav-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  font-weight: 600;
}

.arrow {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.nav-card:hover .arrow {
  transform: translateX(5px);
}

/* Auth card specific styling */
.auth-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.auth-card .card-icon {
  filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.3));
}

.auth-card h3,
.auth-card p {
  color: white;
}

.auth-card:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* Features */
.features {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 20px;
}

.features ul {
  list-style: none;
  padding-left: 0;
}

.features li {
  padding: 10px 0;
  font-size: 1.1rem;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: auto;
  padding-top: 20px;
  color: rgba(255, 255, 255, 0.8);
}

/* Owner Settings Styles */
.settings-panel {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.control-section {
  margin-bottom: 30px;
  text-align: center;
}

.button-controls {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 20px 0;
  flex-wrap: wrap;
}

.control-btn {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.control-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.add-btn {
  background: linear-gradient(45deg, #4ecdc4, #44a08d);
}

.clear-btn {
  background: linear-gradient(45deg, #ff6b6b, #ee5a52);
}

.save-btn {
  background: linear-gradient(45deg, #56ab2f, #a8e6cf);
}

.go-btn {
  background: linear-gradient(45deg, #ffa726, #ff7043);
}

.preview-btn {
  background: linear-gradient(45deg, #9c27b0, #673ab7);
}

.test-btn {
  background: linear-gradient(45deg, #2196f3, #21cbf3);
}

.button-count {
  font-size: 1.1rem;
  color: #666;
  margin-top: 15px;
}

/* Buttons Grid */
.buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 30px 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

.buttons-grid.single-button {
  grid-template-columns: 250px;
  gap: 20px;
}

.buttons-grid.two-buttons {
  grid-template-columns: repeat(2, 250px);
  gap: 20px;
}

.button-item {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.button-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.button-preview {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: white;
  background: #ddd;
  overflow: hidden;
  position: relative;
}

.button-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.button-word {
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 15px;
  color: #333;
  order: 2;
}

.button-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  order: 3;
}

.action-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.action-btn {
  background: #f0f0f0;
  border: none;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.edit-btn:hover {
  background: #4ecdc4;
  color: white;
}

.delete-btn:hover {
  background: #ff6b6b;
  color: white;
}

/* Empty State */
.empty-state,
.pet-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: white;
  margin: 5% auto;
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #eee;
}

.close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #999;
  transition: color 0.3s ease;
}

.close-btn:hover {
  color: #333;
}

.modal-body {
  padding: 30px;
}

.modal-footer {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  padding: 20px 30px;
  border-top: 1px solid #eee;
}

/* Form Styles */
.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.form-group input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus {
  outline: none;
  border-color: #4ecdc4;
}

/* Voice Recording Styles */
.voice-recording-area {
  border: 2px dashed #ddd;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  background: #fafafa;
  transition: all 0.3s ease;
}

.voice-recording-area.recording {
  border-color: #ff6b6b;
  background: #fff5f5;
}

.recording-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.recording-controls .control-btn {
  padding: 8px 16px;
  font-size: 0.9rem;
  min-width: auto;
}

.record-btn {
  background: #ff6b6b;
  color: white;
}

.record-btn:hover {
  background: #ff5252;
}

.stop-btn {
  background: #ff9800;
  color: white;
}

.stop-btn:hover {
  background: #f57c00;
}

.play-btn {
  background: #4caf50;
  color: white;
}

.play-btn:hover {
  background: #45a049;
}

.remove-btn {
  background: #f44336;
  color: white;
}

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

.recording-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
  color: #ff6b6b;
  font-weight: 600;
}

.recording-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.recording-dot {
  width: 12px;
  height: 12px;
  background: #ff6b6b;
  border-radius: 50%;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.recording-timer {
  font-family: monospace;
  font-size: 1.1rem;
  color: #333;
}

.recording-info {
  color: #4caf50;
  font-weight: 600;
  margin-bottom: 10px;
}

.recording-help {
  color: #666;
  font-size: 0.9rem;
  margin-top: 10px;
  display: block;
}

/* Image Upload */
.image-upload-area {
  border: 3px dashed #ddd;
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  /* Mobile touch optimization */
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: rgba(78, 205, 196, 0.3);
  /* Ensure proper mobile interaction */
  -webkit-user-drag: none;
  -webkit-appearance: none;
  outline: none;
}

.image-upload-area:hover,
.image-upload-area:active,
.image-upload-area:focus {
  border-color: #4ecdc4;
  background: rgba(78, 205, 196, 0.05);
  transform: scale(1.02);
}

/* Mobile-specific touch feedback */
@media (hover: none) and (pointer: coarse) {
  .image-upload-area {
    /* Larger touch target on mobile */
    min-height: 160px;
    padding: 40px 20px;
    border-width: 4px;
  }

  .image-upload-area:active {
    background: rgba(78, 205, 196, 0.15);
    transform: scale(0.98);
    transition: all 0.1s ease;
    border-color: #4ecdc4;
  }

  .upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .image-upload-area {
    padding: 45px 30px;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-width: 4px;
    /* Additional mobile optimizations */
    font-size: 1.1rem;
    line-height: 1.4;
  }

  .image-upload-area p {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 10px 0;
  }

  .image-upload-area small {
    font-size: 0.9rem;
    line-height: 1.3;
    margin-top: 15px;
  }
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  pointer-events: none;
  /* Mobile optimization */
  -webkit-user-select: none;
  user-select: none;
  display: block;
  line-height: 1;
}

.image-preview {
  position: relative;
  display: inline-block;
  /* Allow pointer events for remove button */
  pointer-events: auto;
}

.image-preview img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
}

.remove-image {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #ff6b6b;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-weight: bold;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s ease;
}

.remove-image:hover {
  background: #e53e3e;
}

.remove-image:before {
  content: "×";
  font-size: 16px;
  font-weight: bold;
}

/* Color Options */

/* Hindi/Devanagari font support */
:lang(hi) {
  font-family: "Noto Sans Devanagari", "Nunito", sans-serif;
}

/* Language Selector Styles */
.language-selector {
  position: relative;
  display: inline-block;
  margin-left: 15px;
}

.language-toggle {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 8px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  line-height: 1;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.language-toggle > span {
  display: inline-flex;
  align-items: center;
  font-size: inherit;
  line-height: 1;
}

.language-toggle:hover {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.language-current {
  font-weight: 600;
  color: #4ecdc4;
  font-size: inherit;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.language-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  max-height: 300px;
  overflow-y: auto;
}

.language-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-option {
  width: 100%;
  background: none;
  border: none;
  padding: 12px 15px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.2s ease;
  font-size: 0.9rem;
}

.language-option:hover {
  background-color: #f8f9fa;
}

.language-option.active {
  background-color: #4ecdc4;
  color: white;
}

.language-option.active:hover {
  background-color: #45b7d1;
}

.language-flag {
  font-size: 1.2rem;
  min-width: 24px;
}

.language-name {
  flex: 1;
  font-weight: 500;
}

.language-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #4ecdc4;
  color: white;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  font-weight: 600;
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.3s ease;
}

.language-notification.show {
  opacity: 1;
  transform: translateX(0);
}

/* RTL Language Support */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .language-selector {
  margin-left: 0;
  margin-right: 15px;
}

[dir="rtl"] .language-dropdown {
  right: auto;
  left: 0;
}

[dir="rtl"] .language-option {
  text-align: right;
}

[dir="rtl"] .nav-back {
  flex-direction: row-reverse;
}

[dir="rtl"] .button-actions {
  flex-direction: row-reverse;
}

[dir="rtl"] .action-buttons {
  flex-direction: row-reverse;
}

[dir="rtl"] .modal-header {
  text-align: right;
}

[dir="rtl"] .form-group label {
  text-align: right;
}

[dir="rtl"] .close-btn {
  left: 20px;
  right: auto;
}

[dir="rtl"] .language-notification {
  right: auto;
  left: 20px;
}

/* Pet Mode Styles */
.pet-mode {
  background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 50%, #4ecdc4 100%);
}

.pet-container {
  max-width: 100%;
  padding: 15px;
}

.pet-header {
  text-align: center;
  margin-bottom: 20px;
}

.pet-title {
  font-size: 2rem;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.pet-back-btn {
  font-size: 1.1rem;
}

.pet-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Pet Buttons */
.pet-buttons-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 40px 20px;
  min-height: 80vh;
  max-width: 1200px;
  margin: 0 auto;
  place-items: center;
  justify-items: center;
}

.pet-buttons-container.single-button {
  grid-template-columns: 300px;
  gap: 50px;
}

.pet-buttons-container.two-buttons {
  grid-template-columns: repeat(2, 250px);
  gap: 60px;
}

.pet-buttons-container.three-buttons {
  grid-template-columns: repeat(3, 200px);
  gap: 50px;
}

.pet-buttons-container.four-buttons {
  grid-template-columns: repeat(2, 180px);
  gap: 40px;
}

.pet-buttons-container.five-buttons {
  grid-template-columns: repeat(3, 160px);
  gap: 35px;
}

.pet-buttons-container.six-plus-buttons {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 30px;
}

.pet-button {
  background: transparent;
  border: none;
  border-radius: 15px;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  height: auto;
  position: relative;
  overflow: visible;
}

.pet-button:hover {
  transform: scale(1.05);
}

.pet-button:active {
  transform: scale(0.95);
}

.pet-button-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 15px;
  object-fit: cover;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pet-button-word {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
  text-align: center;
  word-break: break-word;
  margin-top: 8px;
  width: 100%;
  line-height: 1.2;
  min-height: 1.5em;
}

.pet-button-icon {
  font-size: 4rem;
}

.pet-button-placeholder {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 15px;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #999;
  border: 2px dashed #ccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Fullscreen Modal */
.fullscreen-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
}

.fullscreen-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.fullscreen-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 2001;
}

.fullscreen-image-container {
  text-align: center;
  max-width: 90%;
  max-height: 80%;
}

.fullscreen-image-container img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.fullscreen-word {
  font-size: 3rem;
  font-weight: 700;
  color: white;
  margin-top: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.fullscreen-hint {
  position: absolute;
  bottom: 30px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.2rem;
}

/* Sound Controls */

/* Pet Instructions */
.pet-instructions {
  display: none;
  position: fixed;
  z-index: 1500;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
}

.instructions-content {
  background: white;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 500px;
  margin: 20px;
}

.instructions-content ol {
  text-align: left;
  margin: 20px 0;
  padding-left: 20px;
}

.instructions-content li {
  margin: 10px 0;
  font-size: 1.1rem;
}

.hide-instructions {
  background: #4ecdc4;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
}

/* Pet Status */
.pet-status {
  text-align: center;
  margin-top: 20px;
}

.status-message {
  background: rgba(255, 255, 255, 0.9);
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  display: inline-block;
}

/* Preview Modal */
.preview-modal .modal-content {
  max-width: 90%;
  max-height: 90%;
}

.preview-content {
  width: 100%;
  height: 80vh;
}

/* Responsive Design */
/* iPad and Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .pet-buttons-container {
    max-width: 95vw;
    padding: 60px 40px;
    gap: 50px;
    place-content: center;
    justify-content: center;
    align-content: center;
  }

  .pet-buttons-container.single-button {
    grid-template-columns: 300px;
    gap: 50px;
  }

  .pet-buttons-container.two-buttons {
    grid-template-columns: repeat(2, 240px);
    gap: 100px;
  }

  .pet-buttons-container.three-buttons {
    grid-template-columns: repeat(3, 200px);
    gap: 80px;
  }

  .pet-buttons-container.four-buttons {
    grid-template-columns: repeat(2, 180px);
    gap: 60px;
  }

  .pet-buttons-container.five-buttons {
    grid-template-columns: repeat(3, 150px);
    gap: 50px;
  }

  .pet-buttons-container.six-plus-buttons {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 40px;
  }

  .buttons-grid {
    max-width: 90vw;
    gap: 25px;
  }

  .buttons-grid.single-button {
    grid-template-columns: 300px;
  }

  .buttons-grid.two-buttons {
    grid-template-columns: repeat(2, 280px);
    gap: 40px;
  }
}

/* iPad Portrait */
@media (min-width: 768px) and (max-width: 768px) and (orientation: portrait) {
  .pet-buttons-container {
    max-width: 90vw;
    padding: 50px 30px;
    gap: 40px;
  }

  .pet-buttons-container.single-button {
    grid-template-columns: 280px;
  }

  .pet-buttons-container.two-buttons {
    grid-template-columns: repeat(2, 200px);
    gap: 60px;
  }

  .pet-buttons-container.three-buttons {
    grid-template-columns: repeat(3, 160px);
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .title {
    font-size: 2rem;
  }

  .home-logo {
    height: 50px;
  }

  .navigation-cards {
    grid-template-columns: 1fr;
  }

  .button-controls {
    flex-direction: column;
    gap: 10px;
  }

  .buttons-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin: 20px auto;
    max-width: 600px;
  }

  .buttons-grid.single-button {
    grid-template-columns: 200px;
  }

  .buttons-grid.two-buttons {
    grid-template-columns: repeat(2, 160px);
    gap: 15px;
  }

  .pet-main {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .pet-buttons-container {
    padding: 20px 10px;
    max-width: 100%;
    min-height: 60vh;
  }

  .pet-buttons-container.single-button {
    grid-template-columns: 200px;
    gap: 30px;
  }

  .pet-buttons-container.two-buttons {
    grid-template-columns: repeat(2, 150px);
    gap: 25px;
  }

  .pet-buttons-container.three-buttons {
    grid-template-columns: repeat(3, 120px);
    gap: 15px;
  }

  .pet-buttons-container.four-buttons {
    grid-template-columns: repeat(2, 140px);
    gap: 20px;
  }

  .pet-buttons-container.five-buttons {
    grid-template-columns: repeat(3, 110px);
    gap: 15px;
  }

  .pet-buttons-container.six-plus-buttons {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
  }

  .pet-button-placeholder {
    font-size: 2rem;
  }

  .pet-button-word {
    font-size: 0.9rem;
    margin-top: 5px;
  }

  .fullscreen-word {
    font-size: 2rem;
  }

  .modal-content {
    width: 95%;
    margin: 10px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
  }

  .welcome-card {
    padding: 20px;
  }

  .pet-buttons-container {
    grid-template-columns: 1fr 1fr;
  }

  .fullscreen-close {
    top: 20px;
    right: 20px;
  }
}

/* Accessibility */
.pet-button:focus,
.control-btn:focus,
.action-btn:focus {
  outline: 3px solid #4ecdc4;
  outline-offset: 2px;
}

/* Animation for button press feedback */
.pet-button.pressed {
  animation: buttonPress 0.3s ease;
}

@keyframes buttonPress {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

/* Loading state */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #4ecdc4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

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