:root {
  --bg-dark: #090d16;
  --card-bg: rgba(18, 25, 41, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-purple: #7f53ac;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --error-red: #ff4b4b;
  --success-green: #10b981;
  --radius-lg: 16px;
  --radius-md: 10px;
}

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

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  padding: 2rem 1rem;
}

/* Background Glow Effects */
.background-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(79, 172, 254, 0.25) 0%, rgba(127, 83, 172, 0.15) 50%, rgba(0, 0, 0, 0) 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.background-grid {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* Main Container */
.app-container {
  width: 100%;
  max-width: 760px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.2);
  color: var(--accent-cyan);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.825rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(0, 242, 254, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 242, 254, 0); }
}

.header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 600px;
  margin: 0 auto;
}

/* Cards */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

/* Form */
.input-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.input-group input {
  width: 100%;
  background: rgba(10, 15, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 14px 75px 14px 44px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.input-group input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.15);
}

#pasteBtn {
  position: absolute;
  right: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
  color: #fff;
  border: none;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 172, 254, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

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

.btn-icon {
  width: 18px;
  height: 18px;
}

.btn-large {
  padding: 14px 20px;
  flex: 1;
}

.btn-download-hero {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4) !important;
  padding: 16px 24px !important;
}

.btn-download-hero:hover {
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.6) !important;
  transform: translateY(-2px);
}

/* Error Banner */
.error-banner {
  margin-top: 1rem;
  background: rgba(255, 75, 75, 0.1);
  border: 1px solid rgba(255, 75, 75, 0.3);
  color: var(--error-red);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

/* Loader */
.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  gap: 1rem;
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Result Card */
.result-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.file-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.file-icon-box {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15) 0%, rgba(127, 83, 172, 0.15) 100%);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-icon {
  width: 28px;
  height: 28px;
  color: var(--accent-cyan);
}

.file-info-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  word-break: break-all;
  margin-bottom: 4px;
}

.file-tag {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--text-muted);
}

/* Metadata Grid */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  background: rgba(10, 15, 26, 0.5);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meta-value {
  font-weight: 600;
  font-size: 0.95rem;
}

.code-font {
  font-family: monospace;
}

/* Link Section */
.link-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.link-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.link-input-group {
  display: flex;
  gap: 8px;
}

.link-input-group input {
  flex: 1;
  background: rgba(10, 15, 26, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--accent-cyan);
  font-size: 0.85rem;
  outline: none;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-action:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Stream Tester Card */
.stream-tester {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tester-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tester-header h3 {
  font-size: 0.9rem;
  font-weight: 700;
}

.status-badge {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  transition: width 0.1s linear;
}

.tester-metrics {
  display: flex;
  justify-content: space-between;
  font-size: 0.825rem;
  color: var(--text-muted);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.feature-item {
  background: rgba(18, 25, 41, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.feature-icon {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.feature-item h3 {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.feature-item p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.hidden {
  display: none !important;
}
