@layer components {
  .tool-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
  }

  .tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  }

  .tool-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
  }

  .tool-card-body {
    padding: 2rem;
  }

  /* Coin Flip container */
  .coin-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
    perspective: 1000px;
  }

  .coin-result {
    text-align: center;
    margin-top: 2rem;
    font-size: 1.3rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }

  .coin-result.show { opacity: 1; }

  .btn-flip {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
  }

  .stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
  }

  .stat-box {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
  }

  .stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
  }

  .stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #495057;
  }

  /* Dice Roll container */
  .dice-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
    perspective: 1200px;
  }

  .dice-result {
    text-align: center;
    margin-top: 2rem;
    font-size: 1.3rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }

  .dice-result.show { opacity: 1; }
}
