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

:root {
  --primary: #FF7800;
  --primary-dark: #CC6000;
  --primary-light: #FFB366;
  --accent: #FF4500;
  --bg-dark: #0a0a0a;
  --bg-card: #1a1a1a;
  --bg-input: #151515;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --border: #2a2a2a;
  --border-hover: #FF7800;
  --glow: rgba(255, 120, 0, 0.4);
  --success: #4ade80;
  --warning: #fbbf24;
  --danger: #f87171;
  --crow-accent: #6366f1;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(to bottom, #0a1628 0%, #0a0c0f 40%, #000000 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 20%, rgba(41, 128, 185, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255, 120, 0, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(21, 23, 26, 0.3) 0%, transparent 50%);
  z-index: 0;
  animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.scan-line {
  position: fixed;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--primary), transparent);
  animation: scan 8s linear infinite;
  z-index: 1;
  opacity: 0.15;
}

@keyframes scan {
  0% { top: 0; }
  100% { top: 100%; }
}

.container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 50px;
}

.logo {
  font-family: 'Orbitron', monospace;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
  animation: titleGlow 4s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% { text-shadow: 0 0 30px rgba(255, 255, 255, 0.1); }
  50% { text-shadow: 0 0 40px rgba(255, 255, 255, 0.2), 0 0 20px rgba(255, 120, 0, 0.3); }
}

.logo-plus {
  color: var(--primary);
  text-shadow: 0 0 20px var(--glow);
}

.tagline {
  font-family: 'Orbitron', monospace;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 30px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.neon-btn {
  font-family: 'Orbitron', monospace;
  padding: 12px 24px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  cursor: pointer;
}

.neon-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 120, 0, 0.3), transparent);
  transition: left 0.5s;
}

.neon-btn:hover::before { left: 100%; }

.neon-btn:hover {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Calculator Section */
.calc-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(15, 15, 15, 0.95));
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 40px;
  margin-bottom: 40px;
  position: relative;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: all 0.3s;
}

.calc-wrapper::before {
  content: '> CALC.EXE';
  position: absolute;
  top: 12px;
  left: 24px;
  font-family: 'Orbitron', monospace;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.5;
  font-size: 0.75rem;
  font-weight: 700;
}

.calc-wrapper::after {
  content: '//';
  position: absolute;
  top: 10px;
  right: 20px;
  font-family: 'Orbitron', monospace;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.4;
  font-size: 1.5rem;
  font-weight: 700;
}

.calc-wrapper:hover {
  border-color: var(--primary);
  box-shadow: 0 0 40px rgba(255, 120, 0, 0.2), 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Category Tabs */
.category-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 32px;
}

.category-tab {
  font-family: 'Orbitron', monospace;
  padding: 12px 10px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, rgba(255, 120, 0, 0.1), rgba(255, 69, 0, 0.08));
  border: 2px solid rgba(255, 120, 0, 0.3);
  color: var(--primary-light);
  cursor: pointer;
  transition: all 0.3s;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.category-tab:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.category-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--bg-dark);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow);
  transform: translateY(-2px) scale(1.02);
}

/* Crow Tab Special Styling */
.category-tab.crow-tab {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

.category-tab.crow-tab:hover {
  border-color: #818cf8;
  color: #c7d2fe;
}

.category-tab.crow-tab.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border-color: #8b5cf6;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

/* Input Section */
.input-section h3 {
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}

.section-description {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 20px;
  opacity: 0.8;
}

.input-group {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.input-field {
  flex: 1;
  min-width: 180px;
  position: relative;
}

.input-field.full-width {
  min-width: 100%;
}

.input-field label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.input-field input,
.input-field select {
  width: 100%;
  background: var(--bg-input);
  border: 2px solid var(--border);
  color: var(--primary);
  font-family: 'Inter', sans-serif;
  padding: 12px 16px;
  font-size: 1rem;
  transition: all 0.3s;
  border-radius: 4px;
  font-weight: 600;
}

.input-field input:focus,
.input-field select:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 120, 0, 0.05);
  box-shadow: 0 0 20px rgba(255, 120, 0, 0.3);
}

#inputValue {
  font-size: 1.8rem;
  text-align: center;
  font-weight: 700;
}

