/* Custom styles beyond Tailwind */

/* Custom range input styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 8px;
  outline: none;
}

/* Range slider thumb styling */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0ea5e9;
  cursor: pointer;
  transition: background 0.2s;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0ea5e9;
  cursor: pointer;
  transition: background 0.2s;
}

.dark input[type="range"]::-webkit-slider-thumb {
  background: #38bdf8;
}

.dark input[type="range"]::-moz-range-thumb {
  background: #38bdf8;
}

/* Hover effect for range slider thumb */
input[type="range"]::-webkit-slider-thumb:hover {
  background: #0284c7;
}

input[type="range"]::-moz-range-thumb:hover {
  background: #0284c7;
}

.dark input[type="range"]::-webkit-slider-thumb:hover {
  background: #7dd3fc;
}

.dark input[type="range"]::-moz-range-thumb:hover {
  background: #7dd3fc;
}

/* Progress animation */
@keyframes progress {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

.animate-progress {
  animation: progress 60s ease-in-out;
  transition: width 120s cubic-bezier(0.1, 0.05, 0.5, 0.9);
}

/* Smooth transitions */
.transition-height {
  transition: max-height 0.3s ease-in-out;
}

/* Code highlighting adjustments */
pre {
  border-radius: 0.5rem;
}

code {
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
}

.dark ::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.dark ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Fade in animations */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Micro-interactions for buttons and cards */
button, 
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover:not(:disabled), 
.card:hover {
  transform: translateY(-2px);
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

.toast {
    background-color: white;
    color: #333;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    max-width: 320px;
}

.toast-icon {
    margin-right: 10px;
    font-size: 20px;
}

.toast.success .toast-icon {
    color: #10b981;
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast.info .toast-icon {
    color: #3b82f6;
}

/* Theme toggle styles */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* Processing overlay */
.processing-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
}

.processing-animation {
    border: 8px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top: 8px solid #3B82F6;
    width: 80px;
    height: 80px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.processing-text {
    font-size: 24px;
    font-weight: 500;
    text-align: center;
    max-width: 80%;
    margin-bottom: 16px;
}

.processing-note {
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    max-width: 80%;
    opacity: 0.7;
    background-color: rgba(59, 130, 246, 0.2);
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
}

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

/* Button styles */
.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

/* Dark mode support - commented out to ensure light theme only 
.dark body {
    background-color: #111827;
    color: #f9fafb;
}

.dark .bg-white {
    background-color: #1f2937;
}

.dark .text-gray-900 {
    color: #f9fafb;
}

.dark .text-gray-700 {
    color: #e5e7eb;
}

.dark .text-gray-600 {
    color: #d1d5db;
}

.dark .text-gray-500 {
    color: #9ca3af;
}

.dark .border-gray-300 {
    border-color: #4b5563;
}

.dark .bg-gray-100 {
    background-color: #374151;
}

.dark .bg-gray-50 {
    background-color: #111827;
}

.dark input, .dark textarea {
    background-color: #374151;
    color: #f9fafb;
    border-color: #4b5563;
}

.dark .theme-toggle {
    background-color: #1f2937;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dark #preview-iframe {
    background-color: white;
}
*/

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

header p {
    color: #666;
}

/* Main content layout */
.main-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
}

/* Input section */
.input-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.api-key-section,
.file-input-section,
.token-analysis-section,
.settings-section,
.prompt-section,
.content-section {
    margin-bottom: 1rem;
}

.token-analysis-section {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.token-analysis h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.token-analysis p {
    margin: 0.25rem 0;
    color: #666;
}

.token-analysis.error {
    background: #fff5f5;
    border-color: #feb2b2;
}

.token-analysis.error p {
    color: #c53030;
}

/* Settings section */
.settings-section {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
}

.settings-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.setting-group {
    margin-bottom: 1rem;
}

.setting-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
}

.setting-group input[type="number"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.setting-group input[type="range"] {
    width: 100%;
    margin: 0.5rem 0;
}

/* Output section */
.output-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-container,
.generated-html-container,
.usage-stats-container {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.preview-container h2,
.generated-html-container h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

#preview {
    min-height: 200px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

#generatedHtml {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    font-family: monospace;
    white-space: pre-wrap;
}

.usage-stats-container {
    background: #f8f9fa;
}

.usage-stats-container h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.usage-stats-container p {
    margin: 0.25rem 0;
    color: #666;
}

/* Form elements */
label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 1rem;
}

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

/* Buttons */
button {
    background: #4299e1;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: #3182ce;
}

button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
}

/* Deployment note */
.deployment-note {
    margin-top: 1rem;
    padding: 1rem;
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 4px;
}

.deployment-note p {
    margin: 0;
    color: #2c5282;
}

.deployment-note a {
    color: #4299e1;
    text-decoration: none;
}

.deployment-note a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .input-section,
    .output-section {
        padding: 1rem;
    }
}

/* Adjust the heights of the preview and HTML output sections */
#html-output, #preview-iframe {
    height: 450px; /* Decreased from 500px */
    min-height: 450px;
}

/* Fix spacing between sections */
.section-gap {
    margin-bottom: 1rem; /* Decreased from 1.5rem */
}

/* Ensure the result section has proper spacing */
#result-section {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Decreased from 1.5rem */
}

/* Steps styling for How to Use section */
.step-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Decreased from 280px */
    gap: 1rem; /* Decreased from 1.5rem */
}

/* Example section styling */
.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Decreased from 300px */
    gap: 1rem; /* Decreased from 1.5rem */
}

/* Add styles for the test mode toggle switch */
#test-mode:checked ~ .dot {
    transform: translateX(100%);
}

#test-mode:checked ~ .block {
    background-color: #0ea5e9;
}

.test-mode-active {
    background-color: #ef4444;
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

/* Add transition for smooth toggle animation */
.dot {
    transition: all 0.3s ease-in-out;
}

/* Add styles for the test mode indicator */
.test-mode-active {
    background-color: rgba(14, 165, 233, 0.1);
    border: 1px solid #0ea5e9;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: #0ea5e9;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
} 