/* ================================================= */
/* STILOVI ZA STRANICU PROFILA (profile.css)         */
/* ================================================= */

body {
    background-color: #121212;
    font-family: 'Inter', sans-serif;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
    display: block;
}

.profile-container {
  max-width: 700px; /* Malo šire da statistika diše */
  width: 100%;
  margin: 20px auto;
  padding: 25px;
  
  /* Uklonjena stara siva pozadina, sada je transparentno/tamno */
  background-color: transparent; 
  
  min-height: 90vh;
  display: flex;
  flex-direction: column;
}

/* --- GUMB NATRAG (U stilu ostalih gumba) --- */
.back-button {
  text-decoration: none;
  color: #b6ccf2;
  font-weight: bold;
  margin-bottom: 20px;
  align-self: flex-start;
  padding: 10px 20px;
  
  background-color: #2b2b2b;
  border: 2px solid #333;
  border-radius: 12px;
  
  transition: all 0.2s ease;
  font-size: 0.9rem;
}
.back-button:hover {
  border-color: #5d5dff;
  color: #fff;
  transform: translateX(-3px);
}

/* --- ZAGLAVLJE PROFILA --- */
.profile-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-avatar-img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  
  /* Moderni rub umjesto debelog */
  border: 2px solid #5d5dff;
  box-shadow: 0 0 15px rgba(93, 93, 255, 0.3);
  
  background-color: #2b2b2b;
  margin: 0 auto 15px auto;
  display: block;
  object-fit: cover;
}

.profile-header h1 {
  margin: 5px 0;
  color: #e0e0e0;
  font-size: 1.8rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.profile-status {
  color: #4ade80; /* Zelena za status */
  font-size: 0.9rem;
  background: rgba(74, 222, 128, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  margin-top: 5px;
}

/* --- GLAVNE SEKCIJE (Glassmorphism) --- */
.profile-section {
  /* Blaga plavičasta prozirna pozadina */
  background-color: rgba(93, 93, 255, 0.05); 
  border: 1px solid rgba(93, 93, 255, 0.2); /* Tanki rub */
  
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 25px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.profile-section h2 {
  color: #8daeff; /* Pastelna plava */
  margin-top: 0;
  border-bottom: 1px solid rgba(93, 93, 255, 0.2);
  padding-bottom: 10px;
  margin-bottom: 20px;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- LEVEL I PROGRESS BAR --- */
.stat-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 1.1rem;
}
.stat-label { color: #aaa; }
.stat-value { color: #fff; font-weight: bold; }

.progress-bar-container {
  background-color: #2b2b2b; /* Tamnija podloga */
  border: 1px solid #444;
  border-radius: 12px;
  height: 28px;
  padding: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  /* Gradient umjesto obične boje */
  background: linear-gradient(90deg, #5d5dff, #8daeff); 
  transition: width 0.8s ease-out;
  z-index: 1;
}

.progress-text {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: 0.85rem;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* --- STATISTIKA GRID (Kockice) --- */
.stats-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* Responsivno */
  gap: 15px;
}

.stat-box.modern {
  /* Izgled kao kartice u Hall of Fame */
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  transition: transform 0.2s;
}

.stat-box.modern:hover {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.stat-box.modern .box-label {
  display: block;
  font-size: 0.8rem;
  color: #aaa;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
}

.stat-box.modern .box-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff; /* Bijela za kontrast */
}

/* --- ACHIEVEMENTS (Accordion) --- */
.accordion-container {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  background-color: #1a1a1a;
}

.accordion-button {
  background-color: #2b2b2b; /* Tamna */
  color: #e0e0e0;
  padding: 15px;
  width: 100%;
  border: none;
  border-bottom: 1px solid #333;
  text-align: left;
  outline: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s;
}

.accordion-button:hover {
  background-color: #333;
}
.accordion-button:last-child {
  border-bottom: none;
}

/* Brojač (x / y) */
.accordion-button span {
  font-size: 0.85rem;
  color: #8daeff;
  background-color: rgba(93, 93, 255, 0.1);
  padding: 4px 10px;
  border-radius: 10px;
  border: 1px solid rgba(93, 93, 255, 0.3);
}

.accordion-button::after {
  content: '▼';
  font-size: 0.8rem;
  color: #777;
  margin-left: 10px;
  transition: transform 0.3s ease;
}
.accordion-button.active::after {
  transform: rotate(180deg);
  color: #fff;
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background-color: #1a1a1a; /* Jako tamna za sadržaj */
}

/* Stavke unutar liste */
.achievement-item {
  padding: 12px 15px;
  border-bottom: 1px solid #333;
  display: flex;
  align-items: center;
  opacity: 0.5; /* Default: Zaključano je bljeđe */
  transition: opacity 0.3s;
}
.achievement-item:last-child {
  border-bottom: none;
}

/* Otključano */
.achievement-item.completed {
  opacity: 1; /* Puna vidljivost */
  background-color: rgba(46, 204, 113, 0.05); /* Blago zelena pozadina */
}

.achievement-icon {
  font-size: 1.2rem;
  margin-right: 12px;
  min-width: 25px;
  text-align: center;
}
.achievement-name {
  font-weight: bold;
  color: #e0e0e0;
  font-size: 0.95rem;
}
.achievement-desc {
  margin-left: auto;
  font-size: 0.8rem;
  color: #888;
  text-align: right;
  max-width: 50%;
}

/* --- RESPONSIVNOST --- */
@media (max-width: 600px) {
  .profile-container {
    padding: 15px;
  }
  .stats-grid-modern {
    grid-template-columns: 1fr 1fr; /* 2 stupca na mobitelu */
  }
  .profile-header h1 {
    font-size: 1.5rem;
  }
}