/* profile.css - NOIR GLITCH EDITION */

.profile-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.profile-section {
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid #222;
    border-radius: 0px; /* Squadrato stile glitch */
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 4px 4px 0px #000;
}

.profile-section h3 {
    font-size: 0.7rem;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    border-left: 3px solid #fff;
    padding-left: 10px;
}

/* AVATAR GRID */
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.avatar-item {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 0px; /* Squadrato */
    border: 1px solid #333;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.1s;
    background: #000;
}

.avatar-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    filter: grayscale(1);
}

.avatar-item.active {
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.avatar-item.active img {
    opacity: 1;
    filter: grayscale(0) contrast(1.2); /* L'avatar scelto è l'unico con colore/contrasto */
}

/* --- REFERRAL BOXES --- */
.ref-box {
    margin-bottom: 20px;
}

.ref-box:last-of-type {
    margin-bottom: 5px;
}

.ref-box label {
    display: block;
    font-size: 0.6rem;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.copy-field, .input-wrap {
    display: flex;
    background: #000;
    border: 1px solid #444;
    padding: 8px 8px 8px 15px;
    border-radius: 0px; /* Squadrato */
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.copy-field span { 
    font-size: 0.85rem; 
    color: #fff; 
    font-family: monospace;
}

.input-wrap input {
    background: none;
    border: none;
    color: #fff;
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    width: 100%;
    outline: none;
}

.copy-field button, .input-wrap button {
    background: #fff;
    color: #000;
    border: none;
    padding: 8px 18px;
    font-family: 'Orbitron';
    font-weight: 900;
    font-size: 0.7rem;
    border-radius: 0px;
    cursor: pointer;
    text-transform: uppercase;
}

.copy-field button:active, .input-wrap button:active {
    background: #888;
}

.status-msg { 
    font-size: 0.65rem; 
    margin-top: 10px; 
    color: #888;
    text-align: center;
    font-family: monospace;
}

/* SOCIAL LINKS BIANCHI - FIX */
.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.social-btn {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05); /* Sfondo grigio scurissimo */
    border: 1px solid #333; /* Bordo grigio */
    border-radius: 0px; /* Mantieni squadrato */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.social-btn:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.social-btn img { 
    width: 24px; 
    height: 24px; 
    /* Invertiamo i colori per renderli bianchi */
    filter: brightness(0) invert(1); 
    opacity: 0.8;
}

.social-btn:hover img {
    opacity: 1;
}

/* SETTINGS TOGGLE */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.setting-item span { font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; }

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #222;
  transition: .2s;
  border-radius: 0px;
  border: 1px solid #444;
}

.slider:before {
  position: absolute;
  content: "";
  height: 12px; width: 12px;
  left: 3px; bottom: 3px;
  background-color: #fff;
  transition: .2s;
  border-radius: 0px;
}

/* --- HACKER CODES SPECIFIC --- */

#hacker-code-input {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: bold;
    color: #fff;
}

#hacker-code-input::placeholder {
    color: #444;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#redeem-code-btn:disabled {
    background: #111;
    color: #444;
    cursor: not-allowed;
    border: 1px solid #222;
}

/* --- SOCIAL LINKS UI --- */
.mt-20 {
    margin-top: 20px;
}

.social-links-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.social-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #222;
    padding: 10px 15px;
    border-radius: 0px;
    transition: all 0.2s;
}

.social-item:hover {
    border-color: #666;
    background: rgba(255, 255, 255, 0.05);
}

.social-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.social-name {
    font-size: 0.8rem;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.social-status {
    font-size: 0.65rem;
    font-weight: bold;
    letter-spacing: 1px;
    font-family: monospace;
}

/* L'unico colore ammesso: rosso per l'allerta disconnessione */
.text-danger {
    color: #ff003c;
    text-shadow: 0 0 5px rgba(255, 0, 60, 0.2);
}

.text-success {
    color: #fff; /* Connesso = Bianco puro */
}

.optional-tag {
    font-size: 0.6rem;
    color: #444;
    margin-left: 5px;
}

.cyber-button-small {
    background: #000;
    border: 1px solid #fff;
    color: #fff;
    padding: 6px 12px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 900;
    border-radius: 0px;
    cursor: pointer;
    transition: all 0.1s;
    text-transform: uppercase;
}

.cyber-button-small:active {
    background: #fff;
    color: #000;
}

input:checked + .slider { background-color: #fff; border-color: #fff; }
input:checked + .slider:before { transform: translateX(20px); background-color: #000; }