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

:root {
  --bg-dark: #090d16;
  --bg-card: rgba(18, 25, 43, 0.65);
  --bg-card-hover: rgba(26, 36, 61, 0.8);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(168, 85, 247, 0.35);
  
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.4);
  --accent: #a855f7;
  --accent-cyan: #38bdf8;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(168, 85, 247, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.08) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

/* Header & Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 5%;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 13, 22, 0.75);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--primary-glow);
}

.brand-icon svg {
  width: 20px;
  height: 20px;
  stroke: #ffffff;
  stroke-width: 2.5;
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Buttons */
.btn {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(168, 85, 247, 0.55);
  transform: translateY(-2px);
}

.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: rotate(45deg) translate(-100%, -100%);
  transition: transform 0.6s ease;
}

.btn-glow:hover::after {
  transform: rotate(45deg) translate(100%, 100%);
}

/* Main Layout */
.main-container {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 5%;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Hero Title Section */
.hero-section {
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.8rem;
  background: linear-gradient(to right, #ffffff 30%, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Action Control Cards */
.control-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 0.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card:hover {
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon.accent {
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent);
}

.card-icon.cyan {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

/* URL Input Group */
.input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.input-url {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  transition: var(--transition);
}

.input-url:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Editor Workspace Container */
.workspace-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.25);
}

.workspace-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.workspace-actions {
  display: flex;
  gap: 0.75rem;
}

.iframe-container {
  width: 100%;
  height: 750px;
  position: relative;
  background: #1e293b;
}

.iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Modal Drawer for Cloudflare Pages Deployment */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #111827;
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 650px;
  padding: 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.25rem;
  transition: var(--transition);
}

.close-btn:hover {
  color: white;
  transform: scale(1.1);
}

.code-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: monospace;
  font-size: 0.9rem;
  color: #a855f7;
  position: relative;
  margin: 1rem 0;
  overflow-x: auto;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-main);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.copy-btn:hover {
  background: var(--primary);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 5%;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.85rem;
  }
  .control-panel {
    grid-template-columns: 1fr;
  }
  .iframe-container {
    height: 550px;
  }
}