.unit-label {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  pointer-events: none;
}

/* FDM, Soap, Fragrance & Crow Grid */
.fdm-grid,
.soap-settings,
.fragrance-grid,
.crow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.fdm-grid .input-field input,
.fdm-grid .input-field select,
.soap-settings .input-field input,
.soap-settings .input-field select,
.fragrance-grid .input-field input,
.fragrance-grid .input-field select,
.crow-grid .input-field input,
.crow-grid .input-field select {
  font-size: 1rem;
  text-align: left;
  padding-right: 45px;
}

/* Soap Calculator Specific */
.soap-controls {
  margin-bottom: 24px;
}

.oil-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.oil-list-header h4 {
  font-family: 'Orbitron', monospace;
  font-size: 0.9rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.add-oil-btn {
  font-family: 'Orbitron', monospace;
  padding: 8px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s;
}

.add-oil-btn:hover {
  box-shadow: 0 0 15px var(--glow);
  transform: translateY(-2px);
}

.oils-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.oil-row {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 12px;
  align-items: center;
}

.oil-select {
  background: var(--bg-input);
  border: 2px solid var(--border);
  color: var(--primary);
  padding: 10px 12px;
  font-size: 0.9rem;
  border-radius: 4px;
  font-weight: 600;
}

.oil-amount {
  background: var(--bg-input);
  border: 2px solid var(--border);
  color: var(--primary);
  padding: 10px 12px;
  font-size: 1rem;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
}

.remove-oil-btn {
  width: 36px;
  height: 36px;
  background: rgba(248, 113, 113, 0.2);
  border: 2px solid rgba(248, 113, 113, 0.5);
  color: #f87171;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-oil-btn:hover {
  background: rgba(248, 113, 113, 0.4);
  border-color: #f87171;
}

.recipe-name-field {
  margin-top: 20px;
}

.recipe-name-field .input-field {
  min-width: 100%;
}

/* Fragrance Details */
.fragrance-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

/* Crow Peanut Info Box */
.crow-peanut-info {
  margin-top: 20px;
}

.peanut-fact-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
  border: 2px solid rgba(99, 102, 241, 0.4);
  border-left: 4px solid #6366f1;
  padding: 20px;
  border-radius: 8px;
}

.peanut-fact-box h4 {
  font-family: 'Orbitron', monospace;
  font-size: 0.9rem;
  color: #a5b4fc;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.peanut-fact-box p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 8px;
}

.peanut-fact-box p:last-child {
  margin-bottom: 0;
}

.peanut-fact-box strong {
  color: #c7d2fe;
}

/* Results Section */
.results-section {
  margin-top: 32px;
  padding: 28px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(10, 10, 10, 0.4));
  border: 2px solid var(--border);
  border-radius: 6px;
  min-height: 200px;
  position: relative;
  overflow: hidden;
}

.results-section h3 {
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-light), var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  position: relative;
  z-index: 1;
}

.result-card {
  background: linear-gradient(135deg, rgba(255, 120, 0, 0.08), rgba(255, 69, 0, 0.06));
  border: 1px solid rgba(255, 120, 0, 0.3);
  padding: 16px;
  transition: all 0.3s;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.result-card:hover {
  background: linear-gradient(135deg, rgba(255, 120, 0, 0.15), rgba(255, 69, 0, 0.12));
  border-color: var(--primary);
  box-shadow: 0 0 25px rgba(255, 120, 0, 0.4);
  transform: translateY(-4px) scale(1.02);
}

/* Crow Fact Card Styling */
.crow-fact-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.crow-fact-card:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(139, 92, 246, 0.15));
  border-color: #818cf8;
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.4);
}

.crow-fact-card .result-label {
  color: #a5b4fc;
}

.crow-fact-text {
  color: var(--text-primary);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 8px;
}

.result-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.result-value {
  font-family: 'Orbitron', monospace;
  font-size: 1.4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-light), var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  word-break: break-word;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 10px rgba(255, 120, 0, 0.3));
  line-height: 1.2;
}

.result-unit {
  font-size: 0.65rem;
  color: var(--primary-light);
  margin-left: 2px;
  font-weight: 600;
  opacity: 0.8;
}

