@charset "UTF-8";

/* ==========================================================================
   Page Specific Styles: Useful Words (心の役に立つ言葉)
   ========================================================================== */

/* =========================================
   Layout Override for 3-Column (PC & Split Screen)
   ========================================= */
/* =========================================
   Layout Override: 2-Column Mode (Split Screen / Tablet Landscape)
   Range: 920px - 1199px
   ========================================= */
@media (min-width: 920px) {
    .layout-container {
        display: grid;
        /* Left Sidebar | Main Content */
        grid-template-columns: 240px 1fr; 
        gap: 3rem;
        padding: 4rem 2% 8rem 2%; 
        max-width: none;
        width: 100%;
        margin: 0;
    }

    .sidebar {
        grid-column: 1;
        width: 100% !important;
        order: 1; /* Explicit Order */
        grid-row: 1 / span 2; /* Span across height */
    }

    .main-content {
        grid-column: 2;
        width: 100% !important;
        margin: 0 auto;
        order: 2; /* Explicit Order */
    }

    /* Right sidebar moves to bottom of main content column */
    .sidebar-discovery {
        grid-column: 2; /* Same column as main content */
        width: 100%;
        position: relative; /* No sticky */
        top: 0;
        margin-top: 4rem;
        display: block !important;
        order: 3; /* Explicit Order */
    }
}

/* =========================================
   Layout Override: 3-Column Mode (Full PC)
   Range: 1200px+
   ========================================= */
@media (min-width: 1200px) {
    .layout-container {
        grid-template-columns: 240px 1fr 320px; /* 3 Columns */
        gap: 4rem;
    }

    .sidebar-discovery {
        grid-column: 3; /* Global Right Side */
        position: sticky;
        top: calc(var(--nav-height) + 3rem);
        margin-top: 0;
    }
}

/* Large Screen Optimization */
@media (min-width: 1400px) {
    .layout-container {
        grid-template-columns: 260px 1fr 380px;
        gap: 8rem;
        padding-left: 5%;
        padding-right: 5%;
    }
    .main-content { max-width: 1000px; }
}

/* Response for Mobile & Tablet Portrait (Layout override) */
@media (max-width: 919px) {
    .sidebar-discovery {
        display: block !important;
        width: 100%;
        order: 3; /* Below the main content and navigation sidebar */
        margin-top: 4rem;
        position: relative;
        top: 0;
        animation: fadeInUp 0.8s ease-out both;
    }

    .layout-container {
        display: flex;
        flex-direction: column;
        padding-left: 5%;
        padding-right: 5%;
    }

    .main-content { 
        order: 1; 
        max-width: 100% !important;
        width: 100% !important;
    }
    .sidebar { 
        order: 2; 
        margin-top: 3rem; 
        width: 100% !important;
    }
}

/* =========================================
   Animations (Ported from genki_methods)
   ========================================= */
@media (min-width: 960px) {
    @keyframes slideInLeft {
        from { opacity: 0; transform: translateX(-30px); }
        to { opacity: 1; transform: translateX(0); }
    }

    @keyframes slideInRight {
        from { opacity: 0; transform: translateX(30px); }
        to { opacity: 1; transform: translateX(0); }
    }

    @keyframes scaleIn {
        from { opacity: 0; transform: scale(0.98) translateY(10px); }
        to { opacity: 1; transform: scale(1) translateY(0); }
    }
}

/* =========================================
   Hero Section & Video Theater
   ========================================= */
/* =========================================
   Hero Section & Video Theater (3D Enabled)
   ========================================= */
/* =========================================
   Hero Section & Video Theater (3D Enabled)
   ========================================= */
/* =========================================
   Hero Section & Video Theater (3D Enabled)
   ========================================= */
