@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;700&family=Indie+Flower&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Leather Navigation */
.leather-nav {
  background: linear-gradient(180deg, #8b4513 0%, #6b3410 100%);
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 4px 8px rgba(0,0,0,0.5),
    0 8px 16px rgba(0,0,0,0.3);
  border-bottom: 3px solid #4a2508;
  position: relative;
}

.leather-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px);
  pointer-events: none;
}

.embossed-text {
  text-shadow: 
    0 1px 0 rgba(255,255,255,0.3),
    0 -1px 0 rgba(0,0,0,0.7),
    0 3px 5px rgba(0,0,0,0.5);
}

/* Leather Button */
.leather-button {
  background: linear-gradient(180deg, #a0826d 0%, #8b6f47 100%);
  border: 2px solid #6b5d52;
  border-radius: 8px;
  padding: 8px 20px;
  color: #2c1810;
  font-weight: bold;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.3),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 2px 4px rgba(0,0,0,0.3),
    0 4px 8px rgba(0,0,0,0.2);
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.1s ease;
  position: relative;
}

.leather-button:hover {
  transform: translateY(-2px);
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.4),
    inset 0 -1px 0 rgba(0,0,0,0.3),
    0 4px 8px rgba(0,0,0,0.4),
    0 6px 12px rgba(0,0,0,0.3);
}

.leather-button:active,
.leather-button.active {
  transform: translateY(1px);
  box-shadow: 
    inset 0 2px 4px rgba(0,0,0,0.4),
    inset 0 1px 2px rgba(0,0,0,0.3),
    0 1px 2px rgba(0,0,0,0.2);
}

/* Paper Card */
.paper-card {
  background: linear-gradient(180deg, #faf8f3 0%, #f5f2e8 100%);
  border: 1px solid #d4c5a9;
  border-radius: 4px;
  padding: 24px;
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.1),
    0 4px 8px rgba(0,0,0,0.08),
    0 8px 16px rgba(0,0,0,0.05),
    inset 0 1px 0 rgba(255,255,255,0.8);
  position: relative;
}

.paper-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 29px,
    rgba(200,180,150,0.15) 29px,
    rgba(200,180,150,0.15) 30px
  );
  pointer-events: none;
}

/* Leather Notebook */
.leather-notebook {
  background: linear-gradient(180deg, #8b4513 0%, #6b3410 100%);
  border: 3px solid #4a2508;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 
    inset 0 0 0 1px rgba(255,255,255,0.1),
    0 4px 8px rgba(0,0,0,0.4),
    0 8px 16px rgba(0,0,0,0.3);
  position: relative;
}

.notebook-header {
  background: linear-gradient(180deg, #f5f2e8 0%, #e8e0d0 100%);
  padding: 12px;
  margin: -20px -20px 16px -20px;
  border-radius: 6px 6px 0 0;
  border-bottom: 2px solid #c4b5a0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.notebook-textarea {
  width: 100%;
  background: linear-gradient(180deg, #fefdfb 0%, #f8f6f0 100%);
  border: none;
  padding: 16px;
  font-family: 'Indie Flower', cursive;
  font-size: 16px;
  color: #2c1810;
  resize: none;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  background-image: repeating-linear-gradient(
    transparent,
    transparent 29px,
    #c5d9e8 29px,
    #c5d9e8 30px
  );
  line-height: 30px;
}

.notebook-textarea:focus {
  outline: none;
}

.ribbon-bookmark {
  position: absolute;
  right: 40px;
  top: 0;
  width: 30px;
  height: 80px;
  background: linear-gradient(180deg, #dc143c 0%, #8b0000 100%);
  box-shadow: 
    -2px 0 4px rgba(0,0,0,0.3),
    2px 0 4px rgba(0,0,0,0.3);
}

.ribbon-bookmark::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 15px solid #8b0000;
}

/* Wooden Calculator */
.wooden-calculator {
  background: 
    linear-gradient(180deg, #d4a574 0%, #8b6f47 100%);
  border: 4px solid #6b5d52;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.3),
    0 8px 16px rgba(0,0,0,0.4);
  position: relative;
}

.wooden-calculator::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(0,0,0,0.05) 3px, rgba(0,0,0,0.05) 6px),
    repeating-linear-gradient(0deg, transparent, transparent 80px, rgba(0,0,0,0.03) 80px, rgba(0,0,0,0.03) 160px);
  pointer-events: none;
  border-radius: 8px;
}

.calculator-display {
  background: linear-gradient(180deg, #3a3a2a 0%, #2a2a1a 100%);
  color: #8fbc8f;
  font-family: 'Courier New', monospace;
  font-size: 32px;
  font-weight: bold;
  padding: 16px;
  margin-bottom: 16px;
  border-radius: 6px;
  box-shadow: 
    inset 0 2px 8px rgba(0,0,0,0.8),
    inset 0 1px 2px rgba(0,0,0,0.5);
  text-align: right;
  text-shadow: 0 0 8px rgba(143,188,143,0.6);
}

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

.calculator-button {
  background: linear-gradient(180deg, #e8d4b8 0%, #c4a57b 100%);
  border: 2px solid #a0826d;
  border-radius: 6px;
  padding: 16px;
  font-size: 20px;
  font-weight: bold;
  color: #3a2817;
  cursor: pointer;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.5),
    0 3px 0 #8b6f47,
    0 4px 8px rgba(0,0,0,0.3);
  transition: all 0.1s ease;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

.calculator-button:hover {
  transform: translateY(-2px);
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.6),
    0 5px 0 #8b6f47,
    0 6px 12px rgba(0,0,0,0.4);
}

.calculator-button:active {
  transform: translateY(2px);
  box-shadow: 
    inset 0 2px 4px rgba(0,0,0,0.3),
    0 1px 0 #8b6f47,
    0 2px 4px rgba(0,0,0,0.2);
}

/* Cork Board */
.cork-board {
  background: 
    radial-gradient(circle at 20% 30%, #d4a574 0%, #c19a6b 50%, #a0826d 100%);
  border: 4px solid #8b7355;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 
    inset 0 0 100px rgba(0,0,0,0.2),
    0 4px 8px rgba(0,0,0,0.3);
  position: relative;
}

.cork-board::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle, transparent 0%, transparent 40%, rgba(0,0,0,0.05) 40%, rgba(0,0,0,0.05) 60%, transparent 60%),
    radial-gradient(circle, transparent 0%, transparent 30%, rgba(0,0,0,0.03) 30%, rgba(0,0,0,0.03) 50%, transparent 50%);
  background-size: 8px 8px, 12px 12px;
  background-position: 0 0, 6px 6px;
  pointer-events: none;
}

.sticky-note {
  width: 150px;
  padding: 12px;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.3),
    inset 0 -2px 4px rgba(0,0,0,0.1);
  transform: rotate(-2deg);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.sticky-note:hover {
  transform: rotate(0deg) scale(1.05);
  box-shadow: 0 8px 16px rgba(0,0,0,0.4);
  z-index: 10;
}

.font-handwriting {
  font-family: 'Indie Flower', cursive;
}

.push-pin {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ddd, #999);
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.5),
    inset 0 1px 2px rgba(255,255,255,0.5);
}

.push-pin::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #666;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.5);
}

