/* GLOBAL RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Inter, sans-serif;
}

body {
  background: #000;
  color: #fff;
  display: flex;
  justify-content: center;
  padding: 20px;
}

.app {
  width: 100%;
  max-width: 1200px;
}

/* HEADER */
.header {
  text-align: center;
  margin-bottom: 25px;
}

.logo {
  font-size: 32px;
  font-weight: 800;
  color: #ff0050;
}

.tagline {
  font-size: 16px;
  color: #00f2ea;
  margin-top: 5px;
}

/* MAIN LAYOUT */
.main {
  display: flex;
  gap: 25px;
  align-items: flex-start;
}

/* LEFT PANEL */
.left-panel {
  width: 35%;
  background: #111;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #222;
}

.panel-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #fff;
}

.field {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
}

.field-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #ddd;
}

textarea,
select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #333;
  font-size: 14px;
  background: #0d0d0d;
  color: #fff;
}

textarea {
  height: 120px;
  resize: none;
}

.primary-btn {
  width: 100%;
  padding: 12px;
  background: #ff0050;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.primary-btn:hover {
  background: #e60048;
}

/* RIGHT PANEL */
.right-panel {
  width: 65%;
  background: #111;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #222;

  /* FIX: allow infinite story growth */
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* SCRIPT CONTAINER */
.scripts-container {
  margin-top: 15px;
}

.placeholder {
  color: #888;
  font-size: 14px;
}

/* SCRIPT CARD */
.script-card {
  background: #0d0d0d;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  border: 1px solid #222;

  /* FIX: prevent clipping */
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.script-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.script-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.script-meta {
  font-size: 13px;
  color: #aaa;
}

/* SCRIPT BODY — THE IMPORTANT PART */
.script-body {
  white-space: pre-wrap;
  font-size: 14px;
  margin-bottom: 12px;
  color: #eee;

  /* FIX: allow unlimited text */
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  display: block !important;
}

/* SCRIPT ACTIONS */
.script-actions {
  display: flex;
  justify-content: flex-end;
}

.copy-btn {
  padding: 8px 14px;
  background: #00f2ea;
  color: #000;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s ease;
}

.copy-btn:hover {
  background: #00d8d1;
}

/* FOOTER */
.footer {
  margin-top: 25px;
}

.footer-inner {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* ADSENSE BOX */
.ad-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.ad-box {
  width: 100%;
  max-width: 100%;
  height: 90px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0d0d0d;
  border-radius: 8px;
  border: 1px solid #222;
}

/* LOADING SPINNER */
.loading-spinner {
  width: 38px;
  height: 38px;
  border: 4px solid rgba(255,255,255,0.15);
  border-top-color: #ff0050;
  border-right-color: #00f2ea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
