:root {
  /* Coder B Palette */
  --bg-dark: #070b14;
  --bg-card: rgba(15, 23, 42, 0.6);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-orange: #f59e0b;
  --accent-orange-hover: #d97706;
  --accent-blue: #1a73e8;
  --accent-blue-hover: #3b82f6;
  --border-color: rgba(59, 130, 246, 0.2);
  --border-hover: rgba(245, 158, 11, 0.5);
  --success: #10b981;
  --error: #ef4444;
  
  /* Typography */
  --font-main: 'Inter', system-ui, sans-serif;
  --font-heading: 'Outfit', system-ui, sans-serif;
  --font-mono: 'Fira Code', monospace;
}

* { box-sizing: border-box; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: rgba(59, 130, 246, 0.3); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(59, 130, 246, 0.6); }

html, body { 
  margin: 0; 
  padding: 0; 
  color: var(--text-primary); 
  background: var(--bg-dark); 
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(26, 115, 232, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  font-family: var(--font-main); 
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Page Load Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.container { 
  max-width: 1400px; 
  margin: 0 auto; 
  padding: 2rem 1rem; 
  flex: 1;
  width: 100%;
  animation: fadeIn 0.5s ease-out forwards;
}

/* Typography */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); }
h1 { font-size: 3rem; margin-top: 0; margin-bottom: 0.5rem; font-weight: 700; letter-spacing: -0.02em; }
.subtitle { color: var(--text-secondary); font-size: 1.2rem; margin-bottom: 2rem; font-weight: 400; }

/* Header */
.site-header { 
  background: rgba(7, 11, 20, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color); 
  padding: 1rem 0; 
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}
.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.brand { 
  font-weight: 700; 
  font-size: 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
}
.brand img {
  height: 40px;
  width: auto;
}
.brand span {
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav { 
  display: flex; 
  gap: 0.5rem; 
  flex-wrap: wrap; 
  align-items: center; 
}
nav a { 
  color: var(--text-secondary); 
  text-decoration: none; 
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}
nav a:hover, nav a.active { 
  color: var(--text-primary); 
  background: rgba(245, 158, 11, 0.1);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

/* Footer */
.site-footer { 
  border-top: 1px solid var(--border-color); 
  padding: 2rem 1rem; 
  text-align: center;
  color: var(--text-secondary); 
  margin-top: auto;
  background: rgba(7, 11, 20, 0.5);
  backdrop-filter: blur(8px);
}

/* Dashboard Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.tool-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-orange));
  opacity: 0;
  transition: opacity 0.3s;
}

.tool-card:hover {
  transform: translateY(-5px) scale(1.02);
  background: var(--bg-card-hover);
  box-shadow: 0 15px 35px rgba(0,0,0,0.3), 0 0 20px rgba(26, 115, 232, 0.15);
  border-color: var(--border-hover);
}

.tool-card:hover::before { opacity: 1; }

.tool-icon {
  font-size: 2.5rem;
  color: var(--accent-orange);
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.3));
  transition: transform 0.3s;
}

.tool-card:hover .tool-icon {
  transform: scale(1.1);
}

.tool-title { font-weight: 600; font-size: 1.3rem; margin: 0; }
.tool-desc { color: var(--text-secondary); font-size: 0.95rem; margin: 0; line-height: 1.5; }

/* Tool Layouts */
.tool-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: calc(100vh - 280px);
  min-height: 500px;
}

.tool-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  background: var(--bg-card);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.split-pane {
  display: flex;
  gap: 1.5rem;
  flex: 1;
}

.split-pane > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pane-label {
  font-weight: 600;
  color: var(--accent-blue);
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Forms and Inputs */
textarea, input[type="text"], input[type="number"] {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  resize: none;
  flex: 1;
  transition: all 0.3s;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

textarea:focus, input[type="text"]:focus, input[type="number"]:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2), 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* Buttons */
.btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-main);
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(4px);
}
.btn:hover { 
  background: rgba(255, 255, 255, 0.1); 
  border-color: var(--accent-blue); 
  transform: translateY(-1px);
}
.btn:active { transform: translateY(1px); }

.btn-primary { 
  background: var(--accent-orange); 
  color: #fff; 
  border-color: var(--accent-orange); 
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}
.btn-primary:hover { 
  background: var(--accent-orange-hover); 
  border-color: var(--accent-orange-hover); 
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* Highlight / Status text */
.error-text { color: var(--error); font-size: 0.95rem; font-weight: 500; }
.success-text { color: var(--success); font-size: 0.95rem; font-weight: 500; }

/* Responsive */
@media (max-width: 900px) {
  .split-pane { flex-direction: column; }
  .tool-layout { height: auto; }
  textarea { min-height: 250px; }
}