/* Metal Panel */
.metal-panel {
  background: linear-gradient(135deg, #e0e0e0 0%, #b0b0b0 50%, #c0c0c0 100%);
  border: 3px solid #999;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.5),
    inset 0 -1px 0 rgba(0,0,0,0.3),
    0 4px 8px rgba(0,0,0,0.3);
  position: relative;
}

.metal-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  border-radius: 6px;
}

.toggle-switch {
  padding: 8px 20px;
  border: 2px solid #333;
  border-radius: 6px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.2),
    0 3px 0 #333,
    0 4px 8px rgba(0,0,0,0.3);
  transition: all 0.1s ease;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.toggle-switch:active {
  transform: translateY(2px);
  box-shadow: 
    inset 0 2px 4px rgba(0,0,0,0.4),
    0 1px 0 #333,
    0 2px 4px rgba(0,0,0,0.2);
}

.led-light {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #666;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
  transition: all 0.3s ease;
}

/* Brass Nameplate */
.brass-nameplate {
  background: linear-gradient(180deg, #d4af37 0%, #aa8c2b 100%);
  border: 2px solid #8b7220;
  border-radius: 4px;
  padding: 8px 16px;
  color: #2c1810;
  font-weight: bold;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.4),
    inset 0 -1px 0 rgba(0,0,0,0.3),
    0 2px 4px rgba(0,0,0,0.3);
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
  font-family: 'Crimson Text', serif;
}

/* Knob Slider */
.knob-slider {
  appearance: none;
  height: 8px;
  background: linear-gradient(180deg, #666 0%, #888 100%);
  border-radius: 4px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.knob-slider::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f0f0f0, #a0a0a0);
  cursor: pointer;
  box-shadow: 
    0 3px 6px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.5);
}

.knob-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f0f0f0, #a0a0a0);
  cursor: pointer;
  box-shadow: 
    0 3px 6px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.5);
  border: none;
}

/* Footer */
.leather-footer {
  background: linear-gradient(180deg, #4a2508 0%, #2c1508 100%);
  border-top: 3px solid #6b3410;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 -4px 8px rgba(0,0,0,0.3);
}

/* Woodgrain Mode */
.woodgrain-mode * {
  background-image: 
    repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(101,67,33,0.1) 3px, rgba(101,67,33,0.1) 6px),
    repeating-linear-gradient(0deg, transparent, transparent 80px, rgba(101,67,33,0.05) 80px, rgba(101,67,33,0.05) 160px) !important;
}