.result-info {
  font-size: 0.6rem;
  color: var(--text-secondary);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 120, 0, 0.2);
  line-height: 1.4;
  font-style: italic;
  opacity: 0.8;
  position: relative;
  z-index: 1;
}

/* Category Headers */
.result-category-header {
  grid-column: 1 / -1;
  font-family: 'Orbitron', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(255, 120, 0, 0.15), rgba(255, 69, 0, 0.1));
  border: 1px solid rgba(255, 120, 0, 0.3);
  border-left: 3px solid var(--primary);
  padding: 10px 14px;
  margin-top: 14px;
  margin-bottom: 6px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.result-category-header:first-child {
  margin-top: 0;
}

/* Info Section */
.fdm-info-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid rgba(255, 120, 0, 0.3);
}

.crow-info-section {
  border-top-color: rgba(99, 102, 241, 0.3);
}

.info-card {
  background: linear-gradient(135deg, rgba(255, 120, 0, 0.08), rgba(255, 69, 0, 0.05));
  border: 1px solid rgba(255, 120, 0, 0.3);
  padding: 14px;
  border-radius: 4px;
  transition: all 0.3s;
}

.info-card:hover {
  background: linear-gradient(135deg, rgba(255, 120, 0, 0.12), rgba(255, 69, 0, 0.08));
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(255, 120, 0, 0.3);
}

.info-card.warning-card {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.05));
  border-color: rgba(251, 191, 36, 0.4);
}

.crow-info-section .info-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.08));
  border-color: rgba(99, 102, 241, 0.3);
}

.crow-info-section .info-card:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.12));
  border-color: #818cf8;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.crow-info-section .info-card h4 {
  color: #a5b4fc;
}

.crow-info-section .info-card a {
  color: #818cf8 !important;
}

.crow-info-section .info-card a:hover {
  color: #c7d2fe !important;
}

.info-card h4 {
  font-family: 'Orbitron', monospace;
  font-size: 0.8rem;
  color: var(--primary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.info-card p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
}

.info-card p:last-child {
  margin-bottom: 0;
}

.info-card strong {
  color: var(--primary-light);
  font-weight: 700;
}

.empty-state {
  text-align: center;
  color: var(--text-secondary);
  padding: 50px;
  font-size: 1rem;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.6;
}

/* Print Button */
.print-button-container {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 120, 0, 0.2);
}

.print-button {
  font-family: 'Orbitron', monospace;
  padding: 14px 32px;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, rgba(255, 120, 0, 0.15), rgba(255, 69, 0, 0.1));
  border: 2px solid rgba(255, 120, 0, 0.4);
  color: var(--primary);
  cursor: pointer;
  transition: all 0.3s;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  position: relative;
  overflow: hidden;
}

