/**
 * Premium Glassmorphism 2.0 UI for Unicode to Preeti Converter (Studio Pro)
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Inter:wght@400;500;600&display=swap');

/* Load Preeti Legacy Font */
@font-face {
    font-family: 'Preeti';
    src: url('https://raw.githubusercontent.com/A-Team/nepali-font-collection/master/preeti.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
  --utp-primary: #4f46e5;
  --utp-primary-light: #818cf8;
  --utp-secondary: #f43f5e;
  --utp-bg: #f8fafc;
  --utp-glass-bg: rgba(255, 255, 255, 0.75);
  --utp-glass-border-light: rgba(255, 255, 255, 0.4);
  --utp-glass-border-dark: rgba(0, 0, 0, 0.05);
  --utp-text-main: #0f172a;
  --utp-text-muted: #64748b;
  --utp-radius-xl: 24px;
  --utp-radius-lg: 16px;
  --utp-layer-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08), 0 10px 20px -5px rgba(0, 0, 0, 0.1);
  --utp-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.utp-studio-container {
  max-width: 1100px;
  margin: 60px auto;
  padding: 48px;
  background: var(--utp-glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--utp-glass-border-light);
  border-radius: var(--utp-radius-xl);
  box-shadow: var(--utp-layer-shadow);
  font-family: 'Outfit', 'Inter', sans-serif;
  color: var(--utp-text-main);
  position: relative;
  overflow: visible;
}

/* Atmospheric Gradients */
.utp-studio-container::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.15), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.utp-studio-container::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.1), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.utp-studio-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--utp-glass-border-dark);
}

.utp-studio-title {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--utp-primary), #6366f1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.utp-subheader {
  margin-top: 8px;
  font-size: 1.1rem;
  color: var(--utp-text-muted);
  font-weight: 400;
}

.utp-studio-badges {
  display: flex;
  gap: 12px;
}

.utp-badge-item {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 50px;
  border: 1px solid var(--utp-glass-border-dark);
}

.utp-badge-item.accuracy {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.utp-badge-item.version {
  background: #f8fafc;
  color: var(--utp-text-muted);
}

.utp-studio-dual-view {
  display: flex;
  gap: 40px;
  align-items: stretch;
}

@media (max-width: 992px) {
  .utp-studio-dual-view {
    flex-direction: column;
  }
}

.utp-studio-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.utp-pane-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.utp-pane-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--utp-text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.utp-pane-meta {
  font-size: 0.75rem;
  color: var(--utp-text-muted);
  background: var(--utp-bg);
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 500;
}

.utp-textarea-wrapper {
  position: relative;
  border-radius: var(--utp-radius-lg);
  background: #fff;
  padding: 1px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
  transition: var(--utp-transition);
}

.utp-textarea-wrapper:focus-within {
  box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.1);
  transform: translateY(-2px);
}

.utp-studio-textarea {
  width: 100% !important;
  min-height: 320px;
  padding: 24px;
  border: 1px solid var(--utp-glass-border-dark);
  border-radius: var(--utp-radius-lg);
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem;
  line-height: 1.8;
  resize: vertical;
  background: #fff;
  transition: var(--utp-transition);
  color: var(--utp-text-main);
}

.utp-studio-textarea:focus {
  outline: none;
  border-color: var(--utp-primary-light);
}

/* Preeti Specific Output Styling */
.output-pane .utp-studio-textarea {
  background: #fafafa;
  cursor: default;
  font-family: 'Preeti', serif !important;
  font-size: 1.6rem; /* Preeti needs to be larger to be readable */
  line-height: 1.4;
  color: #1e293b;
  letter-spacing: 0.02em;
}

.utp-pane-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Buttons Styling */
.utp-btn-primary {
  background: var(--utp-primary);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--utp-transition);
  box-shadow: 0 10px 15px -3px rgba(79,70,229,0.3);
}

.utp-btn-primary:hover {
  background: #4338ca;
  transform: translateY(-3px);
  box-shadow: 0 20px 25px -5px rgba(79,70,229,0.4);
}

.utp-btn-secondary {
  background: transparent;
  color: var(--utp-text-muted);
  border: 1.5px solid var(--utp-glass-border-dark);
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--utp-transition);
}

.utp-btn-secondary:hover {
  background: #fff;
  color: var(--utp-secondary);
  border-color: #fca5a5;
  transform: translateY(-2px);
}

/* Visual Divider */
.utp-studio-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.utp-divider-line {
  width: 1px;
  flex: 1;
  background: linear-gradient(to bottom, transparent, var(--utp-glass-border-dark), transparent);
}

.utp-action-circle {
  width: 56px;
  height: 56px;
  background: #fff;
  border: 1px solid var(--utp-glass-border-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--utp-primary);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}

@media (max-width: 992px) {
  .utp-studio-divider {
    flex-direction: row;
    padding: 24px 0;
  }
  .utp-divider-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--utp-glass-border-dark), transparent);
  }
  .utp-action-circle {
    transform: rotate(90deg);
  }
}

/* Toast System 2.0 */
.utp-studio-status {
  position: fixed;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  padding: 16px 32px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  display: none;
  z-index: 10000;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

.utp-studio-status.success { border-bottom: 4px solid #10b981; }
.utp-studio-status.error { border-bottom: 4px solid #f43f5e; }
.utp-studio-status.warning { border-bottom: 4px solid #f59e0b; }
