/* Emoji Kitchen Styles */
.emoji-display {
    min-height: 60px;
    border: 2px dashed #ddd;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    font-size: 2rem;
    transition: all 0.3s ease;
}

/* Selected Emoji Container */
.selected-emoji-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 10px;
    animation: emojiSelect 0.5s ease-in-out;
}

.selected-emoji-text {
    font-size: 2.5rem;
    margin-right: 10px;
}

.copy-emoji-btn {
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-emoji-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

.copy-emoji-btn.copied {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.copy-emoji-btn.copied::after {
    content: " ✓";
    font-weight: bold;
}

.emoji-display:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.emoji-display.has-emoji {
    border-color: #28a745;
    background: #d4edda;
}

.emoji-result-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    max-width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border: 3px solid #007bff;
    border-radius: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.emoji-result-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.emoji-result {
    max-width: 100%;
    max-height: 180px;
    width: auto;
    height: auto;
    border-radius: 18px;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    animation: emojiFloat 3s ease-in-out infinite;
}

@keyframes emojiFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.emoji-item:hover {
    border-color: #007bff;
    background: #e3f2fd;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.emoji-item.selected {
    border-color: #28a745;
    background: #d4edda;
    transform: scale(1.1);
}

.popular-combination {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.popular-combination:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,123,255,0.2);
}

.popular-combination .emoji-pair {
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: bold;
}

.popular-combination .combination-name {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 5px;
}

.popular-combination .combination-desc {
    font-size: 0.8rem;
    color: #adb5bd;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

.emoji-category {
    margin-bottom: 20px;
}

.emoji-category h6 {
    color: #495057;
    margin-bottom: 10px;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 5px;
}

.emoji-search-results {
    margin-top: 15px;
}

.no-results {
    text-align: center;
    color: #6c757d;
    padding: 20px;
}

.no-results i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 10px;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .selected-emoji-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .selected-emoji-text {
        font-size: 2rem;
        margin-right: 0;
    }
    
    .copy-emoji-btn {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .emoji-result {
        max-height: 150px;
    }
    
    .emoji-grid {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
        gap: 6px;
    }
    
    .emoji-item {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
    
    .popular-combination .emoji-pair {
        font-size: 1.3rem;
    }
    
    .popular-combination {
        padding: 12px;
    }
    
    .popular-combination .combination-name {
        font-size: 0.8rem;
    }
    
    .popular-combination .combination-desc {
        font-size: 0.7rem;
    }
    
    #popularCombinations {
        margin-top: 20px;
    }
    
    #popularCombinations .row {
        margin: 0 -5px;
    }
}

@media (max-width: 576px) {
    .selected-emoji-container {
        padding: 8px;
    }
    
    .selected-emoji-text {
        font-size: 1.8rem;
    }
    
    .copy-emoji-btn {
        font-size: 0.6rem;
        padding: 3px 6px;
    }
    
    .emoji-result {
        max-height: 120px;
    }
    
    .emoji-grid {
        grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
        gap: 4px;
        max-height: 250px;
    }
    
    .emoji-item {
        width: 30px;
        height: 30px;
        font-size: 1.1rem;
    }
    
    .popular-combination {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .popular-combination .emoji-pair {
        font-size: 1.2rem;
    }
    
    .popular-combination .combination-name {
        font-size: 0.7rem;
    }
    
    .popular-combination .combination-desc {
        font-size: 0.6rem;
    }
    
    #popularCombinations {
        margin-top: 15px;
    }
    
    #popularCombinations .row {
        margin: 0 -3px;
    }
    
    .popular-combination {
        margin: 0 3px 10px 3px;
    }
    
    .emoji-result-container {
        min-height: 150px;
        margin: 15px 0;
    }
    
    .emoji-result {
        max-height: 100px;
    }
}

.emoji-selection-animation {
    animation: emojiSelect 0.5s ease-in-out;
}

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

.generation-success {
    animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.emoji-tooltip {
    position: relative;
    display: inline-block;
}

.emoji-tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
}

.emoji-tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Custom scrollbar for emoji grid */
.emoji-grid::-webkit-scrollbar {
    width: 6px;
}

.emoji-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.emoji-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.emoji-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Modal improvements */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show, .modal.fade.show {
    display: block;
}