.print-button:hover {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: var(--accent);
  box-shadow: 0 0 25px rgba(255, 120, 0, 0.6);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Ad Placeholder */
.ad-placeholder {
  text-align: center;
  margin: 40px auto;
  max-width: 728px;
  min-height: 90px;
  background: linear-gradient(135deg, rgba(255, 120, 0, 0.05), rgba(255, 69, 0, 0.03));
  border: 1px dashed rgba(255, 120, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-radius: 4px;
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  margin-top: 60px;
  color: var(--text-secondary);
}

footer a {
  text-decoration: none;
  transition: all 0.3s;
}

.footer-mal {
  color: #ffffff;
  font-weight: 700;
}

.footer-plus {
  color: var(--primary);
  font-weight: 700;
  text-shadow: 0 0 10px var(--glow);
}

footer a:hover .footer-mal {
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

footer a:hover .footer-plus {
  text-shadow: 0 0 20px var(--glow);
}

/* Responsive */
@media (max-width: 768px) {
  .calc-wrapper {
    padding: 28px 20px;
  }
  
  .input-group {
    flex-direction: column;
  }
  
  .result-grid {
    grid-template-columns: 1fr;
  }
  
  .category-tabs {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  
  .category-tab {
    padding: 10px 8px;
    font-size: 0.55rem;
  }
  
  .fdm-info-section {
    grid-template-columns: 1fr;
  }
  
  .oil-row {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  
  .oil-select {
    grid-column: 1 / -1;
  }
  
  .fragrance-details {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  body {
    background: white !important;
    color: black !important;
    font-size: 10pt;
    margin: 0;
    padding: 0;
  }

  /* Hide non-printable elements */
  .no-print,
  .bg-gradient,
  .scan-line,
  header,
  .category-tabs,
  #basicCalcInputs,
  #standardInputs,
  #fdmInputs,
  #soapInputs,
  #fragranceInputs,
  #crowInputs,
  #electricInputs,
  #colorInputs,
  #dndInputs,
  .ad-placeholder,
  .donation-section,
  footer,
  .calc-wrapper::before,
  .calc-wrapper::after,
  .print-button-container,
  .css-copy-btn,
  .copy-notification {
    display: none !important;
  }

  .container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  .calc-wrapper {
    background: white !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  .results-section {
    background: white !important;
    border: none !important;
    min-height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  .results-section h3 {
    display: none !important;
  }

  /* Print Header */
  .results-section::before {
    content: 'CALC.MAL+ - ' attr(data-category);
    display: block !important;
    font-family: Arial, sans-serif;
    font-size: 16pt;
    font-weight: bold;
    color: #FF7800 !important;
    background: none !important;
    -webkit-text-fill-color: #FF7800 !important;
    text-align: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 3px solid #FF7800;
  }

  /* Input Summary */
  .results-section::after {
    display: block !important;
    font-family: Arial, sans-serif;
    font-size: 9pt;
    color: #333 !important;
    text-align: left;
    margin-bottom: 12px;
    padding: 10px;
    background: #f5f5f5 !important;
    border: 1px solid #ddd;
    border-radius: 4px;
    line-height: 1.4;
  }
  
  .results-section[data-input-value][data-input-unit]:not([data-fdm-inputs]):not([data-soap-inputs]):not([data-frag-inputs]):not([data-crow-inputs])::after {
    content: 'Converting: ' attr(data-input-value) ' ' attr(data-input-unit);
  }

  .results-section[data-fdm-inputs]::after {
    content: 'FDM Settings: ' attr(data-fdm-inputs);
  }
  
  .results-section[data-soap-inputs]::after {
    content: attr(data-soap-inputs);
  }
  
  .results-section[data-frag-inputs]::after {
    content: attr(data-frag-inputs);
  }
  
  .results-section[data-crow-inputs]::after {
    content: attr(data-crow-inputs);
  }

  /* Hide input summary for categories that don't need it */
  .results-section[data-category="COLOR CONVERTER"]::after,
  .results-section[data-category="BASIC CALCULATOR"]::after,
  .results-section[data-category="D&D DICE ROLLER"]::after {
    display: none !important;
  }

  .result-grid {
    gap: 8px !important;
    grid-template-columns: repeat(4, 1fr) !important;
  }

  .result-card,
  .crow-fact-card {
    background: #fafafa !important;
    border: 1px solid #ddd !important;
    padding: 8px !important;
    border-radius: 3px !important;
    page-break-inside: avoid;
  }

  .result-card::before,
  .result-card::after {
    display: none !important;
  }

  .result-label {
    color: #555 !important;
    font-size: 7pt !important;
    margin-bottom: 3px !important;
  }

  .result-value {
    color: #FF7800 !important;
    background: none !important;
    -webkit-text-fill-color: #FF7800 !important;
    filter: none !important;
    font-size: 11pt !important;
    font-weight: bold !important;
  }

  .result-unit {
    color: #FF7800 !important;
    font-size: 7pt !important;
  }

  .result-info {
    color: #666 !important;
    font-size: 6pt !important;
    border-top: 1px solid #eee !important;
    padding-top: 4px !important;
    margin-top: 4px !important;
  }
  
  .crow-fact-text {
    color: #333 !important;
    font-size: 8pt !important;
  }

  .result-category-header {
    background: #f0f0f0 !important;
    border: 1px solid #ddd !important;
    border-left: 3px solid #FF7800 !important;
    color: #FF7800 !important;
    font-size: 9pt !important;
    padding: 6px 10px !important;
    margin-top: 10px !important;
    margin-bottom: 6px !important;
    clip-path: none !important;
    border-radius: 3px !important;
    page-break-after: avoid;
  }

  .result-category-header:first-child {
    margin-top: 0 !important;
  }

  /* Info sections */
  .fdm-info-section,
  .crow-info-section {
    margin-top: 12px !important;
    padding-top: 10px !important;
    border-top: 2px solid #ddd !important;
    gap: 8px !important;
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .info-card {
    background: #f9f9f9 !important;
    border: 1px solid #ddd !important;
    padding: 8px !important;
    border-radius: 3px !important;
    page-break-inside: avoid;
  }

  .info-card h4 {
    color: #FF7800 !important;
    font-size: 8pt !important;
    margin-bottom: 5px !important;
  }

  .info-card p {
    color: #333 !important;
    font-size: 7pt !important;
    margin-bottom: 4px !important;
  }

  .info-card strong {
    color: #000 !important;
  }
  
  .info-card a {
    color: #0066cc !important;
    text-decoration: underline !important;
  }

  /* ===== COLOR CONVERTER PRINT STYLES ===== */
  
  /* CSS Code Cards - simplified for print */
  .css-code-card {
    background: #fafafa !important;
    border: 1px solid #ddd !important;
    margin-bottom: 8px !important;
    page-break-inside: avoid;
  }
  
  .css-code-header {
    background: #f0f0f0 !important;
    border-bottom: 1px solid #ddd !important;
    padding: 6px 10px !important;
  }
  
  .css-code-title {
    color: #FF7800 !important;
    font-size: 8pt !important;
  }
  
  .css-code-block {
    color: #333 !important;
    font-size: 7pt !important;
    padding: 8px 10px !important;
    background: white !important;
    line-height: 1.4 !important;
  }
  
  /* Color Palette print styles */
  .color-palette-container {
    margin-bottom: 12px !important;
  }
  
  .color-palette-row {
    background: #fafafa !important;
    border: 1px solid #ddd !important;
    padding: 10px !important;
    margin-bottom: 8px !important;
    page-break-inside: avoid;
  }
  
  .palette-name {
    color: #FF7800 !important;
    font-size: 8pt !important;
    margin-bottom: 8px !important;
  }
  
  .palette-colors {
    gap: 10px !important;
  }
  
  .palette-swatch {
    text-align: center;
  }
  
  .swatch-color {
    width: 40px !important;
    height: 40px !important;
    border: 1px solid #999 !important;
    margin-bottom: 4px !important;
    box-shadow: none !important;
    border-radius: 4px !important;
  }
  
  .swatch-hex {
    color: #333 !important;
    font-size: 6pt !important;
  }
  
  .swatch-label {
    color: #666 !important;
    font-size: 5pt !important;
  }
  
  /* Color format cards */
  .color-format-card {
    cursor: default !important;
  }

  /* Icons - hide in print */
  .tab-icon,
  .section-icon,
  .inline-icon,
  .btn-icon,
  .copy-icon {
    display: none !important;
  }

  @page {
    size: letter portrait;
    margin: 0.4in;
  }
}

/* ============================================
   LUCIDE ICONS
   ============================================ */

.tab-icon,
.section-icon,
.inline-icon,
.btn-icon {
  width: 1em;
  height: 1em;
  stroke-width: 2;
  vertical-align: -0.125em;
  display: inline-block;
}

.tab-icon {
  width: 1.1em;
  height: 1.1em;
  margin-right: 0.25em;
  opacity: 0.9;
}

.section-icon {
  width: 1.2em;
  height: 1.2em;
  margin-right: 0.4em;
  opacity: 0.85;
}

.inline-icon {
  width: 1em;
  height: 1em;
  margin-right: 0.3em;
  opacity: 0.8;
}

.btn-icon {
  width: 1.1em;
  height: 1.1em;
  margin-right: 0.4em;
}

/* Icon colors for crow section */
.crow-tab .tab-icon,
.crow-info-section .inline-icon,
.crow-fact-card .inline-icon {
  color: currentColor;
}

/* Category header icons */
.result-category-header .inline-icon {
  width: 1.1em;
  height: 1.1em;
  margin-right: 0.4em;
  opacity: 0.9;
}

/* Info card header icons */
.info-card h4 .inline-icon {
  width: 1em;
  height: 1em;
  margin-right: 0.35em;
  opacity: 0.85;
}

/* Warning card icons */
.warning-card .inline-icon {
  color: #f59e0b;
}

/* Print icon visibility */
@media print {
  .tab-icon,
  .section-icon,
  .inline-icon,
  .btn-icon {
    display: none !important;
  }
}

/* ============================================
   BASIC CALCULATOR
   ============================================ */

.basic-calc-container {
  max-width: 400px;
  margin: 0 auto;
}

.calc-display {
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.calc-history {
  font-family: 'Orbitron', monospace;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: right;
  min-height: 1.2em;
  margin-bottom: 4px;
  opacity: 0.7;
}

.calc-display-input {
  width: 100%;
  background: transparent;
  border: none;
  font-family: 'Orbitron', monospace;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  text-align: right;
  outline: none;
  padding: 0;
}

.calc-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.calc-btn {
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 18px;
  border: 2px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calc-btn:hover {
  transform: translateY(-2px);
}

.calc-btn:active {
  transform: translateY(0);
}

.calc-btn-number {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  color: var(--text-primary);
}

.calc-btn-number:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
  border-color: var(--text-secondary);
}

.calc-btn-operator {
  background: linear-gradient(135deg, rgba(255, 120, 0, 0.2), rgba(255, 69, 0, 0.15));
  color: var(--primary);
  border-color: rgba(255, 120, 0, 0.4);
}

.calc-btn-operator:hover {
  background: linear-gradient(135deg, rgba(255, 120, 0, 0.35), rgba(255, 69, 0, 0.25));
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(255, 120, 0, 0.3);
}

.calc-btn-function {
  background: linear-gradient(135deg, rgba(100, 100, 100, 0.15), rgba(80, 80, 80, 0.1));
  color: var(--text-secondary);
  font-size: 1rem;
}

.calc-btn-function:hover {
  background: linear-gradient(135deg, rgba(100, 100, 100, 0.25), rgba(80, 80, 80, 0.18));
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.calc-btn-equals {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--bg-dark);
  border-color: var(--accent);
}

.calc-btn-equals:hover {
  box-shadow: 0 0 20px var(--glow);
  border-color: var(--primary-light);
}

.calc-icon {
  width: 1.2em;
  height: 1.2em;
  stroke-width: 2.5;
}

/* Responsive calculator */
@media (max-width: 500px) {
  .calc-display-input {
    font-size: 2rem;
  }
  
  .calc-btn {
    padding: 14px;
    font-size: 1rem;
  }
  
  .calc-btn-function {
    font-size: 0.85rem;
  }
}

/* ============================================
   ELECTRIC CALCULATOR
   ============================================ */

.electric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.electric-info-box {
  background: linear-gradient(135deg, rgba(255, 120, 0, 0.1), rgba(255, 69, 0, 0.08));
  border: 2px solid rgba(255, 120, 0, 0.3);
  border-left: 4px solid var(--primary);
  padding: 20px;
  border-radius: 8px;
  margin-top: 20px;
}

.electric-info-box h4 {
  font-family: 'Orbitron', monospace;
  font-size: 0.9rem;
  color: var(--primary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.electric-info-box p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 8px;
  font-family: 'Consolas', 'Monaco', monospace;
}

.electric-info-box p:last-child {
  margin-bottom: 0;
}

.electric-info-box strong {
  color: var(--primary-light);
}

/* ============================================
   COLOR CONVERTER
   ============================================ */

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.color-picker-input {
  width: 100%;
  height: 44px;
  padding: 2px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--bg-input);
  cursor: pointer;
  transition: all 0.3s;
}

.color-picker-input:hover {
  border-color: var(--primary);
}

.color-picker-input::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.color-picker-input::-webkit-color-swatch {
  border: none;
  border-radius: 2px;
}

.color-preview-container {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 120, 0, 0.1), rgba(255, 69, 0, 0.08));
  border: 2px solid rgba(255, 120, 0, 0.3);
  border-radius: 8px;
  margin-top: 20px;
}

.color-preview {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  border: 3px solid var(--border);
  background-color: #FF7800;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.color-preview-info {
  flex: 1;
}

.color-preview-info p {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  border-left: 3px solid var(--primary);
}

.color-preview-info p:last-child {
  margin-bottom: 0;
}

/* CSS Code Cards */
.css-code-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(20, 20, 20, 0.3));
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.css-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 120, 0, 0.1);
  border-bottom: 1px solid var(--border);
}

.css-code-title {
  font-family: 'Orbitron', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.css-copy-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  color: var(--bg-dark);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.css-copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--glow);
}

.css-copy-btn .copy-icon {
  width: 14px;
  height: 14px;
}

.css-code-block {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  padding: 16px;
  margin: 0;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Color Palette Container */
.color-palette-container {
  grid-column: 1 / -1;
  margin-bottom: 24px;
}

.color-palette-row {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(20, 20, 20, 0.2));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.palette-name {
  font-family: 'Orbitron', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.palette-colors {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

.palette-swatch {
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  flex-shrink: 0;
}

.palette-swatch:hover {
  transform: translateY(-4px);
}

.swatch-color {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.2s;
}

.palette-swatch:hover .swatch-color {
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.swatch-hex {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.7rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.swatch-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Color Format Cards (clickable) */
.color-format-card {
  cursor: pointer;
  transition: all 0.2s;
}

.color-format-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Copy Notification */
.copy-notification {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--bg-dark);
  padding: 12px 24px;
  border-radius: 8px;
  font-family: 'Orbitron', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 4px 20px var(--glow);
  z-index: 10000;
  animation: notificationSlide 1.5s ease-out forwards;
}

@keyframes notificationSlide {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  15% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  85% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
}

/* Responsive Color Palettes */
@media (max-width: 600px) {
  .swatch-color {
    width: 50px;
    height: 50px;
  }
  
  .palette-colors {
    justify-content: center;
  }
  
  .css-code-block {
    font-size: 0.75rem;
    padding: 12px;
  }
}

/* ============================================
   DONATION SECTION
   ============================================ */

.donation-section {
  max-width: 600px;
  margin: 40px auto;
  text-align: center;
}

.donation-content {
  background: linear-gradient(135deg, rgba(255, 120, 0, 0.08), rgba(255, 69, 0, 0.05));
  border: 1px solid rgba(255, 120, 0, 0.3);
  border-radius: 8px;
  padding: 30px;
}

.donation-content h4 {
  font-family: 'Orbitron', monospace;
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.donation-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.donation-qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 30px;
  border: 2px dashed rgba(255, 120, 0, 0.4);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.donation-qr-placeholder .qr-icon {
  width: 64px;
  height: 64px;
  color: var(--primary);
  opacity: 0.5;
}

.donation-qr-placeholder span {
  font-family: 'Orbitron', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .color-preview-container {
    flex-direction: column;
  }
  
  .color-preview {
    width: 100%;
    height: 80px;
  }
  
  .electric-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .color-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================
   D&D DICE ROLLER
   ============================================ */

/* D&D Tab Styling */
.category-tab.dnd-tab {
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.2), rgba(160, 82, 45, 0.15));
  border-color: rgba(205, 133, 63, 0.5);
  color: #deb887;
}

.category-tab.dnd-tab:hover {
  border-color: #deb887;
  color: #ffe4c4;
}

.category-tab.dnd-tab.active {
  background: linear-gradient(135deg, #8b4513, #a0522d);
  color: white;
  border-color: #cd853f;
  box-shadow: 0 0 20px rgba(205, 133, 63, 0.5);
}

.dnd-container {
  max-width: 700px;
  margin: 0 auto;
}

/* Quick Dice Buttons */
.dice-quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.dice-btn {
  font-family: 'Orbitron', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  width: 70px;
  height: 70px;
  border: 3px solid rgba(205, 133, 63, 0.6);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.3), rgba(160, 82, 45, 0.2));
  color: #deb887;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.dice-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.4s;
}

.dice-btn:hover::before {
  left: 100%;
}

.dice-btn:hover {
  transform: translateY(-4px) rotate(5deg);
  border-color: #deb887;
  box-shadow: 0 8px 25px rgba(205, 133, 63, 0.5);
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.5), rgba(160, 82, 45, 0.4));
}

.dice-btn:active {
  transform: translateY(-2px) rotate(0deg);
}

.dice-d20 {
  border-color: rgba(255, 215, 0, 0.6);
  color: #ffd700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.1));
}

.dice-d20:hover {
  border-color: #ffd700;
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
}

/* Dice Builder */
.dice-builder {
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.15), rgba(160, 82, 45, 0.1));
  border: 2px solid rgba(205, 133, 63, 0.3);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.dice-builder-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 16px;
  align-items: end;
}

.dice-roll-btn {
  font-family: 'Orbitron', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 24px;
  background: linear-gradient(135deg, #8b4513, #a0522d);
  border: 2px solid #cd853f;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dice-roll-btn:hover {
  box-shadow: 0 0 20px rgba(205, 133, 63, 0.6);
  transform: translateY(-2px);
}

/* Preset Rolls */
.dice-presets {
  margin-bottom: 24px;
}

.dice-presets h4 {
  font-family: 'Orbitron', monospace;
  font-size: 0.9rem;
  color: #deb887;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.2), rgba(160, 82, 45, 0.15));
  border: 1px solid rgba(205, 133, 63, 0.4);
  color: #deb887;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.preset-btn:hover {
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.35), rgba(160, 82, 45, 0.25));
  border-color: #deb887;
  transform: translateY(-2px);
}

/* Roll Result Display */
.dice-result-display {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(20, 20, 20, 0.3));
  border: 3px solid rgba(205, 133, 63, 0.5);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.dice-result-display.rolling {
  animation: diceShake 0.3s ease-in-out;
}

@keyframes diceShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px) rotate(-2deg); }
  75% { transform: translateX(5px) rotate(2deg); }
}