.chapter-hero {
  /* Richer Background with Depth: Dot Pattern + Aurora */
  background-color: #fce7f3; /* Fallback */
  background-image: 
    radial-gradient(#a855f7 0.8px, transparent 0.8px),
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.9) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.2) 0%, transparent 50%),
    linear-gradient(135deg, #f3e8ff 0%, #fae8ff 100%);
  background-size: 24px 24px, 100% 100%, 100% 100%, 100% 100%;
  
  padding: 4rem 2rem; /* More space */
  border-radius: 30px;
  text-align: center;
  margin-bottom: 8rem; /* Significantly Increased Spacing */
  position: relative;
  /* 3D Context Setup for Children Only */
  perspective: 1000px;
  transform-style: preserve-3d;
  
  box-shadow: 0 30px 60px -10px rgba(168, 85, 247, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(15px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chapter-hero:hover {
  transform: translateY(-5px); /* Simple lift */
  box-shadow: 0 25px 60px rgba(168, 85, 247, 0.25);
}

/* Glare Effect Layer */
.chapter-hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 30px;
  background: linear-gradient(125deg, rgba(255,255,255,0) 40%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 60%);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  background-size: 200% 200%;
  mix-blend-mode: overlay;
  transition: opacity 0.5s ease;
}

.chapter-hero:hover::after {
  opacity: 1;
}

.hero-inner {
  position: relative;
  z-index: 5;
  transform-style: preserve-3d;
  /* Elements pop out slightly */
  transform: translateZ(20px);
}

/* Decorative Icons with Parallax & Depth */
.hero-deco-1 {
    transform: translateZ(10px) rotate(-15deg);
    transition: transform 0.1s ease-out;
    pointer-events: none;
    z-index: 1;
}

.hero-deco-2 {
    transform: translateZ(15px) rotate(15deg);
    transition: transform 0.1s ease-out;
    pointer-events: none;
    z-index: 1;
}

.hero-main-title {
    display: inline-block;
    font-family: 'Kaisei Opti', serif; /* Elegant Serif */
    font-weight: 700;
    font-size: 3.5rem; /* Larger Impact */
    line-height: 1.2;
    margin: 1.5rem 0 1rem;
    position: relative;
    z-index: 2;
    
    /* Elegant Text Gradient */
    background: linear-gradient(135deg, #4c1d95 20%, #7c3aed 50%, #be185d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 0px rgba(255,255,255,0.9));
    
    transform: translateZ(30px);
}

.hero-top-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #581c87; /* Deep Purple */
    letter-spacing: 0.25em;
    margin-bottom: 0px;
    position: relative;
    text-transform: uppercase;
    
    transform: translateZ(25px);
}

.hero-top-text::before, .hero-top-text::after {
    content: '';
    display: block;
    width: 30px;
    height: 1px;
    background: currentColor;
    opacity: 0.5;
}

/* Video Theater Container */
.video-theater-container.hero-video-mode {
    width: 280px;
    max-width: 90%;
    aspect-ratio: 16 / 9;
    height: auto;
    margin: 0 auto 1.5rem;
    padding: 0;
    border-radius: 20px;
    background: #000;
    /* Stronger shadow for 3D feel */
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    border: 5px solid #fff;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 10;
    overflow: hidden;
    transform-style: preserve-3d;
    transform: translateZ(40px); /* Most prominent element */
}

.video-theater-container.hero-video-mode.is-playing {
    width: 100%;
    max-width: 900px;
    border-radius: 20px;
}

.video-frame {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    overflow: hidden;
}

.video-theater-container.hero-video-mode .video-frame {
    padding-top: 0;
}

.video-theater-container.hero-video-mode.is-playing .video-frame {
    padding-top: 56.25%;
}

.video-frame video {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.video-overlay, .video-replay-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 20; transition: all 0.4s ease;
    text-align: center;
}

.video-overlay {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(0px);
}

.video-theater-container.hero-video-mode:hover .video-overlay {
    background: rgba(255, 255, 255, 0.2);
}

.video-replay-overlay {
    background: rgba(0, 0, 0, 0.7);
    opacity: 0; visibility: hidden;
    backdrop-filter: blur(8px);
    color: #fff;
}

.video-theater-container.is-playing .video-overlay { opacity: 0; visibility: hidden; }
.video-theater-container.is-finished .video-replay-overlay { opacity: 1; visibility: visible; }

.play-circle {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, #ff0000, #cc0000); /* YouTube Red Gradient */
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.video-theater-container.hero-video-mode.is-playing .play-circle {
    width: 80px; height: 80px;
}

.play-circle i { color: white; font-size: 1.5rem; transform: translateX(2px); } /* Visual balancing of triangle */
.play-text {
    color: #cc0000; margin-top: 1rem; font-weight: 800; font-size: 0.75rem;
    letter-spacing: 0.15em; text-transform: uppercase;
    text-align: center; width: 100%; display: block;
    text-shadow: none;
}

.play-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.video-theater-container.is-playing .play-text { display: none; }

/* Progress Bar */
.video-controls-ui {
    position: absolute; bottom: 0; left: 0; width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    opacity: 0; transition: opacity 0.3s;
    display: flex; align-items: center; gap: 1rem; z-index: 30;
}

.video-theater-container.is-playing:hover .video-controls-ui { opacity: 1; }

.progress-bar-container {
    flex: 1; height: 6px; background: rgba(255,255,255,0.3);
    border-radius: 3px; cursor: pointer; overflow: hidden;
}

.progress-bar-fill { height: 100%; background: #ff0000; width: 0%; border-radius: 3px; box-shadow: 0 0 10px rgba(255, 0, 0, 0.4); }
.time-display { color: #fff; font-size: 0.8rem; font-weight: 700; min-width: 80px; text-align: right; }

/* =========================================
   HUB Dashboard (Roulette)
   ========================================= */
.hub-dashboard {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 3.5rem;
}

@media (max-width: 991px) {
    .hub-dashboard { grid-template-columns: 1fr; }
}

.intro-text {
  text-align: left;
  margin: 0;
  color: #64748b;
  line-height: 1.7;
  font-size: 0.95rem;
  font-weight: 500;
  border-left: 3px solid #e2e8f0;
  padding-left: 1.5rem;
}

.recommend-card.compact {
  background: #fff;
  border-radius: 20px;
  padding: 1.5rem 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  position: relative;
  overflow: visible;
}

.recommend-content h3 {
  font-size: 1.1rem;
  color: #1e293b;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.recommend-content p {
  color: #94a3b8;
  font-size: 0.85rem;
  margin: 0;
}

.btn-premium.mini {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
}

.btn-premium {
  background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 10px 20px rgba(168, 85, 247, 0.2);
  white-space: nowrap;
}

.btn-premium:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 30px rgba(168, 85, 247, 0.3);
}

/* =========================================
   Category Method Groups
   ========================================= */
.method-group {
    margin-bottom: 5rem;
    position: relative;
}

.group-title {
    font-size: 1.4rem;
    color: #334155;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.group-title i {
    color: var(--accent-color, #a855f7);
    background: #f3e8ff;
    padding: 0.8rem;
    border-radius: 16px;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.1);
}

.category-subtitle {
  color: #94a3b8;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  margin-top: -1.5rem;
}

/* =========================================
   Category Grid & Tiles (Mowa Aura)
   ========================================= */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Define Aura Colors (RGB for opacity support) */
.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  background: white;
  border: 1px solid transparent;
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-decoration: none;
  color: inherit;
  position: relative;
  z-index: 1;
  
  /* Default Aura: Pastel Green */
  --aura-rgb: 74, 222, 128; 
  --aura-color: rgb(var(--aura-rgb));
}

/* Category Specific Aura Colors */
.category-tile[data-category="resilience"] { --aura-rgb: 245, 158, 11; /* Amber */ }
.category-tile[data-category="action"] { --aura-rgb: 239, 68, 68; /* Red */ }
.category-tile[data-category="harmony"] { --aura-rgb: 59, 130, 246; /* Blue */ }
.category-tile[data-category="peace"] { --aura-rgb: 139, 92, 246; /* Violet */ }

.category-tile:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(var(--aura-rgb), 0.5);
  border-color: transparent;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at center, var(--aura-color), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
  filter: blur(20px);
  transform: scale(0.8);
}

.category-tile:hover::before {
  opacity: 0.2;
  transform: scale(1.05); /* Subtle Mowa */
}

.category-tile i:first-child {
  font-size: 2rem;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

/* New Animation for lively icons */
@keyframes popBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.3) rotate(-5deg); }
  60% { transform: scale(0.9) rotate(5deg); }
  80% { transform: scale(1.1) rotate(-3deg); }
  100% { transform: scale(1) rotate(0); }
}

