@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Card styling */
  --card-background-color: rgba(27, 27, 27, 0.5);
  --card-border: 3px solid rgba(255, 255, 255, 0.05);
  --card-username-color: #fff;
  --card-username-background-image: url();
  --card-username-text-shadow: 0px 0px 16.5px #ffffff;
}

/* Base card */
.card {
  margin: 0;
  border-radius: 20px;
  padding: 1.2rem;
  padding-bottom: 0.8rem;
  transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: 300px;
  height: 420px;
  border: var(--card-border);
  background-color: var(--card-background-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}

/* Closed state (hoverable, interactive) */
.card-closed {
  cursor: pointer;
}

.card-closed:hover {
  transform: translateY(-10px); /* simple hover lift */
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* Open state (modal) */
.card-open {
  cursor: default;
  pointer-events: all;
  transform-style: preserve-3d;
  transition: transform 0.2s ease; /* Smooth tilt */
  box-shadow: 0 40px 80px rgba(0,0,0,0.4);
  z-index: 1000; /* bring above everything else */
}

.card-username {
  font-weight: 600;
  font-size: 35px;
  width: fit-content;
  margin-top: 15px;
  margin-bottom: 0px;

  color: var(--card-username-color);
  background-image: var(--card-username-background-image);
  text-shadow: var(--card-username-text-shadow);
}

.card-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

.card-description {
  font-weight: 570;
  font-size: 17px;
  color: #fff;
  margin: auto;
}

/*.view-button {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.07);
  border: 2px solid rgba(255, 255, 255, 0.05);
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
  color: #fff;
  text-decoration: none;
}

.view-button:hover {
  box-shadow: 0 0 1rem #4C1D95;
  background: #af5eff;
  color: #fff;
}*/

.card-avatar {
  position: relative;
  width: 120px;
  height: 120px;
  margin-top: 10px;
}

.card-avatar-decoration {
  position: absolute;
  top: -8.25px;
  left: calc((1 - 1.16) / 2 * 100%);
  width: 116%;
  z-index: 9999;
}

.card-avatar-picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: auto;
  justify-content: center;
  display: flex;
  flex-wrap: wrap;
}

.social-links a svg{
  width: 35px;
  height: 35px;
  fill: white;
  transition: 0.25s ease;
  filter: drop-shadow(0 0 8px white);
}

.social-links a:hover {
  transform: translateY(-5px) scale(1.07);
}

.card {
  transform-style: preserve-3d;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
}

.tags {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.tags span {
  padding: 8px 14px;
  background-color: rgba(255, 255, 255, 0.07);
  border: 2px solid rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  transition: 0.2s;
  backdrop-filter: blur(8px);
}

/* EXPERIMENTAL CARD BADGES*/
.card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 6px;
  z-index: 5;
  pointer-events: none; /* badges don’t block clicks */
}

.card-badges img,
.card-badges svg {
  width: 32px;
  height: 32px;
  display: block;
}

/* EXPERIMENTAL FAVORITE CARDS*/
.favorite-section {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column; /* counter underneath */
  align-items: center;
  gap: 4px; /* small space between star and count */
}

.favorite-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  outline: none;
}

.favorite-btn.disabled {
  display: none;
}

.favorite-btn.api-offline {
    pointer-events: none;
    opacity: 0.2;
    cursor: not-allowed;
}

.like-icon {
  width: 32px;
  height: 32px;
  transition: transform 0.2s ease, fill 0.2s ease;
  display: inline-block;
  vertical-align: middle;
}

.like-icon.offline {
  display: none;
}

.favorite-btn.api-offline .like-icon.online {
  display: none;
}

.favorite-btn.api-offline .like-icon.offline {
  display: inline-block;
}

/* Hover effect - just slight scale, no rotation or color change */
.favorite-btn:hover .like-icon {
  /* This curve pulls back slightly then snaps forward */
  transform: scale(1.2);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.375);
}

/* Favorited state */
.favorite-btn.favorited .like-icon {
  filter: brightness(0) saturate(100%) invert(13%) sepia(95%) saturate(7482%) hue-rotate(327deg) brightness(96%) contrast(107%);
}

/* Optional: click feedback */
.favorite-btn:active .like-icon {
  transform: scale(0.9); /* Squeeze effect on click */
}

/* Favorite count styling */
.favorite-count {
  /*font-size: 18px;*/
  color: white;
  text-align: center;
  transition: transform 0.2s ease, color 0.2s ease;
  height: 24px;
  overflow: hidden;
}

/* Text effect when count updates */
.favorite-count.updated {
  transform: scale(1.4);
  color: #ffffff;
  animation: count-pop 0.3s forwards;
}

@keyframes count-pop {
  0%   { transform: scale(1.4); color: #ffffff; }
  50%  { transform: scale(1.2); }
  100% { transform: scale(1); color: white; }
}

.heart-particle {
    position: absolute;
    pointer-events: none;
    z-index: 100;
    /* Apply your Rose #E21D48 filter */
    filter: brightness(0) saturate(100%) invert(13%) sepia(95%) saturate(7482%) hue-rotate(327deg) brightness(96%) contrast(107%);
    animation: heart-fountain 1.5s ease-out forwards;
}

@keyframes heart-fountain {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(0);
        opacity: 0;
    }
    15% {
        opacity: 1;
        transform: translateY(-10px) translateX(var(--drift)) rotate(var(--rot)) scale(var(--size));
    }
    100% {
        transform: translateY(-80px) translateX(calc(var(--drift) * 2)) rotate(calc(var(--rot) * 2)) scale(0);
        opacity: 0;
    }
}


/* NEW CSS */
/* Status Info Styling */
.card-status-info {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 18px;
    margin-top: -5px;
    width: fit-content;
}

.card-status-info.visible {
  display: flex;
}

.status-visual {
    position: relative;
    width: 12px;
    height: 12px;
}

.status-dot {
    width: 100%;
    height: 100%;
    background: #555; /* Default Gray */
    border-radius: 50%;
    z-index: 2;
    position: relative;
}

.status-ripple {
    position: absolute;
    inset: 0;
    background: inherit;
    border-radius: 50%;
    animation: ripple 2s infinite;
    opacity: 0;
}

@keyframes ripple {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3); opacity: 0; }
}

.status-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.status-state {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
}

.status-game {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}
/* Steam Level */
.steam-level-wrapper {
    margin-left: auto; /* Pushes it to the far right of the status bar */
    display: flex;
    align-items: center;
}

/* The actual Steam Circle */
.friendPlayerLevel {
    display: inline-block;
    font-size: 12px;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    line-height: 28px; /* Adjust based on border thickness */
    text-align: center;
    border: 2px solid #4e8ddb; /* Default Blue (0-9) */
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    font-weight: bold;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

/* Color Tiers (Apply these via JS based on level) */
.lvl-0 { border-color: #7c7d7f; }  
.lvl-10 { border-color: #c02942; } 
.lvl-20 { border-color: #d95b43; }  
.lvl-30 { border-color: #fecc23; }  
.lvl-40 { border-color: #467a3c; }  
.lvl-50 { border-color: #4e8ddb; } 
.lvl-60 { border-color: #7552c7; } 
.lvl-70 { border-color: #c252c9; }
.lvl-80 { border-color: #542437; }
.lvl-90 { border-color: #997c52; }

/* Card Grouping */
.card-group-section {
    margin-bottom: 50px;
    width: 100%;
}

.group-header {
    font-family: 'YourCustomFont', sans-serif;
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 25px;
    text-transform: uppercase;
    padding-left: 15px;
}

.group-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.hidden {
  opacity: 0;
}