/* ==========================================================================
   Tactile & Textile Textures for 3D Bento Cartridge Cards
   Inspired by MSN Games & physical tactile materials.
   ========================================================================== */

/* 1. Category-Themed Textile Backdrops */

/* Card & Casino: Emerald Felt / Green Baize Textile */
.bento-card[data-category="Card"] .card-texture-layer,
.bento-card[data-category="Casino"] .card-texture-layer {
  background-color: #063c2c;
  background-image: 
    radial-gradient(ellipse at 50% 20%, rgba(16, 185, 129, 0.22) 0%, transparent 75%),
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.08) 1px, transparent 0);
  background-size: 100% 100%, 8px 8px;
  border-color: rgba(16, 185, 129, 0.3);
}

/* Arcade & Retro: CRT Vector Scanlines & Glowing Perspective Grid */
.bento-card[data-category="Arcade"] .card-texture-layer,
.bento-card[data-category="Retro"] .card-texture-layer {
  background-color: #0a081a;
  background-image: 
    linear-gradient(rgba(0, 240, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.1) 1px, transparent 1px),
    radial-gradient(ellipse at center, rgba(168, 85, 247, 0.2) 0%, transparent 80%);
  background-size: 24px 24px, 24px 24px, 100% 100%;
  border-color: rgba(0, 240, 255, 0.35);
}

/* Classic & Board: Polished Mahogany Woodgrain / Game Tile Chamfer */
.bento-card[data-category="Classic"] .card-texture-layer,
.bento-card[data-category="Board"] .card-texture-layer {
  background-color: #1f140e;
  background-image: 
    repeating-linear-gradient(45deg, rgba(245, 158, 11, 0.05) 0, rgba(245, 158, 11, 0.05) 2px, transparent 2px, transparent 6px),
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
  background-size: 100% 100%, 100% 100%;
  border-color: rgba(245, 158, 11, 0.3);
}

/* Action & Sports: Carbon Fiber 45° Twill Weave & Stadium Accents */
.bento-card[data-category="Action"] .card-texture-layer,
.bento-card[data-category="Sports"] .card-texture-layer {
  background-color: #0d1219;
  background-image: 
    linear-gradient(45deg, rgba(249, 115, 22, 0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(249, 115, 22, 0.08) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(249, 115, 22, 0.08) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(249, 115, 22, 0.08) 75%);
  background-size: 12px 12px;
  border-color: rgba(249, 115, 22, 0.35);
}

/* Puzzle & Logic: Crystalline Facet Prism & Frosted Gemstone Sheen */
.bento-card[data-category="Puzzle"] .card-texture-layer,
.bento-card[data-category="Logic"] .card-texture-layer,
.bento-card[data-category="Word"] .card-texture-layer {
  background-color: #0d1326;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.25) 0%, transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.2) 0%, transparent 60%),
    repeating-linear-gradient(60deg, rgba(255, 255, 255, 0.04) 0, rgba(255, 255, 255, 0.04) 1px, transparent 1px, transparent 16px);
  background-size: 100% 100%, 100% 100%, 100% 100%;
  border-color: rgba(59, 130, 246, 0.35);
}

/* 2. MSN Games 3D Embossed Ribbons */

.bento-ribbon {
  position: absolute;
  top: 14px;
  right: -28px;
  width: 108px;
  padding: 3px 0;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  transform: rotate(45deg) translateZ(35px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  z-index: 10;
  user-select: none;
}

.bento-ribbon-hot {
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.bento-ribbon-new {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.bento-ribbon-3d {
  background: linear-gradient(135deg, #00f0ff 0%, #3b82f6 100%);
  color: #060911;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.bento-ribbon-physics {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

/* 3. Light Theme Support */
[data-theme="light"] .bento-card[data-category="Card"] .card-texture-layer {
  background-color: #064e3b;
}
[data-theme="light"] .bento-card[data-category="Arcade"] .card-texture-layer {
  background-color: #1e1b4b;
}
[data-theme="light"] .bento-card[data-category="Classic"] .card-texture-layer {
  background-color: #2e1a0d;
}
[data-theme="light"] .bento-card[data-category="Action"] .card-texture-layer {
  background-color: #18202c;
}
[data-theme="light"] .bento-card[data-category="Puzzle"] .card-texture-layer {
  background-color: #172554;
}
