/*
    @project: d4tech-forum
    @author: Maciej "D4NTE" W.
    @perms: Nie zezwalam na wykorzystywanie mojego kodu bez mojej zgody.
    @file: style-profile.css
*/
/* Styl ogólny */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
    background: linear-gradient(to bottom, #1a1a1a, #121212);
    color: #e0e0e0;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
}

/* Kontener główny */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    background-color: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Nagłówek profilu */
.profile-header {
    background: linear-gradient(to bottom, #282828, #1f1f1f);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.profile-header .background {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.profile-header .avatar {
    position: absolute;
    bottom: 60px;
    left: 20px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #1a1a1a;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.profile-header .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-header .user-info {
    padding: 50px 160px 40px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}


.profile-header .user-info .username {
    font-size: 32px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.profile-header .user-info .actions {
    display: flex;
    gap: 15px;
    /* Dodaj poniższą linię */
    margin-left: auto; 
}

.profile-header .actions .button {
    background: linear-gradient(to right, #ff4c4c, #e04343);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-header .actions .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Sekcja główna */
.profile-main {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

/* Informacje o użytkowniku */
.profile-sidebar {
    flex: 1;
    max-width: 300px;
    background: linear-gradient(to bottom, #282828, #1f1f1f);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.profile-sidebar h2 {
    font-size: 17px;
    margin-bottom: 20px;
    color: #fff;
    border-bottom: 2px solid #444;
    padding-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-sidebar ul li {
    margin-bottom: 15px;
    font-size: 16px;
    color: #ccc;
}

.profile-sidebar ul li strong {
    color: #fff;
}

/* Aktywność użytkownika */
.profile-activity {
    flex: 2;
    background: linear-gradient(to bottom, #282828, #1f1f1f);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.profile-activity h2 {
    font-size: 17px;
    margin-bottom: 20px;
    color: #fff;
    border-bottom: 2px solid #444;
    padding-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-activity ul {
    list-style: none;
    padding: 0;
}

.profile-activity ul li {
    margin-bottom: 10px;
    font-size: 16px;
    color: #ccc;
}

.profile-activity ul li a {
    color: #ff4c4c;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.profile-activity ul li a:hover {
    color: #e04343;
}

.profile-activity ul li .date {
    display: block;
    font-size: 14px;
    color: #aaa;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .profile-header .user-info {
        flex-direction: column;
        align-items: flex-start;
        padding: 40px 20px 30px;
    }

    .profile-header .avatar {
        bottom: 10px;
        left: 10px;
        width: 80px;
        height: 80px;
    }

    .profile-header .user-info .username {
        font-size: 24px;
    }

    .profile-header .actions .button {
        padding: 8px 16px;
        font-size: 14px;
    }

    .profile-main {
        flex-direction: column;
    }

    .profile-sidebar {
        max-width: 100%;
    }

    .profile-activity ul li {
        font-size: 14px;
    }
}

.follower-item {
    display: flex;
    align-items: center; /* Wyśrodkowanie elementów w pionie */
    gap: 12px; /* Lekki odstęp między avatarem a username */
    margin-bottom: 8px;
}

.follower-avatar {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 2px solid #ccc; /* Domyślna obwódka */
    transition: border-color 0.3s ease;
}

.follower-avatar.online {
    border-color: #2ecc71; /* Zielona obwódka dla online */
}

.follower-avatar.offline {
    border-color: #e74c3c; /* Czerwona obwódka dla offline */
}

.follower-item a {
    display: flex;
    align-items: center; /* Wyrównanie nazwy użytkownika do połowy wysokości avatara */
    text-decoration: none;
    color: #e74c3c;
    font-weight: bold;
    transition: color 0.3s ease;
    gap: 6px;
}

.follower-item a:hover {
    color: #c0392b;
}

.profile-badges img {
    width: 32px;
    height: 32px;
    object-fit: contain; /* Zapobiega deformacji */
    margin-right: 4px; /* Drobny odstęp między odznakami */
    vertical-align: middle;
}

.profile-visitors {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}

.profile-visitors li {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 14px;
}

.profile-visitors .avatar {
    margin-right: 8px;
    border-radius: 50%;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: linear-gradient(to bottom, #282828, #1f1f1f);
    padding: 25px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    color: #fff;
    box-shadow: 0 6px 12px rgba(0,0,0,0.5);
}

.profile-header .user-info {
    padding: 50px 160px 40px 160px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
}

.profile-header .actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;
}

.profile-header .actions .button {
    background: #e04343;
    color: #fff;
    padding: 6px 14px;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.profile-header .actions .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.status-dot {
    position: absolute;
    bottom: 13px;   
    left: 80px;     
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #1e1e1e; 
}

.status-dot.online {
    background-color: #00cc66;
}
.status-dot.away {
    background-color: #ffcc00;
}
.status-dot.offline {
    background-color: #888;
}
.status-dot.coding {
    background-color: #7234c1;
}

.status-dot.online {
    background-color: #00cc66;
    border-color: #00cc66;
    animation: pulseOnline 2s infinite;
}

@keyframes pulseOnline {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 204, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 10px 10px rgba(0, 204, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 204, 102, 0);
    }
}

.status-dot.away {
    background-color: #ffcc00;
    border-color: #ffcc00;
    animation: pulseAway 2s infinite;
}

@keyframes pulseAway {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 204, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 10px 10px rgba(255, 204, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 204, 0, 0);
    }
}

.status-dot.offline {
    background-color: #888;
    border-color: #888;
    animation: pulseOffline 2s infinite;
}

@keyframes pulseOffline {
    0% {
        box-shadow: 0 0 0 0 rgba(136, 136, 136, 0.7);
    }
    70% {
        box-shadow: 0 0 10px 10px rgba(136, 136, 136, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(136, 136, 136, 0);
    }
}

.status-dot.coding {
    background-color: #7234c1;
    border-color: #7234c1;
    animation: pulseCoding 2s infinite;
}

@keyframes pulseCoding {
    0% {
        box-shadow: 0 0 0 0 rgb(120 0 255 / 70%);
    }
    70% {
        box-shadow: 0 0 10px 10px rgba(0, 191, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 191, 255, 0);
    }
}

.header-actions {
    position: absolute;
    top: 10px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.header-actions .button {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid #444;
    transition: background 0.2s ease;
}

.header-actions .button:hover {
    background: rgba(255, 76, 76, 0.8);
}

.info-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: #1f1f1f;
    padding: 12px 20px;
    margin-top: -10px;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    justify-content: space-between;
    font-size: 14px;
}

.info-strip div {
    color: #ccc;
    min-width: 120px;
}

.profile-achievements {
    flex: 2;
    background: linear-gradient(to bottom, #282828, #1f1f1f);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    max-height: 200px;
}

.profile-achievements h2 {
    font-size: 17px;
    margin-bottom: 20px;
    color: #fff;
    border-bottom: 2px solid #444;
    padding-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.achievements-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.achievement {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #1c1c1c;
    padding: 10px;
    border-radius: 8px;
    width: 100px;
    transition: transform 0.2s ease;
}

.achievement img {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
}

.achievement span {
    color: #ccc;
    font-size: 13px;
}

.achievement:hover {
    transform: scale(1.05);
}

.profile-right {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.achievements-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-height: 200px;
    padding: 10px 5px;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: #888 transparent;
}

.achievements-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10px;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #666 transparent;
}

.achievements-grid::-webkit-scrollbar {
    height: 8px;
}

.achievements-grid::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 4px;
}

.achievements-grid::-webkit-scrollbar-track {
    background: transparent;
}


.achievement {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    text-align: center;
    color: #ddd;
    font-size: 12px;
}

.achievement img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 5px;
}

.achievements-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  max-height: 200px;
  overflow: hidden;
}

.achievements-grid {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: #666 transparent;
  scroll-behavior: smooth;
  flex-grow: 1;
}

.achievements-grid::-webkit-scrollbar {
  height: 8px;
}

.achievement {
  flex: 0 0 auto;
  min-width: 70px;
  max-width: 80px;
  text-align: center;
  font-size: 12px;
  color: #eee;
}
.achievement img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 5px;
}

/* Scroll buttons */
.scroll-btn {
  background-color: rgba(20, 20, 20, 0.8);
  border: none;
  color: #e04343;
  font-size: 20px;
  padding: 10px 14px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s ease;
}

.scroll-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.scroll-btn.left {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.scroll-btn.right {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.profile-level {
    padding: 20px;
    background: linear-gradient(to bottom, #282828, #1f1f1f);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
}

.exp-label {
    font-size: 14px;
    margin-bottom: 10px;
    color: #ddd;
}

.level-progress-bar {
    height: 20px;
    background: #2b2b2b;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.6);
}

.level-progress-fill {
    height: 100%;
    background: linear-gradient(to right, #f25c5c, #f97c7c);
    transition: width 0.3s ease;
}