.category-tile:hover i:first-child {
  animation: popBounce 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) both;
  filter: drop-shadow(0 5px 10px rgba(var(--aura-rgb), 0.5));
}

.tile-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #1e293b;
}

.tile-desc {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

/* =========================================
   Discovery Sidebar
   ========================================= */ 
/* Base styles handled in media query */

.discovery-box {
    background: #fff;
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
    height: 100%;
}

.discovery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.discovery-header h3 {
    font-size: 1rem;
    font-weight: 800;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-shuffle {
    background: #eff6ff;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    width: 35px; height: 35px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
}

.btn-shuffle:hover {
    background: #3b82f6; color: white; transform: rotate(180deg);
}

.discovery-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid #f1f5f9;
    text-decoration: none;
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    color: inherit;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.discovery-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    border-color: #3b82f6;
}

.discovery-card .card-tag {
    font-size: 0.65rem;
    font-weight: 800;
    color: #3b82f6;
    background: #eff6ff;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    margin-bottom: 0.6rem;
    display: inline-block;
}

.discovery-card .card-title {
    font-size: 1rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.discovery-card .card-desc {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================
   Footer Actions (Back to Home)
   ========================================= */
.page-footer-actions {
    margin-top: 6rem;
    text-align: center;
    padding-top: 3rem;
    border-top: 1px dashed #e2e8f0;
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 2.5rem;
    background: #fff;
    color: #334155;
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    font-family: 'Zen Maru Gothic', sans-serif;
}

.btn-back-home i {
    font-size: 1.2rem;
    color: #3b82f6;
    transition: transform 0.3s ease;
}

.btn-back-home:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.12);
    border-color: #3b82f6;
    color: #0f172a;
}

.btn-back-home:hover i {
    transform: scale(1.2) rotate(-10deg);
}

/* =========================================
   Roulette & Highlight States (Legacy Support)
   ========================================= */
.roulette-highlight {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
  border: 2px solid #10b981 !important;
  background-color: #ecfdf5 !important;
  transition: all 0.1s ease;
  z-index: 10;
}

.recommended-highlight {
  border: 2px solid #10b981 !important;
  background-color: #ecfdf5 !important;
  position: relative;
  z-index: 1; 
}

.recommend-badge {
  position: absolute;
  top: -15px;
  right: -10px;
  margin: 0;
  padding: 0.3rem 0.8rem;
  background: #10b981;
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  border-radius: 9999px;
  border: 2px solid #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 30;
  pointer-events: none;
}

@keyframes popIn {
  from { transform: scale(0) rotate(-10deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}

.sparkle-effect {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  color: #f59e0b;
  pointer-events: none;
  opacity: 0;
}

.sparkle-animate {
  animation: sparklePop 0.8s ease-out forwards;
}

@keyframes sparklePop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

/* =========================================
   Icon Colors (Preserved)
   ========================================= */
.tile-icon-sun { color: #f59e0b !important; }
.tile-icon-umbrella { color: #3b82f6 !important; }
.tile-icon-seedling { color: #10b981 !important; }
.tile-icon-trophy { color: #eab308 !important; }
.tile-icon-door { color: #a855f7 !important; }
.tile-icon-heart { color: #ef4444 !important; }
.tile-icon-key { color: #eab308 !important; }
.tile-icon-magic { color: #8b5cf6 !important; }
.tile-icon-music { color: #6366f1 !important; }
.tile-icon-chalkboard { color: #14b8a6 !important; }
.tile-icon-smile { color: #f97316 !important; }
.tile-icon-gem { color: #0ea5e9 !important; }
.tile-icon-check { color: #10b981 !important; }
.tile-icon-dove { color: #8b5cf6 !important; }
.tile-icon-lightbulb { color: #eab308 !important; }

/* Sidebar Advice Header */
.sidebar-advice .header i {
  color: #f59e0b;
}


/* =========================================
   Discovery Sidebar Styling (From genki_methods)
   ========================================= */
.sidebar-discovery .sidebar-widget {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    padding: 1.5rem;
}

.discovery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #e0f2fe;
}

.discovery-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1e293b;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.discovery-header h3 i {
    color: #3b82f6;
}

.btn-shuffle {
    background: #eff6ff;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(59, 130, 246, 0.1);
}

.btn-shuffle:hover {
    background: #3b82f6;
    color: white;
    transform: rotate(180deg);
}

/* Flap Card (3D Flip Animation System) */
.discovery-cards {
    perspective: 1000px;
}

.discovery-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid #f1f5f9;
    text-decoration: none;
    display: block;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    color: inherit;
    
    /* Animation Base */
    backface-visibility: hidden;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.discovery-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    border-color: #3b82f6;
    z-index: 10;
}

/* Shuffle Animation (managed by container class) */
.discovery-cards.shuffling .discovery-card {
    animation: flipVert 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* pulse/Auto-Flap State (managed by single card class) */
.discovery-card.flipping {
    animation: flipVert 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes flipVert {
    0% { transform: rotateX(0deg); opacity: 1; }
    45% { transform: rotateX(-90deg); opacity: 0.5; }
    55% { transform: rotateX(90deg); opacity: 0.5; }
    100% { transform: rotateX(0deg); opacity: 1; }
}

.discovery-card .card-tag {
    font-size: 0.65rem;
    font-weight: 800;
    color: #3b82f6;
    background: #eff6ff;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
    display: inline-block;
}

.discovery-card .card-title {
    font-size: 1rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.discovery-card .card-desc {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