.dice-result-label {
  font-family: 'Orbitron', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}

.dice-result-value {
  font-family: 'Orbitron', monospace;
  font-size: 4rem;
  font-weight: 900;
  color: #deb887;
  text-shadow: 0 0 30px rgba(205, 133, 63, 0.5);
  line-height: 1;
  margin-bottom: 12px;
}

.dice-result-value.crit {
  color: #ffd700;
  text-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
  animation: critPulse 0.5s ease-in-out;
}

.dice-result-value.fail {
  color: #dc3545;
  text-shadow: 0 0 30px rgba(220, 53, 69, 0.6);
}

@keyframes critPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.dice-result-breakdown {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Roll History */
.dice-history {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(20, 20, 20, 0.2));
  border: 1px solid rgba(205, 133, 63, 0.3);
  border-radius: 8px;
  padding: 16px;
}

.dice-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.dice-history-header h4 {
  font-family: 'Orbitron', monospace;
  font-size: 0.85rem;
  color: #deb887;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

.clear-history-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  padding: 4px 10px;
  background: transparent;
  border: 1px solid rgba(205, 133, 63, 0.4);
  color: var(--text-secondary);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-history-btn:hover {
  border-color: #deb887;
  color: #deb887;
}

.dice-history-list {
  max-height: 200px;
  overflow-y: auto;
}

.dice-history-empty {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 20px;
  opacity: 0.7;
}

.dice-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(205, 133, 63, 0.15);
  font-size: 0.85rem;
}

.dice-history-item:last-child {
  border-bottom: none;
}

.dice-history-item.history-crit {
  background: rgba(255, 215, 0, 0.1);
}

.dice-history-item.history-fail {
  background: rgba(220, 53, 69, 0.1);
}

.history-notation {
  color: var(--text-secondary);
  font-weight: 600;
}

.history-result {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  color: #deb887;
}

.history-crit .history-result {
  color: #ffd700;
}

.history-fail .history-result {
  color: #dc3545;
}

.history-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.6;
}

/* Responsive D&D */
@media (max-width: 768px) {
  .dice-builder-row {
    grid-template-columns: 1fr 1fr;
  }
  
  .dice-roll-btn {
    grid-column: 1 / -1;
  }
  
  .dice-btn {
    width: 60px;
    height: 60px;
    font-size: 1.2rem;
  }
  
  .dice-result-value {
    font-size: 3rem;
  }
  
  .preset-buttons {
    justify-content: center;
  }
}
