/* ============================================
    PROFILE - UI
    MODAIS, AVATAR GRID, ANIMAÇÕES, RESPONSIVO
    ============================================ */

/* MODAIS */
.st-p2-modal-content {
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: p2ModalIn 0.3s ease;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 16px;
}

@keyframes p2ModalIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.st-p2-modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 5;
    background: #0d0d0d;
    border-radius: 16px 16px 0 0;
}

.st-p2-modal-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
}

.st-p2-modal-close {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.st-p2-modal-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.st-p2-modal-body {
    padding: 22px 22px 16px;
}

.st-p2-modal-footer {
    padding: 16px 22px 22px;
    display: flex;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.st-p2-modal-btn {
    flex: 1;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 10px;
}

.st-p2-modal-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
}

.st-p2-modal-btn.primary {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.st-p2-modal-btn.primary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.st-p2-modal-btn.danger {
    background: rgba(239, 68, 68, 0.04);
    border-color: rgba(239, 68, 68, 0.08);
    color: rgba(239, 68, 68, 0.5);
}

.st-p2-modal-btn.danger:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

/* DIVIDER */
.st-p2-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), transparent);
    margin: 8px 0;
}

/* BIO INPUT */
.st-p2-bio-input {
    width: 100%;
    min-height: 100px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #e8eaed;
    font-family: var(--font-main);
    font-size: 16px !important;
    resize: none;
    outline: none;
    line-height: 1.6;
    border-radius: 10px;
}

.st-p2-bio-input:focus {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

.st-p2-bio-counter {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.15);
    margin-top: 8px;
    letter-spacing: 0.05em;
}

.st-p2-bio-counter.warn {
    color: rgba(251, 188, 4, 0.3);
}
.st-p2-bio-counter.danger {
    color: rgba(234, 67, 53, 0.3);
}

/* AVATAR GRID */
.st-p2-avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 4px;
}

.st-p2-avatar-option {
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.06);
    cursor: default;
    opacity: 0.4;
    filter: grayscale(1);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
}

.st-p2-avatar-option.unlocked {
    opacity: 1;
    filter: none;
    border-color: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.st-p2-avatar-option.unlocked:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.02);
}

.st-p2-avatar-option.selected {
    border-color: #ffffff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.05);
    transform: scale(1.08);
}

.st-p2-avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.st-p2-avatar-option-locked {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.st-p2-avatar-option.locked {
    opacity: 0.3;
    filter: grayscale(1);
    cursor: not-allowed;
}

.st-p2-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.02);
}

/* BOTÃO DANGER NO PERFIL */
.st-p2-btn.danger {
    background: rgba(239, 68, 68, 0.04);
    border-color: rgba(239, 68, 68, 0.08);
    color: rgba(239, 68, 68, 0.5);
}

.st-p2-btn.danger:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.15);
}

/* LIKE PARTICLES */
.st-p2-particle {
    position: fixed;
    width: 6px;
    height: 6px;
    pointer-events: none;
    z-index: 10000;
    border-radius: 50%;
    animation: p2Spark 0.8s ease-out forwards;
    animation-delay: var(--delay);
}

@keyframes p2Spark {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(calc(cos(var(--angle)) * 80px), calc(sin(var(--angle)) * 80px - 30px)) scale(0);
        opacity: 0;
    }
}

/* RESPONSIVO */
@media (max-width: 380px) {
    .st-p2-modal-body {
        padding: 16px 16px 12px;
    }
    .st-p2-modal-footer {
        padding: 12px 16px 16px;
        flex-direction: column;
    }
    .st-p2-avatar-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .st-p2-modal-title {
        font-size: 0.9rem;
    }
}

@media (min-width: 600px) {
    .st-p2-avatar-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }
    .st-p2-modal-body {
        padding: 24px 24px 18px;
    }
    .st-p2-modal-footer {
        padding: 18px 24px 24px;
    }
}

/* EDIT PROFILE */
.st-p2-edit-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.st-p2-edit-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.st-p2-edit-input,
.st-p2-edit-textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #e8eaed;
    font-family: var(--font-main);
    font-size: 15px !important;
    outline: none;
    transition: all 0.25s ease;
    border-radius: 10px;
}

.st-p2-edit-input:focus,
.st-p2-edit-textarea:focus {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

.st-p2-edit-input:disabled,
.st-p2-edit-textarea:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.st-p2-edit-textarea {
    min-height: 80px;
    resize: none;
    font-size: 14px !important;
}

.st-p2-edit-input::placeholder,
.st-p2-edit-textarea::placeholder {
    color: rgba(255, 255, 255, 0.12);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}