.modal-dialog {
    max-width: 600px;
} 

/* Emoji Kitchen Custom Styles */

.emoji-kitchen-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 2rem 0;
}

.emoji-kitchen-page .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Card animations */
.emoji-kitchen-page .card {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.emoji-kitchen-page .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Ensure equal height for main sections */
.emoji-kitchen-page .space-y-8 > div:first-child {
  min-height: 700px;
  display: flex;
  flex-direction: column;
}

.emoji-kitchen-page .space-y-8 > div:last-child {
  min-height: 700px;
  display: flex;
  flex-direction: column;
}

/* Make both cards have equal height */
.emoji-kitchen-page .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.emoji-kitchen-page .card .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Emoji picker modal improvements */
.emoji-picker-modal {
  backdrop-filter: blur(10px);
}

.emoji-picker-grid {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 #f7fafc;
}

.emoji-picker-grid::-webkit-scrollbar {
  width: 8px;
}

.emoji-picker-grid::-webkit-scrollbar-track {
  background: #f7fafc;
  border-radius: 4px;
}

.emoji-picker-grid::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 4px;
}

.emoji-picker-grid::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

/* Emoji button hover effects */
.emoji-button {
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.emoji-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.emoji-button:hover::before {
  width: 100%;
  height: 100%;
}

/* Result image container */
.result-container {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}

.result-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s ease;
}

.result-container:hover::before {
  left: 100%;
}

/* Action buttons */
.action-button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.action-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.action-button:hover::before {
  left: 100%;
}

/* Popular combinations grid */
.popular-grid {
  display: grid;
  gap: 1rem;
}

.popular-item {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
}

.popular-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.popular-item:hover::before {
  opacity: 1;
}

/* Fix button display issues on PC */
.popular-item .action-button {
  flex-shrink: 0;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.popular-item .action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Ensure text doesn't overflow */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Loading animation */
.loading-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Pulse animation for success */
.pulse-success {
  animation: pulse-success 0.6s ease-in-out;
}

@keyframes pulse-success {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Floating animation for icons */
.floating-icon {
  animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Gradient text animation */
.gradient-text {
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
  background-size: 400% 400%;
  animation: gradient-shift 3s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .emoji-kitchen-page {
    padding: 1rem 0;
  }
  
  .emoji-picker-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
  }
  
  .popular-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .action-button {
    width: 100%;
  }
  
  .popular-item {
    min-height: 160px;
  }
  
  .popular-item .action-button {
    font-size: 11px;
    padding: 4px 8px;
    min-height: 28px;
  }
  
  /* Ensure equal height on mobile */
  .emoji-kitchen-page .space-y-8 > div:first-child,
  .emoji-kitchen-page .space-y-8 > div:last-child {
    min-height: auto;
  }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
  .popular-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .popular-item {
    min-height: 170px;
  }
  
  .popular-item .action-button {
    font-size: 11px;
    padding: 6px 12px;
    min-height: 30px;
  }
  
  /* Ensure equal height on tablet */
  .emoji-kitchen-page .space-y-8 > div:first-child,
  .emoji-kitchen-page .space-y-8 > div:last-child {
    min-height: 600px;
  }
}

/* Desktop enhancements */
@media (min-width: 1025px) {
  .emoji-kitchen-page .card {
    margin: 0 auto;
    max-width: 1000px;
  }
  
  .popular-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  
  .popular-item {
    min-height: 180px;
  }
  
  .popular-item .action-button {
    font-size: 12px;
    padding: 8px 16px;
    min-height: 32px;
  }
  
  /* Ensure equal height on desktop */
  .emoji-kitchen-page .space-y-8 > div:first-child,
  .emoji-kitchen-page .space-y-8 > div:last-child {
    min-height: 700px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .emoji-kitchen-page {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  }
  
  .emoji-kitchen-page .card {
    background: rgba(45, 55, 72, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .emoji-button,
  .popular-item,
  .action-button,
  .floating-icon {
    animation: none;
    transition: none;
  }
}

/* Focus styles for keyboard navigation */
.emoji-button:focus,
.action-button:focus,
.popular-item:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .emoji-kitchen-page .card {
    border: 2px solid #000;
  }
  
  .action-button {
    border: 2px solid #000;
  }
} 